Project
Loading...
Searching...
No Matches
o2::tof::CalibTOFapi Class Reference

#include <CalibTOFapi.h>

Public Types

enum  DRMcodes {
  DRM_HEADER_MISSING = o2::tof::diagnostic::DRM_HEADER_MISSING >> DRM_ERRINDEX_SHIFT , DRM_TRAILER_MISSING = o2::tof::diagnostic::DRM_TRAILER_MISSING >> DRM_ERRINDEX_SHIFT , DRM_FEEID_MISMATCH = o2::tof::diagnostic::DRM_FEEID_MISMATCH >> DRM_ERRINDEX_SHIFT , DRM_ORBIT_MISMATCH = o2::tof::diagnostic::DRM_ORBIT_MISMATCH >> DRM_ERRINDEX_SHIFT ,
  DRM_CRC_MISMATCH = o2::tof::diagnostic::DRM_CRC_MISMATCH >> DRM_ERRINDEX_SHIFT , DRM_ENAPARTMASK_DIFFER = o2::tof::diagnostic::DRM_ENAPARTMASK_DIFFER >> DRM_ERRINDEX_SHIFT , DRM_CLOCKSTATUS_WRONG = o2::tof::diagnostic::DRM_CLOCKSTATUS_WRONG >> DRM_ERRINDEX_SHIFT , DRM_FAULTSLOTMASK_NOTZERO = o2::tof::diagnostic::DRM_FAULTSLOTMASK_NOTZERO >> DRM_ERRINDEX_SHIFT ,
  DRM_READOUTTIMEOUT_NOTZERO = o2::tof::diagnostic::DRM_READOUTTIMEOUT_NOTZERO >> DRM_ERRINDEX_SHIFT , DRM_EVENTWORDS_MISMATCH = o2::tof::diagnostic::DRM_EVENTWORDS_MISMATCH >> DRM_ERRINDEX_SHIFT , DRM_DIAGNOSTIC_SPARE1 = o2::tof::diagnostic::DRM_DIAGNOSTIC_SPARE1 >> DRM_ERRINDEX_SHIFT , DRM_DECODE_ERROR = o2::tof::diagnostic::DRM_DECODE_ERROR >> DRM_ERRINDEX_SHIFT ,
  N_DRM_ERRORS = 12
}
 

Public Member Functions

void resetDia ()
 
 CalibTOFapi ()=default
 
 CalibTOFapi (const std::string url)
 
 CalibTOFapi (long timestamp, o2::dataformats::CalibLHCphaseTOF *phase, o2::dataformats::CalibTimeSlewingParamTOF *slew, Diagnostic *dia=nullptr, Diagnostic *diaDRM=nullptr)
 
 ~CalibTOFapi ()
 
void setTimeStamp (long t)
 
void setURL (const std::string url)
 
void readLHCphase ()
 
void readTimeSlewingParam ()
 
void readTimeSlewingParamFromFile (const char *filename)
 
void readDiagnosticFrequencies ()
 
void loadDiagnosticFrequencies ()
 
void readDiagnosticDRMFrequencies ()
 
void loadDiagnosticDRMFrequencies ()
 
void readActiveMap ()
 
void loadActiveMap (TOFFEElightInfo *fee)
 
void writeLHCphase (LhcPhase *phase, std::map< std::string, std::string > metadataLHCphase, uint64_t minTimeSTamp, uint64_t maxTimeStamp)
 
void writeTimeSlewingParam (SlewParam *param, std::map< std::string, std::string > metadataChannelCalib, uint64_t minTimeSTamp, uint64_t maxTimeStamp=0)
 
float getTimeCalibration (int ich, float tot) const
 
float getTimeCalibration (int ich, float tot, float phase) const
 
float getTimeDecalibration (int ich, float tot) const
 
bool isProblematic (int ich)
 
bool isNoisy (int ich)
 
bool isOff (int ich)
 
float getFractionUnderPeak (int ich) const
 
float currentLHCphase () const
 
SlewParamgetSlewParam ()
 
SlewParamgetSlewParamObj ()
 
void setSlewParam (SlewParam *obj)
 
LhcPhasegetLhcPhase ()
 
