Project
Loading...
Searching...
No Matches
o2::emcal::CalibDB Class Reference

Interface to calibration data from CCDB for EMCAL. More...

#include <CalibDB.h>

Classes

class  ObjectNotFoundException
 Handling errors due to objects not found in the CCDB. More...
 
class  TypeMismatchException
 Class handling errors of wrong type of a query result. More...
 

Public Member Functions

 CalibDB ()=default
 Default constructor.
 
 CalibDB (const std::string_view server)
 Constructor initializing also the server.
 
 ~CalibDB ()=default
 Destructor.
 
void storeBadChannelMap (BadChannelMap *bcm, const std::map< std::string, std::string > &metadata, ULong_t timestart, ULong_t timeend)
 Store bad channel map in the CCDB.
 
BadChannelMapreadBadChannelMap (ULong_t timestamp, const std::map< std::string, std::string > &metadata)
 Find bad channel map in the CCDB for given timestamp.
 
void storeTimeCalibParam (TimeCalibrationParams *tcp, const std::map< std::string, std::string > &metadata, ULong_t timestart, ULong_t timeend)
 Store time calibration coefficiencts in the CCDB.
 
TimeCalibrationParamsreadTimeCalibParam (ULong_t timestamp, const std::map< std::string, std::string > &metadata)
 Find time calibration coefficiencts in the CCDB for given timestamp.
 
void storeTimeCalibParamL1Phase (TimeCalibParamL1Phase *tcp, const std::map< std::string, std::string > &metadata, ULong_t timestart, ULong_t timeend)
 Store L1 phase shifts in the CCDB.
 
TimeCalibParamL1PhasereadTimeCalibParamL1Phase (ULong_t timestamp, const std::map< std::string, std::string > &metadata)
 Find L1 phase shifts in the CCDB for given timestamp.
 
void storeTempCalibParam (TempCalibrationParams *tcp, const std::map< std::string, std::string > &metadata, ULong_t timestart, ULong_t timeend)
 Store temperature calibration coefficiencts in the CCDB.
 
TempCalibrationParamsreadTempCalibParam (ULong_t timestamp, const std::map< std::string, std::string > &metadata)
 Find temperature calibration coefficiencts in the CCDB for given timestamp.
 
void storeTempCalibParamSM (TempCalibParamSM *tcp, const std::map< std::string, std::string > &metadata, ULong_t timestart, ULong_t timeend)
 Store temperature calibration coefficiencts per SM in the CCDB.
 
TempCalibParamSMreadTempCalibParamSM (ULong_t timestamp, const std::map< std::string, std::string > &metadata)
 Find temperature calibration coefficiencts per SM in the CCDB for given timestamp.
 
void storeGainCalibFactors (GainCalibrationFactors *gcf, const std::map< std::string, std::string > &metadata, ULong_t timestart, ULong_t timeend)
 Store gain calibration factors in the CCDB.
 
GainCalibrationFactorsreadGainCalibFactors (ULong_t timestamp, const std::map< std::string, std::string > &metadata)
 Find gain calibration factors in the CCDB for given timestamp.
 
EMCALChannelScaleFactorsreadChannelScaleFactors (ULong_t timestamp, const std::map< std::string, std::string > &metadata)
 Find scale factors used for bad channel calibration in the CCDB for given timestamp.
 
void storeFeeDCSData (FeeDCS *dcs, const std::map< std::string, std::string > &metadata, ULong_t timestart, ULong_t timeend)
 Store FEE DCS data in the CCDB.
 
FeeDCSreadFeeDCSData (ULong_t timestamp, const std::map< std::string, std::string > &metadata)
 Find FEE DCS data in the CCDB for given timestamp.
 
void storeTemperatureSensorData (ElmbData *dcs, const std::map< std::string, std::string > &metadata, ULong_t timestart, ULong_t timeend)
 Store Temperature Sensor data in the CCDB.
 
ElmbDatareadTemperatureSensorData (ULong_t timestamp, const std::map< std::string, std::string > &metadata)
 Find Temperature Sensor data in the CCDB for given timestamp.
 
