Belle II Software development
TOPCalTimebase Class Reference

Sample time calibration constants for all channels. More...

#include <TOPCalTimebase.h>

Inheritance diagram for TOPCalTimebase:

Public Member Functions

 TOPCalTimebase ()
 Default constructor.
 
 TOPCalTimebase (double syncTimeBase)
 Useful constructor.
 
 TOPCalTimebase (const TOPCalTimebase &timeBase)
 Copy constructor (since class includes pointers in its cache)
 
TOPCalTimebaseoperator= (const TOPCalTimebase &timeBase)
 Assignment operator.
 
 ~TOPCalTimebase ()
 Destructor.
 
void append (unsigned scrodID, unsigned channel, const std::vector< double > &sampleTimes, bool replace=true)
 Appends calibration of a single ASIC channel.
 
double getSyncTimeBase () const
 Returns sinchronization time base (width of 2 ASIC windows)
 
const std::vector< TOPSampleTimes > & getSampleTimes () const
 Returns all calibration constants.
 
const TOPSampleTimesgetSampleTimes (unsigned scrodID, unsigned channel) const
 Returns calibration constants for given SCROD and channel.
 
bool isAvailable (unsigned scrodID, unsigned channel) const
 Checks if calibration is available.
 

Private Member Functions

void createMap () const
 Creates a map in cache.
 
 ClassDef (TOPCalTimebase, 1)
 ClassDef.
 

Private Attributes

double m_syncTimeBase = 0
 synchronization time base (width of 2 ASIC windows)
 
std::vector< TOPSampleTimesm_sampleTimes
 calibration constants
 
std::map< unsigned, size_t > m_map
 cache for a map
 
TOPSampleTimesm_sampleTime = 0
 cache for default (equidistant) sample times
 

Detailed Description

Sample time calibration constants for all channels.

Definition at line 27 of file TOPCalTimebase.h.

Constructor & Destructor Documentation

◆ TOPCalTimebase() [1/3]

TOPCalTimebase ( )
inline

Default constructor.

Definition at line 33 of file TOPCalTimebase.h.

34 {}

◆ TOPCalTimebase() [2/3]

TOPCalTimebase ( double  syncTimeBase)
inlineexplicit

Useful constructor.

Parameters
syncTimeBasesinchronization time base (width of 2 ASIC windows)

Definition at line 40 of file TOPCalTimebase.h.

40 : m_syncTimeBase(syncTimeBase)
41 {}
double m_syncTimeBase
synchronization time base (width of 2 ASIC windows)

◆ TOPCalTimebase() [3/3]

TOPCalTimebase ( const TOPCalTimebase timeBase)
inline

Copy constructor (since class includes pointers in its cache)

Definition at line 46 of file TOPCalTimebase.h.

46 : TObject()
47 {
48 *this = timeBase;
49 m_map.clear();
50 m_sampleTime = 0;
51 }
TOPSampleTimes * m_sampleTime
cache for default (equidistant) sample times
std::map< unsigned, size_t > m_map
cache for a map

◆ ~TOPCalTimebase()

~TOPCalTimebase ( )
inline

Destructor.

Definition at line 71 of file TOPCalTimebase.h.

72 {
73 if (m_sampleTime) delete m_sampleTime;
74 }

Member Function Documentation

◆ getSampleTimes()

const std::vector< TOPSampleTimes > & getSampleTimes ( ) const
inline

Returns all calibration constants.

Returns
vector of calibration constants

Definition at line 97 of file TOPCalTimebase.h.

97{return m_sampleTimes;}
std::vector< TOPSampleTimes > m_sampleTimes
calibration constants

◆ getSyncTimeBase()

double getSyncTimeBase ( ) const
inline

Returns sinchronization time base (width of 2 ASIC windows)

Returns
sinchronization time base

Definition at line 91 of file TOPCalTimebase.h.

91{return m_syncTimeBase;}

◆ operator=()

TOPCalTimebase & operator= ( const TOPCalTimebase timeBase)
inline

Assignment operator.

Definition at line 56 of file TOPCalTimebase.h.

57 {
58 if (this != &timeBase) {
59 m_syncTimeBase = timeBase.getSyncTimeBase();
60 m_sampleTimes = timeBase.getSampleTimes();
61 m_map.clear();
62 if (m_sampleTime) delete m_sampleTime;
63 m_sampleTime = 0;
64 }
65 return *this;
66 }

Member Data Documentation

◆ m_map

std::map<unsigned, size_t> m_map
mutableprivate

cache for a map

Definition at line 129 of file TOPCalTimebase.h.

◆ m_sampleTime

TOPSampleTimes* m_sampleTime = 0
mutableprivate

cache for default (equidistant) sample times

Definition at line 132 of file TOPCalTimebase.h.

◆ m_sampleTimes

std::vector<TOPSampleTimes> m_sampleTimes
private

calibration constants

Definition at line 126 of file TOPCalTimebase.h.

◆ m_syncTimeBase

double m_syncTimeBase = 0
private

synchronization time base (width of 2 ASIC windows)

Definition at line 125 of file TOPCalTimebase.h.


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