void setLhcPhase (LhcPhase *obj)
 
DiagnosticgetDiagnostic ()
 
void setDiagnostic (Diagnostic *obj)
 
DiagnosticgetDiagnosticDRM ()
 
void setDiagnosticDRM (Diagnostic *obj)
 
int getNoisyThreshold () const
 
void setNoisyThreshold (int val)
 
float getEmptyTOFProb () const
 
const float * getEmptyCratesProb () const
 
const std::vector< std::pair< int, float > > & getNoisyProb () const
 
const std::vector< std::pair< int, float > > & getTRMerrorProb () const
 
const std::vector< int > & getTRMmask () const
 
void resetTRMErrors ()
 
void processError (int crate, int trm, int mask)
 
bool isChannelError (int channel) const
 
bool checkTRMPolicy (int mask) const
 
void resetDRMErrors ()
 
void processErrorDRM (int crate, int codeErr)
 
bool isChannelDRMError (int channel) const
 
bool checkDRMPolicy (int mask) const
 
void setDRMCriticalErrorMask (uint32_t val)
 
uint32_t getDRMCriticalErrorMask () const
 
float getDRMprobError (int crate, int type) const
 

Static Public Member Functions

static o2::tof::Diagnostic doDRMerrCalibFromQCHisto (const TH2F *histo, const char *file_output_name)
 

Static Public Attributes

static const int DRM_ERRINDEX_SHIFT = 4
 

Detailed Description

Definition at line 35 of file CalibTOFapi.h.

Member Enumeration Documentation

◆ DRMcodes

Enumerator
DRM_HEADER_MISSING 
DRM_TRAILER_MISSING 
DRM_FEEID_MISMATCH 
DRM_ORBIT_MISMATCH 
DRM_CRC_MISMATCH 
DRM_ENAPARTMASK_DIFFER 
DRM_CLOCKSTATUS_WRONG 
DRM_FAULTSLOTMASK_NOTZERO 
DRM_READOUTTIMEOUT_NOTZERO 
DRM_EVENTWORDS_MISMATCH 
DRM_DIAGNOSTIC_SPARE1 
DRM_DECODE_ERROR 
N_DRM_ERRORS 

Definition at line 128 of file CalibTOFapi.h.

Constructor & Destructor Documentation

◆ CalibTOFapi() [1/3]

o2::tof::CalibTOFapi::CalibTOFapi ( )
default

◆ CalibTOFapi() [2/3]

CalibTOFapi::CalibTOFapi ( const std::string  url)

Definition at line 58 of file CalibTOFapi.cxx.

◆ CalibTOFapi() [3/3]

o2::tof::CalibTOFapi::CalibTOFapi ( long  timestamp,
o2::dataformats::CalibLHCphaseTOF phase,
o2::dataformats::CalibTimeSlewingParamTOF slew,
Diagnostic dia = nullptr,
Diagnostic diaDRM = nullptr 
)
inline

Definition at line 49 of file CalibTOFapi.h.

◆ ~CalibTOFapi()

o2::tof::CalibTOFapi::~CalibTOFapi ( )
inline

Definition at line 50 of file CalibTOFapi.h.

Member Function Documentation

◆ checkDRMPolicy()

bool CalibTOFapi::checkDRMPolicy ( int  mask) const

Definition at line 467 of file CalibTOFapi.cxx.

◆ checkTRMPolicy()

bool CalibTOFapi::checkTRMPolicy ( int  mask) const

Definition at line 460 of file CalibTOFapi.cxx.

◆ currentLHCphase()

float o2::tof::CalibTOFapi::currentLHCphase ( ) const
inline

Definition at line 93 of file CalibTOFapi.h.

◆ doDRMerrCalibFromQCHisto()

o2::tof::Diagnostic CalibTOFapi::doDRMerrCalibFromQCHisto ( const TH2F *  histo,
const char file_output_name 
)
static

Definition at line 20 of file CalibTOFapi.cxx.

◆ getDiagnostic()

Diagnostic * o2::tof::CalibTOFapi::getDiagnostic ( )
inline

Definition at line 100 of file CalibTOFapi.h.

◆ getDiagnosticDRM()