void storePedestalData (Pedestal *pedestals, const std::map< std::string, std::string > &metadata, ULong_t timestart, ULong_t timeend)
 Store pedestal data in the CCDB.
 
PedestalreadPedestalData (ULong_t timestamp, const std::map< std::string, std::string > &metadata)
 Find pedestal data in the CCDB for given timestamp.
 
void setServer (const std::string_view server)
 Set new CCDB server URL.
 

Static Public Member Functions

static const chargetCDBPathBadChannelMap ()
 Get CDB path for the bad channel map.
 
static const chargetCDBPathTimeCalibrationParams ()
 Get CDB path for the time calibration.
 
static const chargetCDBPathL1Phase ()
 Get CDB path for the L1 Phase.
 
static const chargetCDBPathTemperatureCalibrationParams ()
 Get CDB path for the temperature calibration.
 
static const chargetCDBPathTemperatureCalibrationParamsSM ()
 Get CDB path for the SM-dependent temperature calibration.
 
static const chargetCDBPathGainCalibrationParams ()
 Get CDB path for the gain calibration.
 
static const chargetCDBPathFeeDCS ()
 Get CDB path for the FEE DCS settings.
 
static const chargetCDBPathTemperatureSensor ()
 Get CDB path for the Temperature Sensor data.
 
static const chargetCDBPathChannelScaleFactors ()
 Get CCDB path for the scale factors used in the bad channel calibration.
 
static const chargetCDBPathChannelPedestals ()
 Get CCDB path for the pedestal data.
 

Detailed Description

Interface to calibration data from CCDB for EMCAL.

Author
Markus Fasel <> Oak Ridge National Laboratory
Since
July 12, 2019

Interface handling simple access to CCDB content for EMCAL objects. The interface allows storing and reading of the common EMCAL calibration objects

  • Bad Channel Map
  • Time calibration
  • Gain calibration
  • Temperature calibration
  • Pedestals Users only need to specify the CCDB server, the timestamp and (optionally) additional meta data. Handling of the CCDB path and type conversions is done internally - users deal directly with the low level containers.

Attention: The read process of the CCDB objects might fail, either because the query of the CCDB was not successfull (wrong server / path / timestamp) or the object type is different and internal conversion failed. In both cases dedicated exceptions are thrown:

Definition at line 67 of file CalibDB.h.

Constructor & Destructor Documentation

◆ CalibDB() [1/2]

o2::emcal::CalibDB::CalibDB ( )
default

Default constructor.

◆ CalibDB() [2/2]

CalibDB::CalibDB ( const std::string_view  server)

Constructor initializing also the server.

Parameters
serverName of the CCDB server to be used in queries

Definition at line 26 of file CalibDB.cxx.

◆ ~CalibDB()

o2::emcal::CalibDB::~CalibDB ( )
default

Destructor.

Member Function Documentation

◆ getCDBPathBadChannelMap()

static const char * o2::emcal::CalibDB::getCDBPathBadChannelMap ( )
inlinestatic

Get CDB path for the bad channel map.

Returns
Path of the bad channel map in the CCDB

Definition at line 334 of file CalibDB.h.

◆ getCDBPathChannelPedestals()

static const char * o2::emcal::CalibDB::getCDBPathChannelPedestals ( )
inlinestatic

Get CCDB path for the pedestal data.

Returns
Path of the pedestal data

Definition at line 370 of file CalibDB.h.

◆ getCDBPathChannelScaleFactors()

static const char * o2::emcal::CalibDB::getCDBPathChannelScaleFactors ( )
inlinestatic

Get CCDB path for the scale factors used in the bad channel calibration.

Returns
Path of the scale factors used in the bad channel calibration in the CCDB

Definition at line 366 of file CalibDB.h.

◆ getCDBPathFeeDCS()

static const char * o2::emcal::CalibDB::getCDBPathFeeDCS ( )
inlinestatic

Get CDB path for the FEE DCS settings.

Returns
Path of the FEE DCS settings in the CCDB

Definition at line 358 of file CalibDB.h.

◆ getCDBPathGainCalibrationParams()

