CMS 3D CMS Logo

Phase2TrackerModule.h
Go to the documentation of this file.
1 #ifndef CondFormats_SiStripObjects_Phase2TrackerModule_H
2 #define CondFormats_SiStripObjects_Phase2TrackerModule_H
3 
4 #include <vector>
5 #include <algorithm>
6 
8 
10 public:
11  enum ModuleTypes { SS, PS };
12 
13 public:
14  // normal constructor... for now, nothing is mandatory
16  uint32_t detid = 0,
17  uint32_t gbtid = 0,
18  uint32_t fedid = 0,
19  uint32_t fedch = 0,
20  uint32_t powerGroup = 0,
21  uint32_t coolingLoop = 0)
22  : moduleType_(moduleType), detid_(detid), gbtid_(gbtid), powerGroup_(powerGroup), coolingLoop_(coolingLoop) {
23  ch_ = std::make_pair(fedid, fedch);
24  }
25 
26  // destructor
27  virtual ~Phase2TrackerModule() {}
28 
29  // setters (complement the constructor)
30  void setDetid(uint32_t detid) { detid_ = detid; }
31  void setGbtid(uint32_t gbtid) { gbtid_ = gbtid; }
32  void setFedChannel(unsigned int fedid, unsigned int fedch) { ch_ = std::make_pair(fedid, fedch); }
33  void setCoolingLoop(uint32_t cl) { coolingLoop_ = cl; }
34  void setPowerGroup(uint32_t pg) { powerGroup_ = pg; }
35  void setModuleType(ModuleTypes moduleType) { moduleType_ = moduleType; }
36  void addI2cDevice(unsigned int dev) { i2cDevices_.push_back(dev); }
37  void setI2cDevices(std::vector<unsigned int> i2cd) { i2cDevices_ = i2cd; }
38 
39  // getters
40  uint32_t getDetid() const { return detid_; }
41  uint32_t getGbtid() const { return gbtid_; }
42  std::pair<unsigned int, unsigned int> getCh() const { return ch_; }
43  uint32_t getCoolingLoop() const { return coolingLoop_; }
44  uint32_t getPowerGroup() const { return powerGroup_; }
46  const std::vector<unsigned int>& getI2cDevices() const { return i2cDevices_; }
47 
48  // description (for printing)
49  std::string description(bool compact = false) const;
50 
51 private:
52  // the GBTid/fed map should be easy to build automatically, since the FED can ask to the link. It could be put in some commissioning packet
53  // the detid/GBTid map comes from construction. It should be in the construction database
54  // the power groups and cooling groups are defined in terms of detids. Known from construction.
55  // ... of course, for now there is nothing like the GBTid...
57  uint32_t detid_, gbtid_;
59  std::pair<unsigned int, unsigned int> ch_;
60  std::vector<unsigned int> i2cDevices_;
61 
63 };
64 
65 #endif
Phase2TrackerModule::description
std::string description(bool compact=false) const
Definition: Phase2TrackerModule.cc:5
Phase2TrackerModule::setCoolingLoop
void setCoolingLoop(uint32_t cl)
Definition: Phase2TrackerModule.h:33
Phase2TrackerModule::PS
Definition: Phase2TrackerModule.h:11
Phase2TrackerModule::ch_
std::pair< unsigned int, unsigned int > ch_
Definition: Phase2TrackerModule.h:59
Phase2TrackerModule::powerGroup_
uint32_t powerGroup_
Definition: Phase2TrackerModule.h:58
COND_SERIALIZABLE
#define COND_SERIALIZABLE
Definition: Serializable.h:39
Phase2TrackerModule::getCh
std::pair< unsigned int, unsigned int > getCh() const
Definition: Phase2TrackerModule.h:42
Phase2TrackerModule::setGbtid
void setGbtid(uint32_t gbtid)
Definition: Phase2TrackerModule.h:31
Phase2TrackerModule::setDetid
void setDetid(uint32_t detid)
Definition: Phase2TrackerModule.h:30
Phase2TrackerModule::detid_
uint32_t detid_
Definition: Phase2TrackerModule.h:57
Phase2TrackerModule::setFedChannel
void setFedChannel(unsigned int fedid, unsigned int fedch)
Definition: Phase2TrackerModule.h:32
Phase2TrackerModule::getCoolingLoop
uint32_t getCoolingLoop() const
Definition: Phase2TrackerModule.h:43
Phase2TrackerModule::getPowerGroup
uint32_t getPowerGroup() const
Definition: Phase2TrackerModule.h:44
GetRecoTauVFromDQM_MC_cff.cl
cl
Definition: GetRecoTauVFromDQM_MC_cff.py:38
Phase2TrackerModule::moduleType_
ModuleTypes moduleType_
Definition: Phase2TrackerModule.h:56
Phase2TrackerModule::setI2cDevices
void setI2cDevices(std::vector< unsigned int > i2cd)
Definition: Phase2TrackerModule.h:37
Phase2TrackerModule::gbtid_
uint32_t gbtid_
Definition: Phase2TrackerModule.h:57
Phase2TrackerModule::Phase2TrackerModule
Phase2TrackerModule(ModuleTypes moduleType=SS, uint32_t detid=0, uint32_t gbtid=0, uint32_t fedid=0, uint32_t fedch=0, uint32_t powerGroup=0, uint32_t coolingLoop=0)
Definition: Phase2TrackerModule.h:15
Phase2TrackerModule::getModuleType
ModuleTypes getModuleType() const
Definition: Phase2TrackerModule.h:45
Phase2TrackerModule::~Phase2TrackerModule
virtual ~Phase2TrackerModule()
Definition: Phase2TrackerModule.h:27
Phase2TrackerModule
Definition: Phase2TrackerModule.h:9
Serializable.h
Phase2TrackerModule::getDetid
uint32_t getDetid() const
Definition: Phase2TrackerModule.h:40
PixelSLinkDataInputSource_cfi.fedid
fedid
Definition: PixelSLinkDataInputSource_cfi.py:6
Phase2TrackerModule::addI2cDevice
void addI2cDevice(unsigned int dev)
Definition: Phase2TrackerModule.h:36
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
Phase2TrackerModule::setPowerGroup
void setPowerGroup(uint32_t pg)
Definition: Phase2TrackerModule.h:34
Phase2TrackerModule::SS
Definition: Phase2TrackerModule.h:11
Phase2TrackerModule::getGbtid
uint32_t getGbtid() const
Definition: Phase2TrackerModule.h:41
Phase2TrackerModule::ModuleTypes
ModuleTypes
Definition: Phase2TrackerModule.h:11
Phase2TrackerModule::setModuleType
void setModuleType(ModuleTypes moduleType)
Definition: Phase2TrackerModule.h:35
Phase2TrackerModule::i2cDevices_
std::vector< unsigned int > i2cDevices_
Definition: Phase2TrackerModule.h:60
Phase2TrackerModule::getI2cDevices
const std::vector< unsigned int > & getI2cDevices() const
Definition: Phase2TrackerModule.h:46
Phase2TrackerModule::coolingLoop_
uint32_t coolingLoop_
Definition: Phase2TrackerModule.h:58