Diagnostic * o2::tof::CalibTOFapi::getDiagnosticDRM ( )
inline

Definition at line 102 of file CalibTOFapi.h.

◆ getDRMCriticalErrorMask()

uint32_t o2::tof::CalibTOFapi::getDRMCriticalErrorMask ( ) const
inline

Definition at line 123 of file CalibTOFapi.h.

◆ getDRMprobError()

float o2::tof::CalibTOFapi::getDRMprobError ( int  crate,
int  type 
) const
inline

Definition at line 124 of file CalibTOFapi.h.

◆ getEmptyCratesProb()

const float * o2::tof::CalibTOFapi::getEmptyCratesProb ( ) const
inline

Definition at line 108 of file CalibTOFapi.h.

◆ getEmptyTOFProb()

float o2::tof::CalibTOFapi::getEmptyTOFProb ( ) const
inline

Definition at line 107 of file CalibTOFapi.h.

◆ getFractionUnderPeak()

float o2::tof::CalibTOFapi::getFractionUnderPeak ( int  ich) const
inline

Definition at line 92 of file CalibTOFapi.h.

◆ getLhcPhase()

LhcPhase * o2::tof::CalibTOFapi::getLhcPhase ( )
inline

Definition at line 98 of file CalibTOFapi.h.

◆ getNoisyProb()

const std::vector< std::pair< int, float > > & o2::tof::CalibTOFapi::getNoisyProb ( ) const
inline

Definition at line 109 of file CalibTOFapi.h.

◆ getNoisyThreshold()

int o2::tof::CalibTOFapi::getNoisyThreshold ( ) const
inline

Definition at line 105 of file CalibTOFapi.h.

◆ getSlewParam()

SlewParam * o2::tof::CalibTOFapi::getSlewParam ( )
inline

Definition at line 95 of file CalibTOFapi.h.

◆ getSlewParamObj()

SlewParam & o2::tof::CalibTOFapi::getSlewParamObj ( )
inline

Definition at line 96 of file CalibTOFapi.h.

◆ getTimeCalibration() [1/2]

float CalibTOFapi::getTimeCalibration ( int  ich,
float  tot 
) const

Definition at line 340 of file CalibTOFapi.cxx.

◆ getTimeCalibration() [2/2]

float CalibTOFapi::getTimeCalibration ( int  ich,
float  tot,
float  phase 
) const

Definition at line 362 of file CalibTOFapi.cxx.

◆ getTimeDecalibration()

float CalibTOFapi::getTimeDecalibration ( int  ich,
float  tot 
) const

Definition at line 384 of file CalibTOFapi.cxx.

◆ getTRMerrorProb()

const std::vector< std::pair< int, float > > & o2::tof::CalibTOFapi::getTRMerrorProb ( ) const
inline

Definition at line 110 of file CalibTOFapi.h.

◆ getTRMmask()

const std::vector< int > & o2::tof::CalibTOFapi::getTRMmask ( ) const
inline

Definition at line 111 of file CalibTOFapi.h.

◆ isChannelDRMError()

bool CalibTOFapi::isChannelDRMError ( int  channel) const

Definition at line 481 of file CalibTOFapi.cxx.

◆ isChannelError()

bool CalibTOFapi::isChannelError ( int  channel) const

Definition at line 474 of file CalibTOFapi.cxx.

◆ isNoisy()

bool CalibTOFapi::isNoisy ( int  ich)

Definition at line 326 of file CalibTOFapi.cxx.

◆ isOff()

bool CalibTOFapi::isOff ( int  ich)

Definition at line 333 of file CalibTOFapi.cxx.

◆ isProblematic()

bool CalibTOFapi::isProblematic ( int  ich)

Definition at line 315 of file CalibTOFapi.cxx.

◆ loadActiveMap()

void CalibTOFapi::loadActiveMap ( TOFFEElightInfo fee)

Definition at line 76 of file CalibTOFapi.cxx.

◆ loadDiagnosticDRMFrequencies()

void CalibTOFapi::loadDiagnosticDRMFrequencies ( )

Definition at line 254 of file CalibTOFapi.cxx.

◆ loadDiagnosticFrequencies()

