MarlinTPC  1.2.0
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
tpcconddata::ChannelCorrection Class Reference

Class that combines information on ChannelCorrections for storage. More...

#include <ChannelCorrection.h>

Inheritance diagram for tpcconddata::ChannelCorrection:

Public Member Functions

 ChannelCorrection (int padID, int moduleID, int channelID, int readoutGroup, int quality, float calibrationValue, float timeOffset)
 Constructor which sets all values of the object at once. More...
 
 ChannelCorrection (int padID, int moduleID, int channelID, int readoutGroup)
 Constructor wich only sets pad identifier by padID/moduleID and channelID/readouGroup. More...
 
 ChannelCorrection (EVENT::LCObject *obj)
 'Copy constructor' needed to interpret LCCollection read from file/database.
 
virtual ~ChannelCorrection ()
 Important for memory handling.
 
std::pair< int, int > getGearID () const
 Returns a pair of integers of which the first element ist the pad ID and the second element the module ID as given in Gear. More...
 
std::pair< int, int > getHardwareID () const
 Returns a pair of integers of which the first element ist the channel ID and the second element the readout group as given from the readout electronics. More...
 
float getCalibrationFactor () const
 Get gain calibration factor, should be given in the way, that if you divide the recorded charge by this number, the correct charge will result.
 
float getTimeOffset () const
 time offset should be given in the way, that if you subtract this value from the recorded pulse time the correct one will result
 
int getQuality () const
 
bool isDead ()
 
bool isNoisy ()
 
bool isAddonBitASet ()
 One of two not predefined quality bits.
 
bool isAddonBitBSet ()
 One of two not predefined quality bits.
 
void setCalibrationFactor (float calibrationValue)
 Get gain calibration factor, should be given in the way, that if you divide the recorded charge by this number, the correct charge will result.
 
void setTimeOffset (float timeOffset)
 time offset should be given in the way, that if you subtract this value from the recorded pulse time the correct one will result
 
void setQuality (int quality)
 
void setIsDead (bool toggle)
 
void setIsNoisy (bool toggle)
 
void setAddonBitA (bool toggle)
 Sets the first of two not predefined quality bits.
 
void setAddonBitB (bool toggle)
 Sets the second of two not predefined quality bits.
 
void print (std::ostream &os=std::cout) const
 
const std::string getTypeName () const
 
const std::string getDataDescription () const
 

Static Public Member Functions

static std::string getRevision ()
 
static std::string getDefaultColName ()
 

Protected Member Functions

void setGearID (int padID, int moduleID)
 
void setHardwareID (int channelID, int readoutGroup)
 

Protected Attributes

std::bitset< 4 > _qualityBit
 

Detailed Description

Class that combines information on ChannelCorrections for storage.

The pad ID and the readout module ID (Gear) as well as the channel ID and readout unit (hardware) are stored. In addition channel correction and status values are stored into a single object of type LCFixedObject. This object can be used to be stored in a LCCollectionVec for conditions data. Values stored besides the idetifiers are gain calibration factor (default: 1.0), time offset (default: 0.0), and a quality bit (as integer) with (from "left to right") the first bit to mark dead channels, the second for noisy channels and two additional ones for free use.

Author
R. Diener (DESY)

Constructor & Destructor Documentation

tpcconddata::ChannelCorrection::ChannelCorrection ( int  padID,
int  moduleID,
int  channelID,
int  readoutGroup,
int  quality,
float  calibrationValue,
float  timeOffset 
)

Constructor which sets all values of the object at once.

If padID/moduleID or channelID/readouGroup are unknown, set them to -1. In this case, an tpcconddata::ConditionsObjectException if tried to access these values.

References setCalibrationFactor(), and setTimeOffset().

tpcconddata::ChannelCorrection::ChannelCorrection ( int  padID,
int  moduleID,
int  channelID,
int  readoutGroup 
)

Constructor wich only sets pad identifier by padID/moduleID and channelID/readouGroup.

If padID/moduleID or channelID/readouGroup are unknown, set them to -1. In this case, an tpcconddata::ConditionsObjectException if tried to access these values. Automatically set are: Quality=0, calibration=1.0, time offset=0.0.

References setCalibrationFactor(), and setTimeOffset().

Member Function Documentation

std::pair< int, int > tpcconddata::ChannelCorrection::getGearID ( ) const

Returns a pair of integers of which the first element ist the pad ID and the second element the module ID as given in Gear.

If the number "-1" is stored for one these (placeholder for unknown), a tpcconddata::ConditionsObjectException is thrown

Referenced by marlintpc::ChannelCorrectionListener::getGearMapping().

std::pair< int, int > tpcconddata::ChannelCorrection::getHardwareID ( ) const

Returns a pair of integers of which the first element ist the channel ID and the second element the readout group as given from the readout electronics.

If the number "-1" is stored for one these (placeholder for unknown), a tpcconddata::ConditionsObjectException is thrown

Referenced by marlintpc::ChannelCorrectionListener::getHardwareMapping().


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