ATLAS Offline Software
TileCalibUtils.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef TILECALIBBLOBOBJS_TILECALIBUTILS_H
6 #define TILECALIBBLOBOBJS_TILECALIBUTILS_H
7 
13 #include <string>
14 
16  public:
17 
21  static std::string getFullTag(const std::string& folder, const std::string& tag);
22 
27  static unsigned int getDrawerIdx(unsigned int ros, unsigned int drawer);
28 
32  static unsigned int getDrawerIdxFromFragId(unsigned int fragId);
33 
39  static unsigned int getChanIdx(unsigned int ros, unsigned int drawer, unsigned int channel);
40 
45  static unsigned int getChanIdx(unsigned int drawerIdx, unsigned int channel);
46 
51  static unsigned int getChanIdxFromFragId(unsigned int fragId, unsigned int channel);
52 
59  static unsigned int getAdcIdx(unsigned int ros, unsigned int drawer, unsigned int channel, unsigned int adc);
60 
66  static unsigned int getAdcIdx(unsigned int drawerIdx, unsigned int channel, unsigned int adc);
67 
73  static unsigned int getAdcIdxFromFragId(unsigned int fragId, unsigned int channel, unsigned int adc);
74 
78  static unsigned int getMaxDrawer(unsigned int ros);
79 
82  static unsigned int getCommentChannel(){return 1000;}
83 
85  static std::string getDrawerString(unsigned int ros, unsigned int drawer);
86 
89  static unsigned int getDefaultDrawerIdx(unsigned int drawerIdx);
90 
94  static unsigned int getDefaultDrawerIdx(unsigned int ros, unsigned int drawer);
95 
98  static unsigned int getFirstDrawerInPartitionIdx(unsigned int drawerIdx);
99 
103  static float fixedPointPrecision(float val, unsigned int nBits=16);
104 
106  static unsigned int max_ros() {return MAX_ROS;}
108  static unsigned int max_drawer() {return MAX_DRAWER;}
110  static unsigned int max_drawr0() {return MAX_DRAWR0;}
112  static unsigned int max_chan() {return MAX_CHAN;}
114  static unsigned int max_gain() {return MAX_GAIN;}
116  static unsigned int max_draweridx() {return MAX_DRAWERIDX;}
118  static unsigned int trips_draweridx() {return TRIPS_DRAWERIDX;}
120  static unsigned int trips_ros() {return TRIPS_ROS;}
122  static unsigned int trips_drawer() {return TRIPS_DRAWER;}
124  static unsigned int definitions_draweridx() {return DEFINITIONS_DRAWERIDX;}
126  static unsigned int bad_definition_chan() {return BAD_DEFINITION_CHAN;}
128  static unsigned int noisy_definition_chan() {return NOISY_DEFINITION_CHAN;}
130  static unsigned int nogainl1_definition_chan() {return NOGAINL1_DEFINITION_CHAN;}
132  static unsigned int badtiming_definition_chan() {return BADTIMING_DEFINITION_CHAN;}
134  static unsigned int wrongbcid_definition_chan() {return WRONGBCID_DEFINITION_CHAN;}
137 
138  static const unsigned int MAX_ROS = 5;
139  static const unsigned int MAX_DRAWER = 64;
140  static const unsigned int MAX_DRAWR0 = 20;
141  static const unsigned int MAX_CHAN = 48;
142  static const unsigned int MAX_GAIN = 2;
143  static const unsigned int MAX_DRAWERIDX = 276;
144  static const unsigned int LAS_PART_CHAN= 43;
145  static const unsigned int TRIPS_DRAWERIDX= 2;
146  static const unsigned int TRIPS_ROS = 0;
147  static const unsigned int TRIPS_DRAWER = 2;
148  static const unsigned int DEFINITIONS_DRAWERIDX = 1;
149  static const unsigned int BAD_DEFINITION_CHAN = 0;
150  static const unsigned int NOISY_DEFINITION_CHAN = 1;
151  static const unsigned int NOGAINL1_DEFINITION_CHAN = 2;
152  static const unsigned int BADTIMING_DEFINITION_CHAN = 3;
153  static const unsigned int WRONGBCID_DEFINITION_CHAN = 4;
154  static const unsigned int TIMINGDMUBCOFFSET_DEFINITION_CHAN = 5;
155  static const unsigned int MAX_MINIDRAWER = 4;
156  static const unsigned int MAX_MINIDRAWER_CHAN = 12;
157  static const unsigned int FELIX_FRAGID_OFFSET = 0x1000;
158 };
159 
160 #endif
TileCalibUtils::nogainl1_definition_chan
static unsigned int nogainl1_definition_chan()
Python compatibility function.
Definition: TileCalibUtils.h:130
TileCalibUtils::max_ros
static unsigned int max_ros()
Python compatibility function.
Definition: TileCalibUtils.h:106
TileCalibUtils::max_drawr0
static unsigned int max_drawr0()
Python compatibility function.
Definition: TileCalibUtils.h:110
TileCalibUtils::wrongbcid_definition_chan
static unsigned int wrongbcid_definition_chan()
Python compatibility function.
Definition: TileCalibUtils.h:134
TileCalibUtils::noisy_definition_chan
static unsigned int noisy_definition_chan()
Python compatibility function.
Definition: TileCalibUtils.h:128
TileCalibUtils::getMaxDrawer
static unsigned int getMaxDrawer(unsigned int ros)
Returns the maximal channel number for a given drawer.
Definition: TileCalibUtils.cxx:136
TileCalibUtils::MAX_MINIDRAWER_CHAN
static const unsigned int MAX_MINIDRAWER_CHAN
Number of channels in minidrawer.
Definition: TileCalibUtils.h:156
plotting.yearwise_efficiency.channel
channel
Definition: yearwise_efficiency.py:24
TileCalibUtils::badtiming_definition_chan
static unsigned int badtiming_definition_chan()
Python compatibility function.
Definition: TileCalibUtils.h:132
TileCalibUtils::trips_drawer
static unsigned int trips_drawer()
Python compatibility function.
Definition: TileCalibUtils.h:122
TileCalibUtils::MAX_DRAWERIDX
static const unsigned int MAX_DRAWERIDX
Maximal drawer index
Definition: TileCalibUtils.h:143
TileCalibUtils::max_drawer
static unsigned int max_drawer()
Python compatibility function.
Definition: TileCalibUtils.h:108
TileCalibUtils::getFirstDrawerInPartitionIdx
static unsigned int getFirstDrawerInPartitionIdx(unsigned int drawerIdx)
Returns the first drawer Idx in a partition of a given input drawer.
Definition: TileCalibUtils.cxx:253
TileCalibUtils
Static class providing several utility functions and constants.
Definition: TileCalibUtils.h:15
TileCalibUtils::TRIPS_DRAWER
static const unsigned int TRIPS_DRAWER
Drawer used for storing trips probabilities.
Definition: TileCalibUtils.h:147
TileCalibUtils::TRIPS_ROS
static const unsigned int TRIPS_ROS
Ros used for storing trips probabilities.
Definition: TileCalibUtils.h:146
TileCalibUtils::NOISY_DEFINITION_CHAN
static const unsigned int NOISY_DEFINITION_CHAN
Channel used for storing of noisy channel definitions.
Definition: TileCalibUtils.h:150
TileCalibUtils::bad_definition_chan
static unsigned int bad_definition_chan()
Python compatibility function.
Definition: TileCalibUtils.h:126
TileCalibUtils::TRIPS_DRAWERIDX
static const unsigned int TRIPS_DRAWERIDX
DrawerIdx used for storing trips probabilities.
Definition: TileCalibUtils.h:145
TileCalibUtils::timingdmubcoffset_definition_chan
static unsigned int timingdmubcoffset_definition_chan()
Python compatibility function.
Definition: TileCalibUtils.h:136
TileCalibUtils::max_gain
static unsigned int max_gain()
Python compatibility function.
Definition: TileCalibUtils.h:114
Example_ReadSampleNoise.drawer
drawer
Definition: Example_ReadSampleNoise.py:39
TileCalibUtils::TIMINGDMUBCOFFSET_DEFINITION_CHAN
static const unsigned int TIMINGDMUBCOFFSET_DEFINITION_CHAN
Channel used for storing of affected timing channel definitions.
Definition: TileCalibUtils.h:154
TileCalibUtils::definitions_draweridx
static unsigned int definitions_draweridx()
Python compatibility function.
Definition: TileCalibUtils.h:124
TileCalibUtils::MAX_DRAWER
static const unsigned int MAX_DRAWER
Number of drawers in ROS 1-4.
Definition: TileCalibUtils.h:139
TileCalibUtils::WRONGBCID_DEFINITION_CHAN
static const unsigned int WRONGBCID_DEFINITION_CHAN
Channel used for storing of wrong BCID channel definitions.
Definition: TileCalibUtils.h:153
TileCalibUtils::DEFINITIONS_DRAWERIDX
static const unsigned int DEFINITIONS_DRAWERIDX
Drawer used for storing of bad and noisy channel definitions.
Definition: TileCalibUtils.h:148
TileCalibUtils::BADTIMING_DEFINITION_CHAN
static const unsigned int BADTIMING_DEFINITION_CHAN
Channel used for storing of bad timing channel definitions.
Definition: TileCalibUtils.h:152
TileCalibUtils::getAdcIdxFromFragId
static unsigned int getAdcIdxFromFragId(unsigned int fragId, unsigned int channel, unsigned int adc)
Returns an ADC hash.
Definition: TileCalibUtils.cxx:127
TileCalibUtils::MAX_ROS
static const unsigned int MAX_ROS
Number of ROSs
Definition: TileCalibUtils.h:138
maskDeadModules.ros
ros
Definition: maskDeadModules.py:35
TileCalibUtils::trips_ros
static unsigned int trips_ros()
Python compatibility function.
Definition: TileCalibUtils.h:120
TileCalibUtils::getCommentChannel
static unsigned int getCommentChannel()
Returns the COOL channel number for the comment channel.
Definition: TileCalibUtils.h:82
TileCalibUtils::FELIX_FRAGID_OFFSET
static const unsigned int FELIX_FRAGID_OFFSET
Offset for frag ID used for FELIX in frag ID to ROB ID map.
Definition: TileCalibUtils.h:157
TileCalibUtils::max_draweridx
static unsigned int max_draweridx()
Python compatibility function.
Definition: TileCalibUtils.h:116
TileCalibUtils::getDefaultDrawerIdx
static unsigned int getDefaultDrawerIdx(unsigned int drawerIdx)
Returns the default drawer for a given input drawer.
Definition: TileCalibUtils.cxx:163
TileCalibUtils::getChanIdx
static unsigned int getChanIdx(unsigned int ros, unsigned int drawer, unsigned int channel)
Returns a channel hash.
Definition: TileCalibUtils.cxx:81
TileCalibUtils::getChanIdxFromFragId
static unsigned int getChanIdxFromFragId(unsigned int fragId, unsigned int channel)
Returns a channel hash.
Definition: TileCalibUtils.cxx:100
TileCalibUtils::getDrawerString
static std::string getDrawerString(unsigned int ros, unsigned int drawer)
Return the drawer name, e.g.
Definition: TileCalibUtils.cxx:145
ReadFloatFromCool.adc
adc
Definition: ReadFloatFromCool.py:48
Pythia8_RapidityOrderMPI.val
val
Definition: Pythia8_RapidityOrderMPI.py:14
TileCalibUtils::max_chan
static unsigned int max_chan()
Python compatibility function.
Definition: TileCalibUtils.h:112
TileCalibUtils::BAD_DEFINITION_CHAN
static const unsigned int BAD_DEFINITION_CHAN
Channel used for storing of bad channel definitions.
Definition: TileCalibUtils.h:149
TileCalibUtils::NOGAINL1_DEFINITION_CHAN
static const unsigned int NOGAINL1_DEFINITION_CHAN
Channel used for storing of NoGainLevel1 channel definitions.
Definition: TileCalibUtils.h:151
CaloCondBlobAlgs_fillNoiseFromASCII.folder
folder
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:56
TileCalibUtils::MAX_MINIDRAWER
static const unsigned int MAX_MINIDRAWER
Number of minidrawers.
Definition: TileCalibUtils.h:155
TileCalibUtils::getAdcIdx
static unsigned int getAdcIdx(unsigned int ros, unsigned int drawer, unsigned int channel, unsigned int adc)
Returns an ADC hash.
Definition: TileCalibUtils.cxx:109
TileCalibUtils::getDrawerIdx
static unsigned int getDrawerIdx(unsigned int ros, unsigned int drawer)
Returns a drawer hash.
Definition: TileCalibUtils.cxx:60
TileCalibUtils::fixedPointPrecision
static float fixedPointPrecision(float val, unsigned int nBits=16)
Returns the input in fixed point precision.
Definition: TileCalibUtils.cxx:268
CaloCondBlobAlgs_fillNoiseFromASCII.tag
string tag
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:24
TileCalibUtils::LAS_PART_CHAN
static const unsigned int LAS_PART_CHAN
Empty channel number to store laser partition variation.
Definition: TileCalibUtils.h:144
TileCalibUtils::MAX_CHAN
static const unsigned int MAX_CHAN
Number of channels in drawer.
Definition: TileCalibUtils.h:141
TileCalibUtils::getDrawerIdxFromFragId
static unsigned int getDrawerIdxFromFragId(unsigned int fragId)
Returns a drawer hash from fragId This function assumes drawer context (i.e.
Definition: TileCalibUtils.cxx:71
TileCalibUtils::trips_draweridx
static unsigned int trips_draweridx()
Python compatibility function.
Definition: TileCalibUtils.h:118
TileCalibUtils::MAX_DRAWR0
static const unsigned int MAX_DRAWR0
Number of drawers in ROS 0
Definition: TileCalibUtils.h:140
TileCalibUtils::getFullTag
static std::string getFullTag(const std::string &folder, const std::string &tag)
Returns the full tag string, composed of camelized folder name and tag part.
Definition: TileCalibUtils.cxx:33
TileCalibUtils::MAX_GAIN
static const unsigned int MAX_GAIN
Number of gains per channel
Definition: TileCalibUtils.h:142