Project
Loading...
Searching...
No Matches
o2::ccdb Namespace Reference

information complementary to a CCDB object (path, metadata, startTimeValidity, endTimeValidity etc) More...

Classes

class  BasicCCDBManager
 
class  CcdbApi
 
class  CCDBDownloader
 
class  CCDBManagerInstance
 
class  CcdbObjectInfo
 
struct  CCDBQuery
 
class  CCDBSemaphore
 
struct  DataForClosingSocket
 
struct  DownloaderRequestData
 
struct  HeaderObjectPair_t
 
class  IdPath
 
struct  MemoryStruct
 
class  SemaphoreRegistry
 

Typedefs

typedef struct o2::ccdb::DownloaderRequestData DownloaderRequestData
 
typedef struct o2::ccdb::DataForClosingSocket DataForClosingSocket
 
using CurlWriteCallback = size_t(*)(void *, size_t, size_t, void *)
 

Enumerations

enum  DownloaderErrorLevel { MINOR , SEVERE }
 

Functions

void closeHandles (uv_handle_t *handle, void *arg)
 
curl_socket_t opensocketCallback (void *clientp, curlsocktype purpose, struct curl_sockaddr *address)
 
void onUVClose (uv_handle_t *handle)
 
long getFutureTimestamp (int secondsInFuture)
 returns the timestamp in long corresponding to "now + secondsInFuture"
 
long getCurrentTimestamp ()
 returns the timestamp in long corresponding to "now"
 
long createTimestamp (int year, int month, int day, int hour, int minutes, int seconds)
 Converting time into numerical time stamp representation.
 
int adjustOverriddenEOV (CcdbApi &api, const CcdbObjectInfo &infoNew)
 set EOV of overriden objects to SOV-1 of overriding one if it is allowed
 
std::string sanitizeObjectName (const std::string &objectName)
 
size_t CurlWrite_CallbackFunc_StdString2 (void *contents, size_t size, size_t nmemb, std::string *s)
 
size_t write_data (void *, size_t size, size_t nmemb, void *)
 
bool stdmap_to_jsonfile (std::map< std::string, std::string > const &meta, std::string const &filename)
 
bool jsonfile_to_stdmap (std::map< std::string, std::string > &meta, std::string const &filename)
 
void uvErrorCheck (int code, DownloaderErrorLevel level)
 
void curlEasyErrorCheck (CURLcode code)
 
void curlMultiErrorCheck (CURLMcode code)
 
std::string uniqueAgentID ()
 
CURL * createTestHandle (std::string *dst)
 
size_t writeCallbackNoLambda (void *contents, size_t size, size_t nmemb, void *chunkptr)
 
std::vector< CURL * > prepareAsyncHandles (size_t num, std::vector< o2::pmr::vector< char > * > &dests)
 
 BOOST_AUTO_TEST_CASE (asynch_schedule_test)
 
 BOOST_AUTO_TEST_CASE (perform_test)
 
 BOOST_AUTO_TEST_CASE (blocking_batch_test)
 
 BOOST_AUTO_TEST_CASE (test_with_break)
 
void closeAllHandles (uv_handle_t *handle, void *arg)
 
void testTimerCB (uv_timer_t *handle)
 
 BOOST_AUTO_TEST_CASE (external_loop_test)
 
 BOOST_AUTO_TEST_CASE (trim_host_url_test)
 

Variables

std::mutex gIOMutex
 

Detailed Description

information complementary to a CCDB object (path, metadata, startTimeValidity, endTimeValidity etc)

Typedef Documentation

◆ CurlWriteCallback

using o2::ccdb::CurlWriteCallback = typedef size_t (*)(void*, size_t, size_t, void*)

Definition at line 638 of file CcdbApi.cxx.

◆ DataForClosingSocket

Structure assigned to a uv_timer_t before adding it to socketTimerMap. It stores the information about the socket connected to the timer.

◆ DownloaderRequestData

Enumeration Type Documentation

◆ DownloaderErrorLevel

Enumerator
MINOR 
SEVERE 

Definition at line 90 of file CCDBDownloader.h.

Function Documentation

◆ adjustOverriddenEOV()

int o2::ccdb::adjustOverriddenEOV ( CcdbApi api,
const CcdbObjectInfo infoNew 
)

set EOV of overriden objects to SOV-1 of overriding one if it is allowed

Definition at line 59 of file CCDBTimeStampUtils.cxx.

◆ BOOST_AUTO_TEST_CASE() [1/6]

o2::ccdb::BOOST_AUTO_TEST_CASE ( asynch_schedule_test  )

Definition at line 147 of file testCcdbApiDownloader.cxx.

◆ BOOST_AUTO_TEST_CASE() [2/6]

o2::ccdb::BOOST_AUTO_TEST_CASE ( blocking_batch_test  )

Definition at line 208 of file testCcdbApiDownloader.cxx.

◆ BOOST_AUTO_TEST_CASE() [3/6]

o2::ccdb::BOOST_AUTO_TEST_CASE ( external_loop_test  )

Definition at line 321 of file testCcdbApiDownloader.cxx.

◆ BOOST_AUTO_TEST_CASE() [4/6]

o2::ccdb::BOOST_AUTO_TEST_CASE ( perform_test  )

Definition at line 185 of file testCcdbApiDownloader.cxx.

◆ BOOST_AUTO_TEST_CASE() [5/6]

