CMS 3D CMS Logo

Phase2TrackerCabling.h
Go to the documentation of this file.
1 #ifndef CondFormats_SiStripObjects_Phase2TrackerCabling_H
2 #define CondFormats_SiStripObjects_Phase2TrackerCabling_H
3 
6 #include <vector>
7 #include <algorithm>
8 
10  typedef std::vector<Phase2TrackerModule> store;
11  typedef std::vector<Phase2TrackerModule>::const_iterator key;
12  typedef std::vector<key> cabling;
13 
14 public:
15  // Constructor taking FED channel connection objects as input.
16  Phase2TrackerCabling(const std::vector<Phase2TrackerModule>& cons);
17 
18  // Copy ocnstructor
20 
21  // Default constructor
23 
24  // Default destructor
25  virtual ~Phase2TrackerCabling() {}
26 
27  // Initialize the internal maps
28  void initializeCabling();
29 
30  // get the list of modules
31  const std::vector<Phase2TrackerModule>& connections() const { return connections_; }
32 
33  // find a connection for a given fed channel
34  const Phase2TrackerModule& findFedCh(std::pair<unsigned int, unsigned int> fedch) const;
35 
36  // find a connection for a given detid
37  const Phase2TrackerModule& findDetid(uint32_t detid) const;
38 
39  // find a connection for a given gbtid
40  const Phase2TrackerModule& findGbtid(uint32_t gbtid) const;
41 
42  // return all the modules connected to a given cooling line
43  Phase2TrackerCabling filterByCoolingLine(uint32_t coolingLine) const;
44 
45  // return all the modules connected to a given HV group
46  Phase2TrackerCabling filterByPowerGroup(uint32_t powerGroup) const;
47 
48  // print a summary of the content
50 
51  // print the details of the content
52  std::string description(bool compact = false) const;
53 
54 private:
55  // the connections
57 
58  // indices for fast searches
62 
63 private:
64  // sorting functions
65  static bool chOrdering(key a, key b);
66  static bool chComp(key a, std::pair<unsigned int, unsigned int> b);
67  static bool fedeq(key a, key b);
68  static bool detidOrdering(key a, key b);
69  static bool detidComp(key a, uint32_t b);
70  static bool gbtidOrdering(key a, key b);
71  static bool gbtidComp(key a, uint32_t b);
72  static bool coolingOrdering(const Phase2TrackerModule& a, const Phase2TrackerModule& b);
73  static bool coolingComp(const Phase2TrackerModule& a, uint32_t b);
74  static bool cooleq(const Phase2TrackerModule& a, const Phase2TrackerModule& b);
75  static bool powerOrdering(const Phase2TrackerModule& a, const Phase2TrackerModule& b);
76  static bool powerComp(const Phase2TrackerModule& a, uint32_t b);
77  static bool poweq(const Phase2TrackerModule& a, const Phase2TrackerModule& b);
78 
80 };
81 
82 #endif
static bool powerOrdering(const Phase2TrackerModule &a, const Phase2TrackerModule &b)
Phase2TrackerCabling filterByCoolingLine(uint32_t coolingLine) const
static bool gbtidOrdering(key a, key b)
static bool coolingOrdering(const Phase2TrackerModule &a, const Phase2TrackerModule &b)
static bool powerComp(const Phase2TrackerModule &a, uint32_t b)
static bool chOrdering(key a, key b)
static bool cooleq(const Phase2TrackerModule &a, const Phase2TrackerModule &b)
static bool coolingComp(const Phase2TrackerModule &a, uint32_t b)
static bool poweq(const Phase2TrackerModule &a, const Phase2TrackerModule &b)
Phase2TrackerCabling filterByPowerGroup(uint32_t powerGroup) const
const Phase2TrackerModule & findGbtid(uint32_t gbtid) const
std::vector< Phase2TrackerModule >::const_iterator key
static bool detidOrdering(key a, key b)
const Phase2TrackerModule & findFedCh(std::pair< unsigned int, unsigned int > fedch) const
const std::vector< Phase2TrackerModule > & connections() const
#define COND_TRANSIENT
Definition: Serializable.h:63
static bool detidComp(key a, uint32_t b)
double b
Definition: hdecay.h:120
#define COND_SERIALIZABLE
Definition: Serializable.h:39
const Phase2TrackerModule & findDetid(uint32_t detid) const
static bool chComp(key a, std::pair< unsigned int, unsigned int > b)
std::string summaryDescription() const
static bool fedeq(key a, key b)
double a
Definition: hdecay.h:121
static bool gbtidComp(key a, uint32_t b)
std::string description(bool compact=false) const
std::vector< Phase2TrackerModule > store
std::vector< key > cabling