static const char * o2::emcal::CalibDB::getCDBPathGainCalibrationParams ( )
inlinestatic

Get CDB path for the gain calibration.

Returns
Path of the gain calibration in the CCDB

Definition at line 354 of file CalibDB.h.

◆ getCDBPathL1Phase()

static const char * o2::emcal::CalibDB::getCDBPathL1Phase ( )
inlinestatic

Get CDB path for the L1 Phase.

Returns
Path of the L1 phase in the CCDB

Definition at line 342 of file CalibDB.h.

◆ getCDBPathTemperatureCalibrationParams()

static const char * o2::emcal::CalibDB::getCDBPathTemperatureCalibrationParams ( )
inlinestatic

Get CDB path for the temperature calibration.

Returns
Path of the temperature calibration in the CCDB

Definition at line 346 of file CalibDB.h.

◆ getCDBPathTemperatureCalibrationParamsSM()

static const char * o2::emcal::CalibDB::getCDBPathTemperatureCalibrationParamsSM ( )
inlinestatic

Get CDB path for the SM-dependent temperature calibration.

Returns
Path of the SM-dependent temperature calibration in the CCDB

Definition at line 350 of file CalibDB.h.

◆ getCDBPathTemperatureSensor()

static const char * o2::emcal::CalibDB::getCDBPathTemperatureSensor ( )
inlinestatic

Get CDB path for the Temperature Sensor data.

Returns
Path of the Temperature Sensor data in the CCDB

Definition at line 362 of file CalibDB.h.

◆ getCDBPathTimeCalibrationParams()

static const char * o2::emcal::CalibDB::getCDBPathTimeCalibrationParams ( )
inlinestatic

Get CDB path for the time calibration.

Returns
Path of the time calibration in the CCDB

Definition at line 338 of file CalibDB.h.

◆ readBadChannelMap()

BadChannelMap * CalibDB::readBadChannelMap ( ULong_t  timestamp,
const std::map< std::string, std::string > &  metadata 
)

Find bad channel map in the CCDB for given timestamp.

Parameters
timestampTimestamp used in query
metadataAdditional metadata to be used in the query
Exceptions
ObjectNotFoundExceptionif object is not found for the given timestamp
TypeMismatchExceptionif object is present but type is different (CCDB corrupted)

Definition at line 111 of file CalibDB.cxx.

◆ readChannelScaleFactors()

EMCALChannelScaleFactors * CalibDB::readChannelScaleFactors ( ULong_t  timestamp,
const std::map< std::string, std::string > &  metadata 
)

Find scale factors used for bad channel calibration in the CCDB for given timestamp.

Parameters
timestampTimestamp used in query (there is only one entry in the CCDB)
metadataAdditional metadata to be used in the query
Exceptions
ObjectNotFoundExceptionif object is not found for the given timestamp
TypeMismatchExceptionif object is present but type is different (CCDB corrupted)

Definition at line 189 of file CalibDB.cxx.

◆ readFeeDCSData()

FeeDCS * CalibDB::readFeeDCSData ( ULong_t  timestamp,
const std::map< std::string, std::string > &  metadata 
)

Find FEE DCS data in the CCDB for given timestamp.

Parameters
timestampTimestamp used in query
metadataAdditional metadata to be used in the query
Exceptions
ObjectNotFoundExceptionif object is not found for the given timestamp
TypeMismatchExceptionif object is present but type is different (CCDB corrupted)

Definition at line 202 of file CalibDB.cxx.

◆ readGainCalibFactors()

GainCalibrationFactors * CalibDB::readGainCalibFactors ( ULong_t  timestamp,
const std::map< std::string, std::string > &  metadata 
)

Find gain calibration factors in the CCDB for given timestamp.

Parameters
timestampTimestamp used in query
metadataAdditional metadata to be used in the query
Exceptions
ObjectNotFoundExceptionif object is not found for the given timestamp
TypeMismatchExceptionif object is present but type is different (CCDB corrupted)

Definition at line 176 of file CalibDB.cxx.

◆ readPedestalData()

Pedestal * CalibDB::readPedestalData ( ULong_t  timestamp,
const std::map< std::string, std::string > &  metadata 
)

