Project
Loading...
Searching...
No Matches
o2::tpc::CDBInterface Class Reference

#include <CDBInterface.h>

Public Types

using CalPadMapType = std::unordered_map< std::string, CalPad >
 
using CalPadFlagType = CalDet< PadFlags >
 

Public Member Functions

 CDBInterface (const CDBInterface &)=delete
 
const CalPadgetPedestals ()
 
const CalPadgetPedestalsCRU ()
 
const CalPadgetNoise ()
 
const CalPadgetZeroSuppressionThreshold ()
 Return the zero suppression threshold map.
 
const CalPadgetGainMap ()
 
const CalPadgetITFraction ()
 
const CalPadgetITExpLambda ()
 
const CalPadgetCMkValues ()
 
const CalPadFlagTypegetPadFlags ()
 Pad status flags from IDCs.
 
const FEEConfiggetFEEConfig ()
 Return FEEConfig.
 
DeadChannelMapCreatorgetDeadChannelMapCreator ()
 Dead channel map creator.
 
const CalDet< bool > & getDeadChannelMap ()
 Dead channel map.
 
const ParameterDetectorgetParameterDetector ()
 
const ParameterElectronicsgetParameterElectronics ()
 
const ParameterGasgetParameterGas ()
 
const ParameterGEMgetParameterGEM ()
 
const CalPadgetCalPad (const std::string_view path)
 
template<typename T >
T & getSpecificObjectFromCDB (const std::string_view path, long timestamp=-1, const std::map< std::string, std::string > &metaData=std::map< std::string, std::string >())
 
template<typename T >
T & getObjectFromCDB (std::string_view path)
 read an object from CCDB
 
void setPedestalsAndNoiseFromFile (const std::string_view fileName)
 
void setGainMapFromFile (const std::string_view fileName)
 
void setThresholdMapFromFile (const std::string_view fileName)
 
void setFEEParamsFromFile (const std::string_view fileName)
 
void setUseDefaults (bool defaults=true)
 
bool getUseDefaults () const
 return defaults usage
 
void setTimeStamp (long time)
 set CDB time stamp for object retrieval
 
void setURL (const std::string_view url)
 set CCDB URL
 
void setDefaultZSsigma (float zs)
 
void resetLocalCalibration ()
 Reset the local calibration.
 

Static Public Member Functions

static CDBInterfaceinstance ()
 

Detailed Description

The class provides a simple interface to the CDB for the TPC specific objects. It will not take ownership of the objects, but will leave this to the CDB itself. This class is used in the simulation and reconstruction as a singleton. For local tests it offers the possibility to return default values. To use this one needs to call

CDBInterface::instance().setUseDefaults();

at some point. It also allows to specifically load pedestals and noise from a file using the

loadNoiseAndPedestalFromFile(...)

function

Definition at line 65 of file CDBInterface.h.

Member Typedef Documentation

◆ CalPadFlagType

◆ CalPadMapType

using o2::tpc::CDBInterface::CalPadMapType = std::unordered_map<std::string, CalPad>

Definition at line 68 of file CDBInterface.h.

Constructor & Destructor Documentation

◆ CDBInterface()

o2::tpc::CDBInterface::CDBInterface ( const CDBInterface )
delete

Member Function Documentation

◆ getCalPad()

const CalPad & CDBInterface::getCalPad ( const std::string_view  path)

Return a CalPad object form the CCDB Deprecated

Definition at line 343 of file CDBInterface.cxx.

◆ getCMkValues()

const CalPad & CDBInterface::getCMkValues ( )

Return the common mode per pad values

Returns
common mode per pad values

Definition at line 227 of file CDBInterface.cxx.

◆ getDeadChannelMap()

const CalDet< bool > & CDBInterface::getDeadChannelMap ( )

Dead channel map.

Definition at line 270 of file CDBInterface.cxx.

◆ getDeadChannelMapCreator()

DeadChannelMapCreator & o2::tpc::CDBInterface::getDeadChannelMapCreator ( )
inline

Dead channel map creator.

Definition at line 132 of file CDBInterface.h.

◆ getFEEConfig()

const FEEConfig & CDBInterface::getFEEConfig ( )

Return FEEConfig.

Definition at line 280 of file CDBInterface.cxx.

◆ getGainMap()

const CalPad & CDBInterface::getGainMap ( )

Return the gain map object

The function checks if the object is already loaded and returns it otherwise the object will be loaded first depending on the configuration

Returns
gain map object

Definition at line 155 of file CDBInterface.cxx.

◆ getITExpLambda()

const CalPad & CDBInterface::getITExpLambda ( )

Return the ion tail exponential decay parameter

Returns
ion tail exponential decay parameter

Definition at line 203 of file CDBInterface.cxx.

◆ getITFraction()

const CalPad & CDBInterface::getITFraction ( )

Return the ion tail coupling fraction

Returns
ion tail fraction

Definition at line 179 of file CDBInterface.cxx.

◆ getNoise()

const CalPad & CDBInterface::getNoise ( )

Return the noise object

The function checks if the object is already loaded and returns it otherwise the object will be loaded first depending on the configuration

Returns
noise object

Definition at line 107 of file CDBInterface.cxx.

◆ getObjectFromCDB()

template<typename T >
T & o2::tpc::CDBInterface::getObjectFromCDB ( std::string_view  path)
inline

read an object from CCDB

Get an object from the CCDB.

Template Parameters
T
Parameters
path
Returns
The object from the CCDB, ownership is transferred to the caller.
Todo:
Consider removing in favour of calling directly the manager::get method.

Definition at line 296 of file CDBInterface.h.

◆ getPadFlags()

