ATLAS Offline Software
Loading...
Searching...
No Matches
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
12
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;}
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
Static class providing several utility functions and constants.
static unsigned int getAdcIdx(unsigned int ros, unsigned int drawer, unsigned int channel, unsigned int adc)
Returns an ADC hash.
static const unsigned int MAX_DRAWERIDX
Maximal drawer index.
static const unsigned int MAX_ROS
Number of ROSs.
static unsigned int max_drawer()
Python compatibility function.
static const unsigned int NOGAINL1_DEFINITION_CHAN
Channel used for storing of NoGainLevel1 channel definitions.
static unsigned int nogainl1_definition_chan()
Python compatibility function.
static unsigned int max_gain()
Python compatibility function.
static const unsigned int LAS_PART_CHAN
Empty channel number to store laser partition variation.
static const unsigned int BADTIMING_DEFINITION_CHAN
Channel used for storing of bad timing channel definitions.
static unsigned int badtiming_definition_chan()
Python compatibility function.
static std::string getDrawerString(unsigned int ros, unsigned int drawer)
Return the drawer name, e.g.
static unsigned int max_chan()
Python compatibility function.
static unsigned int getDrawerIdxFromFragId(unsigned int fragId)
Returns a drawer hash from fragId This function assumes drawer context (i.e.
static unsigned int noisy_definition_chan()
Python compatibility function.
static const unsigned int WRONGBCID_DEFINITION_CHAN
Channel used for storing of wrong BCID channel definitions.
static const unsigned int TRIPS_ROS
Ros used for storing trips probabilities.
static float fixedPointPrecision(float val, unsigned int nBits=16)
Returns the input in fixed point precision.
static const unsigned int MAX_GAIN
Number of gains per channel.
static unsigned int getChanIdx(unsigned int ros, unsigned int drawer, unsigned int channel)
Returns a channel hash.
static const unsigned int FELIX_FRAGID_OFFSET
Offset for frag ID used for FELIX in frag ID to ROB ID map.
static unsigned int max_draweridx()
Python compatibility function.
static const unsigned int MAX_DRAWER
Number of drawers in ROS 1-4.
static const unsigned int NOISY_DEFINITION_CHAN
Channel used for storing of noisy channel definitions.
static unsigned int max_drawr0()
Python compatibility function.
static unsigned int max_ros()
Python compatibility function.
static unsigned int getDrawerIdx(unsigned int ros, unsigned int drawer)
Returns a drawer hash.
static unsigned int timingdmubcoffset_definition_chan()
Python compatibility function.
static unsigned int wrongbcid_definition_chan()
Python compatibility function.
static const unsigned int MAX_MINIDRAWER
Number of minidrawers.
static const unsigned int TRIPS_DRAWER
Drawer used for storing trips probabilities.
static unsigned int getFirstDrawerInPartitionIdx(unsigned int drawerIdx)
Returns the first drawer Idx in a partition of a given input drawer.
static unsigned int trips_draweridx()
Python compatibility function.
static unsigned int getMaxDrawer(unsigned int ros)
Returns the maximal channel number for a given drawer.
static const unsigned int MAX_MINIDRAWER_CHAN
Number of channels in minidrawer.
static const unsigned int TRIPS_DRAWERIDX
DrawerIdx used for storing trips probabilities.
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.
static unsigned int getAdcIdxFromFragId(unsigned int fragId, unsigned int channel, unsigned int adc)
Returns an ADC hash.
static const unsigned int DEFINITIONS_DRAWERIDX
Drawer used for storing of bad and noisy channel definitions.
static unsigned int getCommentChannel()
Returns the COOL channel number for the comment channel.
static unsigned int getDefaultDrawerIdx(unsigned int drawerIdx)
Returns the default drawer for a given input drawer.
static unsigned int definitions_draweridx()
Python compatibility function.
static unsigned int bad_definition_chan()
Python compatibility function.
static const unsigned int MAX_CHAN
Number of channels in drawer.
static const unsigned int TIMINGDMUBCOFFSET_DEFINITION_CHAN
Channel used for storing of affected timing channel definitions.
static unsigned int trips_ros()
Python compatibility function.
static const unsigned int BAD_DEFINITION_CHAN
Channel used for storing of bad channel definitions.
static unsigned int getChanIdxFromFragId(unsigned int fragId, unsigned int channel)
Returns a channel hash.
static unsigned int trips_drawer()
Python compatibility function.
static const unsigned int MAX_DRAWR0
Number of drawers in ROS 0.