Find pedestal data in the CCDB for given timestamp.

Parameters
timestampTimestamp used in query
metadataAdditional metadata to be used in the query
Exceptions
ObjectNotFoundExceptionif object is not found for the given timestamp
TypeMismatchExceptionif object is present but type is different (CCDB corrupted)

Definition at line 228 of file CalibDB.cxx.

◆ readTempCalibParam()

TempCalibrationParams * CalibDB::readTempCalibParam ( ULong_t  timestamp,
const std::map< std::string, std::string > &  metadata 
)

Find temperature calibration coefficiencts in the CCDB for given timestamp.

Parameters
timestampTimestamp used in query
metadataAdditional metadata to be used in the query
Exceptions
ObjectNotFoundExceptionif object is not found for the given timestamp
TypeMismatchExceptionif object is present but type is different (CCDB corrupted)

Definition at line 150 of file CalibDB.cxx.

◆ readTempCalibParamSM()

TempCalibParamSM * CalibDB::readTempCalibParamSM ( ULong_t  timestamp,
const std::map< std::string, std::string > &  metadata 
)

Find temperature calibration coefficiencts per SM in the CCDB for given timestamp.

Parameters
timestampTimestamp used in query
metadataAdditional metadata to be used in the query
Exceptions
ObjectNotFoundExceptionif object is not found for the given timestamp
TypeMismatchExceptionif object is present but type is different (CCDB corrupted)

Definition at line 163 of file CalibDB.cxx.

◆ readTemperatureSensorData()

ElmbData * CalibDB::readTemperatureSensorData ( ULong_t  timestamp,
const std::map< std::string, std::string > &  metadata 
)

Find Temperature Sensor data in the CCDB for given timestamp.

Parameters
timestampTimestamp used in query
metadataAdditional metadata to be used in the query
Exceptions
ObjectNotFoundExceptionif object is not found for the given timestamp
TypeMismatchExceptionif object is present but type is different (CCDB corrupted)

Definition at line 215 of file CalibDB.cxx.

◆ readTimeCalibParam()

TimeCalibrationParams * CalibDB::readTimeCalibParam ( ULong_t  timestamp,
const std::map< std::string, std::string > &  metadata 
)

Find time calibration coefficiencts in the CCDB for given timestamp.

Parameters
timestampTimestamp used in query
metadataAdditional metadata to be used in the query
Exceptions
ObjectNotFoundExceptionif object is not found for the given timestamp
TypeMismatchExceptionif object is present but type is different (CCDB corrupted)

Definition at line 124 of file CalibDB.cxx.

◆ readTimeCalibParamL1Phase()

TimeCalibParamL1Phase * CalibDB::readTimeCalibParamL1Phase ( ULong_t  timestamp,
const std::map< std::string, std::string > &  metadata 
)

Find L1 phase shifts in the CCDB for given timestamp.

Parameters
timestampTimestamp used in query
metadataAdditional metadata to be used in the query
Exceptions
ObjectNotFoundExceptionif object is not found for the given timestamp
TypeMismatchExceptionif object is present but type is different (CCDB corrupted)

Definition at line 137 of file CalibDB.cxx.

◆ setServer()

void o2::emcal::CalibDB::setServer ( const std::string_view  server)
inline

Set new CCDB server URL.

Parameters
serverName of the CCDB server to be used in queries

Setting new CCDB server. Will require a re-init of the the CCDB handler the next time a store or read of any object is done.

Definition at line 326 of file CalibDB.h.

◆ storeBadChannelMap()

void CalibDB::storeBadChannelMap ( BadChannelMap bcm,
const std::map< std::string, std::string > &  metadata,
ULong_t  timestart,
ULong_t  timeend 
)

Store bad channel map in the CCDB.

Parameters
bcmBad channel map to be stored
metadataAdditional metadata that can be used in the query
timestartStart of the time range of the validity of the object
timeendEnd of the time range of the validity of the object

Definition at line 39 of file CalibDB.cxx.

◆ storeFeeDCSData()