const CDBInterface::CalPadFlagType & CDBInterface::getPadFlags ( )

Pad status flags from IDCs.

Definition at line 251 of file CDBInterface.cxx.

◆ getParameterDetector()

const ParameterDetector & CDBInterface::getParameterDetector ( )

Return the Detector parameters

The function checks if the object is already loaded and returns it otherwise the object will be loaded first depending on the configuration

Returns
Detector parameters

Definition at line 299 of file CDBInterface.cxx.

◆ getParameterElectronics()

const ParameterElectronics & CDBInterface::getParameterElectronics ( )

Return the Electronics parameters

The function checks if the object is already loaded and returns it otherwise the object will be loaded first depending on the configuration

Returns
Electronics parameters

Definition at line 310 of file CDBInterface.cxx.

◆ getParameterGas()

const ParameterGas & CDBInterface::getParameterGas ( )

Return the Gas parameters

The function checks if the object is already loaded and returns it otherwise the object will be loaded first depending on the configuration

Returns
Gas parameters

Definition at line 321 of file CDBInterface.cxx.

◆ getParameterGEM()

const ParameterGEM & CDBInterface::getParameterGEM ( )

Return the GEM parameters

The function checks if the object is already loaded and returns it otherwise the object will be loaded first depending on the configuration

Returns
GEM parameters

Definition at line 332 of file CDBInterface.cxx.

◆ getPedestals()

const CalPad & CDBInterface::getPedestals ( )

Return the pedestal object

The function checks if the object is already loaded and returns it otherwise the object will be loaded first depending on the configuration

Returns
pedestal object

Definition at line 59 of file CDBInterface.cxx.

◆ getPedestalsCRU()

const CalPad & CDBInterface::getPedestalsCRU ( )

Return the pedestal object with 10+2bit precision as used in the CRU

Returns
pedestal object as used in the CRU

Definition at line 83 of file CDBInterface.cxx.

◆ getSpecificObjectFromCDB()

template<typename T >
template LtrCalibData & o2::tpc::CDBInterface::getSpecificObjectFromCDB ( const std::string_view  path,
long  timestamp = -1,
const std::map< std::string, std::string > &  metaData = std::map< std::string, std::string >() 
)
inline

Return any templated object

The function returns the object stored at the given path, timestamp and metaData in the CCDB

Returns
object

Get a CalPad object stored in templated formats from the CCDB.

Template Parameters
T
Parameters
path
timestamp
metaData
Returns
The object from the CCDB, ownership is transferred to the caller.
Todo:
Consider removing in favour of calling directly the manager::get method.

Definition at line 314 of file CDBInterface.h.

◆ getUseDefaults()

bool o2::tpc::CDBInterface::getUseDefaults ( ) const
inline

return defaults usage

Definition at line 214 of file CDBInterface.h.

◆ getZeroSuppressionThreshold()

const CalPad & CDBInterface::getZeroSuppressionThreshold ( )

Return the zero suppression threshold map.

Definition at line 131 of file CDBInterface.cxx.

◆ instance()

static CDBInterface & o2::tpc::CDBInterface::instance ( )
inlinestatic

Create instance of singleton

Returns
singleton instance

Definition at line 75 of file CDBInterface.h.

◆ resetLocalCalibration()

void o2::tpc::CDBInterface::resetLocalCalibration ( )
inline

Reset the local calibration.

Definition at line 239 of file CDBInterface.h.

◆ setDefaultZSsigma()

void o2::tpc::CDBInterface::setDefaultZSsigma ( float  zs)
inline

set the Zero suppression threshold in sigma of noise in case the default object is created and not loaded from file or ccdb

Definition at line 233 of file CDBInterface.h.

◆ setFEEParamsFromFile()

void o2::tpc::CDBInterface::setFEEParamsFromFile ( const std::string_view  fileName)
inline

Set FEE parameters from file

This assumes that the objects are stored under the name 'fraction,expLambda'

Parameters
fileNamename of the file containing the ion tail parameters

Definition at line 206 of file CDBInterface.h.

◆ setGainMapFromFile()

void o2::tpc::CDBInterface::setGainMapFromFile ( const std::string_view  fileName)
inline

Set gain map from file

This assumes that the objects is stored under the name 'Gain'

Parameters
fileNamename of the file containing gain map

Definition at line 192 of file CDBInterface.h.

◆ setPedestalsAndNoiseFromFile()

void o2::tpc::CDBInterface::setPedestalsAndNoiseFromFile ( const std::string_view  fileName)
inline

Set noise and pedestal object from file

This assumes that the objects are stored under the name 'Pedestals' and 'Noise', respectively

Parameters
fileNamename of the file containing pedestals and noise

Definition at line 185 of file CDBInterface.h.

◆ setThresholdMapFromFile()

void o2::tpc::CDBInterface::setThresholdMapFromFile ( const std::string_view  fileName)
inline

Set zero suppression thresholds from file (will load all FEE params)

This assumes that the objects is stored under the name 'ThresholdMap'

Parameters
fileNamename of the file containing the threshold map

Definition at line 199 of file CDBInterface.h.

◆ setTimeStamp()

void o2::tpc::CDBInterface::setTimeStamp ( long  time)
inline

set CDB time stamp for object retrieval

Definition at line 217 of file CDBInterface.h.

◆ setURL()

void o2::tpc::CDBInterface::setURL ( const std::string_view  url)
inline

set CCDB URL

Definition at line 224 of file CDBInterface.h.

◆ setUseDefaults()

void o2::tpc::CDBInterface::setUseDefaults ( bool  defaults = true)
inline

Force using default values instead of reading the CCDB

Parameters
defaultswitch if to use default values

Definition at line 211 of file CDBInterface.h.


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