o2::ccdb::BOOST_AUTO_TEST_CASE ( test_with_break  )

Definition at line 242 of file testCcdbApiDownloader.cxx.

◆ BOOST_AUTO_TEST_CASE() [6/6]

o2::ccdb::BOOST_AUTO_TEST_CASE ( trim_host_url_test  )

Definition at line 368 of file testCcdbApiDownloader.cxx.

◆ closeAllHandles()

void o2::ccdb::closeAllHandles ( uv_handle_t handle,
void arg 
)

Definition at line 309 of file testCcdbApiDownloader.cxx.

◆ closeHandles()

void o2::ccdb::closeHandles ( uv_handle_t handle,
void arg 
)

uv_walk callback which is used to close passed handle.

Parameters
handleHandle to be closed.
argArgument required by callback template. Is not used in this implementation.

Definition at line 135 of file CCDBDownloader.cxx.

◆ createTestHandle()

CURL * o2::ccdb::createTestHandle ( std::string *  dst)

Definition at line 65 of file testCcdbApiDownloader.cxx.

◆ createTimestamp()

long o2::ccdb::createTimestamp ( int  year,
int  month,
int  day,
int  hour,
int  minutes,
int  seconds 
)

Converting time into numerical time stamp representation.

Definition at line 45 of file CCDBTimeStampUtils.cxx.

◆ curlEasyErrorCheck()

void o2::ccdb::curlEasyErrorCheck ( CURLcode  code)

Definition at line 52 of file CCDBDownloader.cxx.

◆ curlMultiErrorCheck()

void o2::ccdb::curlMultiErrorCheck ( CURLMcode  code)

Definition at line 60 of file CCDBDownloader.cxx.

◆ CurlWrite_CallbackFunc_StdString2()

size_t o2::ccdb::CurlWrite_CallbackFunc_StdString2 ( void contents,
size_t  size,
size_t  nmemb,
std::string *  s 
)

Definition at line 1176 of file CcdbApi.cxx.

◆ getCurrentTimestamp()

long o2::ccdb::getCurrentTimestamp ( )

returns the timestamp in long corresponding to "now"

Definition at line 35 of file CCDBTimeStampUtils.cxx.

◆ getFutureTimestamp()

long o2::ccdb::getFutureTimestamp ( int  secondsInFuture)

returns the timestamp in long corresponding to "now + secondsInFuture"

Definition at line 24 of file CCDBTimeStampUtils.cxx.

◆ jsonfile_to_stdmap()

bool o2::ccdb::jsonfile_to_stdmap ( std::map< std::string, std::string > &  meta,
std::string const &  filename 
)

Definition at line 1389 of file CcdbApi.cxx.

◆ onUVClose()

void o2::ccdb::onUVClose ( uv_handle_t handle)

Delete the handle.

Parameters
handleHandle assigned to this callback.

Definition at line 146 of file CCDBDownloader.cxx.

◆ opensocketCallback()

curl_socket_t o2::ccdb::opensocketCallback ( void clientp,
curlsocktype  purpose,
struct curl_sockaddr *  address 
)

Called by CURL in order to open a new socket. Newly opened sockets are assigned a timeout timer and added to socketTimerMap.

Parameters
clientpPointer to the CCDBDownloader instance which controls the socket.
purposePurpose of opened socket. This parameter is unused but required by the callback template.
addressStructure containing information about family, type and protocol for the socket.

Definition at line 180 of file CCDBDownloader.cxx.

◆ prepareAsyncHandles()

std::vector< CURL * > o2::ccdb::prepareAsyncHandles ( size_t  num,
std::vector< o2::pmr::vector< char > * > &  dests 
)

Definition at line 119 of file testCcdbApiDownloader.cxx.

◆ sanitizeObjectName()

std::string o2::ccdb::sanitizeObjectName ( const std::string &  objectName)

Keep only the alphanumeric characters plus '_' plus '/' plus '.' from the string passed in argument.

Parameters
objectName
Returns
a new string following the rule enounced above.

Definition at line 298 of file CcdbApi.cxx.

◆ stdmap_to_jsonfile()

bool o2::ccdb::stdmap_to_jsonfile ( std::map< std::string, std::string > const &  meta,
std::string const &  filename 
)

Definition at line 1360 of file CcdbApi.cxx.

◆ testTimerCB()

void o2::ccdb::testTimerCB ( uv_timer_t handle)

Definition at line 316 of file testCcdbApiDownloader.cxx.

◆ uniqueAgentID()

std::string o2::ccdb::uniqueAgentID ( )

Definition at line 54 of file testCcdbApiDownloader.cxx.

◆ uvErrorCheck()

void o2::ccdb::uvErrorCheck ( int  code,
DownloaderErrorLevel  level 
)

Definition at line 38 of file CCDBDownloader.cxx.

◆ write_data()

size_t o2::ccdb::write_data ( void ,
size_t  size,
size_t  nmemb,
void  
)

Definition at line 1296 of file CcdbApi.cxx.

◆ writeCallbackNoLambda()

size_t o2::ccdb::writeCallbackNoLambda ( void contents,
size_t  size,
size_t  nmemb,
void chunkptr 
)

Definition at line 93 of file testCcdbApiDownloader.cxx.

Variable Documentation

◆ gIOMutex

std::mutex o2::ccdb::gIOMutex

Definition at line 59 of file CcdbApi.cxx.