void CalibTOFapi::loadDiagnosticFrequencies ( )

Definition at line 167 of file CalibTOFapi.cxx.

◆ processError()

void CalibTOFapi::processError ( int  crate,
int  trm,
int  mask 
)

Definition at line 416 of file CalibTOFapi.cxx.

◆ processErrorDRM()

void CalibTOFapi::processErrorDRM ( int  crate,
int  codeErr 
)

Definition at line 434 of file CalibTOFapi.cxx.

◆ readActiveMap()

void CalibTOFapi::readActiveMap ( )

Definition at line 66 of file CalibTOFapi.cxx.

◆ readDiagnosticDRMFrequencies()

void CalibTOFapi::readDiagnosticDRMFrequencies ( )

Definition at line 156 of file CalibTOFapi.cxx.

◆ readDiagnosticFrequencies()

void CalibTOFapi::readDiagnosticFrequencies ( )

Definition at line 144 of file CalibTOFapi.cxx.

◆ readLHCphase()

void CalibTOFapi::readLHCphase ( )

Definition at line 96 of file CalibTOFapi.cxx.

◆ readTimeSlewingParam()

void CalibTOFapi::readTimeSlewingParam ( )

Definition at line 114 of file CalibTOFapi.cxx.

◆ readTimeSlewingParamFromFile()

void CalibTOFapi::readTimeSlewingParamFromFile ( const char filename)

Definition at line 132 of file CalibTOFapi.cxx.

◆ resetDia()

void CalibTOFapi::resetDia ( )

Definition at line 48 of file CalibTOFapi.cxx.

◆ resetDRMErrors()

void CalibTOFapi::resetDRMErrors ( )

Definition at line 405 of file CalibTOFapi.cxx.

◆ resetTRMErrors()

void CalibTOFapi::resetTRMErrors ( )

Definition at line 394 of file CalibTOFapi.cxx.

◆ setDiagnostic()

void o2::tof::CalibTOFapi::setDiagnostic ( Diagnostic obj)
inline

Definition at line 101 of file CalibTOFapi.h.

◆ setDiagnosticDRM()

void o2::tof::CalibTOFapi::setDiagnosticDRM ( Diagnostic obj)
inline

Definition at line 103 of file CalibTOFapi.h.

◆ setDRMCriticalErrorMask()

void o2::tof::CalibTOFapi::setDRMCriticalErrorMask ( uint32_t  val)
inline

Definition at line 122 of file CalibTOFapi.h.

◆ setLhcPhase()

void o2::tof::CalibTOFapi::setLhcPhase ( LhcPhase obj)
inline

Definition at line 99 of file CalibTOFapi.h.

◆ setNoisyThreshold()

void o2::tof::CalibTOFapi::setNoisyThreshold ( int  val)
inline

Definition at line 106 of file CalibTOFapi.h.

◆ setSlewParam()

void o2::tof::CalibTOFapi::setSlewParam ( SlewParam obj)
inline

Definition at line 97 of file CalibTOFapi.h.

◆ setTimeStamp()

void o2::tof::CalibTOFapi::setTimeStamp ( long  t)
inline

Definition at line 66 of file CalibTOFapi.h.

◆ setURL()

void o2::tof::CalibTOFapi::setURL ( const std::string  url)
inline

Definition at line 70 of file CalibTOFapi.h.

◆ writeLHCphase()

void CalibTOFapi::writeLHCphase ( LhcPhase phase,
std::map< std::string, std::string >  metadataLHCphase,
uint64_t  minTimeSTamp,
uint64_t  maxTimeStamp 
)

Definition at line 285 of file CalibTOFapi.cxx.

◆ writeTimeSlewingParam()

void CalibTOFapi::writeTimeSlewingParam ( SlewParam param,
std::map< std::string, std::string >  metadataChannelCalib,
uint64_t  minTimeSTamp,
uint64_t  maxTimeStamp = 0 
)

Definition at line 298 of file CalibTOFapi.cxx.

Member Data Documentation

◆ DRM_ERRINDEX_SHIFT

const int o2::tof::CalibTOFapi::DRM_ERRINDEX_SHIFT = 4
static

Definition at line 127 of file CalibTOFapi.h.


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