void CalibDB::storeFeeDCSData ( FeeDCS dcs,
const std::map< std::string, std::string > &  metadata,
ULong_t  timestart,
ULong_t  timeend 
)

Store FEE DCS data in the CCDB.

Parameters
dcsFEE DCS data to be stored
metadataAdditional metadata that can be used in the query
timestartStart of the time range of the validity of the object
timeendEnd of the time range of the validity of the object

Definition at line 87 of file CalibDB.cxx.

◆ storeGainCalibFactors()

void CalibDB::storeGainCalibFactors ( GainCalibrationFactors gcf,
const std::map< std::string, std::string > &  metadata,
ULong_t  timestart,
ULong_t  timeend 
)

Store gain calibration factors in the CCDB.

Parameters
gcftemperature calibration coefficiencts to be stored
metadataAdditional metadata that can be used in the query
timestartStart of the time range of the validity of the object
timeendEnd of the time range of the validity of the object

Definition at line 79 of file CalibDB.cxx.

◆ storePedestalData()

void CalibDB::storePedestalData ( Pedestal pedestals,
const std::map< std::string, std::string > &  metadata,
ULong_t  timestart,
ULong_t  timeend 
)

Store pedestal data in the CCDB.

Parameters
pedestalsPedestal data to be stored
metadataAdditional metadata that can be used in the query
timestartStart of the time range of the validity of the object
timeendEnd of the time range of the validity of the object

Definition at line 103 of file CalibDB.cxx.

◆ storeTempCalibParam()

void CalibDB::storeTempCalibParam ( TempCalibrationParams tcp,
const std::map< std::string, std::string > &  metadata,
ULong_t  timestart,
ULong_t  timeend 
)

Store temperature calibration coefficiencts in the CCDB.

Parameters
tcptemperature calibration coefficiencts to be stored
metadataAdditional metadata that can be used in the query
timestartStart of the time range of the validity of the object
timeendEnd of the time range of the validity of the object

Definition at line 63 of file CalibDB.cxx.

◆ storeTempCalibParamSM()

void CalibDB::storeTempCalibParamSM ( TempCalibParamSM tcp,
const std::map< std::string, std::string > &  metadata,
ULong_t  timestart,
ULong_t  timeend 
)

Store temperature calibration coefficiencts per SM in the CCDB.

Parameters
tcptemperature calibration coefficiencts per SM to be stored
metadataAdditional metadata that can be used in the query
timestartStart of the time range of the validity of the object
timeendEnd of the time range of the validity of the object

Definition at line 71 of file CalibDB.cxx.

◆ storeTemperatureSensorData()

void CalibDB::storeTemperatureSensorData ( ElmbData dcs,
const std::map< std::string, std::string > &  metadata,
ULong_t  timestart,
ULong_t  timeend 
)

Store Temperature Sensor data in the CCDB.

Parameters
dcsTemperature Sensor data to be stored
metadataAdditional metadata that can be used in the query
timestartStart of the time range of the validity of the object
timeendEnd of the time range of the validity of the object

Definition at line 95 of file CalibDB.cxx.

◆ storeTimeCalibParam()

void CalibDB::storeTimeCalibParam ( TimeCalibrationParams tcp,
const std::map< std::string, std::string > &  metadata,
ULong_t  timestart,
ULong_t  timeend 
)

Store time calibration coefficiencts in the CCDB.

Parameters
tcptime calibration coefficiencts to be stored
metadataAdditional metadata that can be used in the query
timestartStart of the time range of the validity of the object
timeendEnd of the time range of the validity of the object

Definition at line 47 of file CalibDB.cxx.

◆ storeTimeCalibParamL1Phase()

void CalibDB::storeTimeCalibParamL1Phase ( TimeCalibParamL1Phase tcp,
const std::map< std::string, std::string > &  metadata,
ULong_t  timestart,
ULong_t  timeend 
)

Store L1 phase shifts in the CCDB.

Parameters
tcpL1 phase shifts to be stored
metadataAdditional metadata that can be used in the query
timestartStart of the time range of the validity of the object
timeendEnd of the time range of the validity of the object

Definition at line 55 of file CalibDB.cxx.


The documentation for this class was generated from the following files: