CMS 3D CMS Logo

HDQMSummary.h
Go to the documentation of this file.
1 #ifndef HDQMSummary_h
2 #define HDQMSummary_h
3 
5 
6 #include <vector>
7 #include <map>
8 #include <iostream>
10 #include <cstdint>
11 
18 /*
19 namespace hdqmsummary {
20  enum CMSRegion { TRACKER = 0,
21  TIB = 1,
22  TIB_1 = 11, TIB_2 = 12, TIB_3 = 13, TIB_4 = 14,
23  TOB = 2,
24  TOB_1 = 21, TOB_2 = 22, TOB_3 = 23, TOB_4 = 24, TOB_5 = 25, TOB_6 = 26,
25  TID = 3,
26  TIDM = 31,
27  TIDP = 32,
28  TIDM_1 = 311, TIDM_2 = 312, TIDM_3 = 313,
29  TIDP_1 = 321, TIDP_2 = 322, TIDP_3 = 323,
30  TEC = 4,
31  TECM = 41,
32  TECP = 42,
33  TECM_1 = 411, TECM_2 = 412, TECM_3 = 413, TECM_4 = 414, TECM_5 = 415, TECM_6 = 416, TECM_7 = 417, TECM_8 = 418, TECM_9 = 419,
34  TECP_1 = 421, TECP_2 = 422, TECP_3 = 423, TECP_4 = 424, TECP_5 = 425, TECP_6 = 426, TECP_7 = 427, TECP_8 = 428, TECP_9 = 429
35  };
36 }
37 */
38 
39 class HDQMSummary {
40 public:
41  struct DetRegistry {
42  uint32_t detid;
43  uint32_t ibegin;
44 
46  };
47 
49  public:
50  bool operator()(const DetRegistry& p, const uint32_t& i) const { return p.detid < i; }
51  };
52 
53  // SOME DEFINITIONS
54  //
55  typedef std::vector<float>::const_iterator ContainerIterator;
56  typedef std::pair<ContainerIterator, ContainerIterator> Range;
57  typedef std::vector<DetRegistry> Registry;
58  typedef Registry::const_iterator RegistryIterator;
59  typedef std::vector<float> InputVector;
60 
61  HDQMSummary(std::vector<std::string>& userDBContent);
65 
66  ContainerIterator getDataVectorBegin() const { return v_sum_.begin(); }
67  ContainerIterator getDataVectorEnd() const { return v_sum_.end(); }
68  RegistryIterator getRegistryVectorBegin() const { return indexes_.begin(); }
70 
71  // RETURNS POSITION OF DETID IN v_sum_
72  //
73  const Range getRange(const uint32_t& detID) const;
74 
75  // RETURNS LIST OF DETIDS
76  //
77  std::vector<uint32_t> getDetIds() const;
78 
79  // INSERT SUMMARY OBJECTS...
80  //
81  bool put(const uint32_t& detID, InputVector& input, std::vector<std::string>& userContent);
82  void setObj(const uint32_t& detID, std::string elementName, float value);
83 
84  // RETRIEVE SUMMARY OBJECTS...
85  //
86 
87  // returns a vector of selected infos related to a given detId
88  std::vector<float> getSummaryObj(uint32_t& detID, const std::vector<std::string>& list) const;
89 
90  // returns a vector filled with "info elementName" for each detId
91  // The order is SORTED according to the one used in getDetIds() !
92  std::vector<float> getSummaryObj(std::string elementName) const;
93 
94  // returns the entire SummaryObj related to one detId
95  std::vector<float> getSummaryObj(uint32_t& detID) const;
96 
97  // returns everything, all SummaryObjects for all detIds (unsorted !)
98  std::vector<float> getSummaryObj() const;
99 
100  // INLINE METHODS ABOUT RUN, TIME VALUE...
101  //
102  inline void setUserDBContent(const std::vector<std::string>& userDBContent) { userDBContent_ = userDBContent; }
103  inline void setRunNr(int inputRunNr) { runNr_ = inputRunNr; }
104  inline void setTimeValue(unsigned long long inputTimeValue) { timeValue_ = inputTimeValue; }
105 
106  inline unsigned long long getTimeValue() const { return timeValue_; }
107  inline std::vector<std::string> getUserDBContent() const { return userDBContent_; }
108  inline int getRunNr() const { return runNr_; }
109 
110  // PRINT METHOD...
111  //
112  void print();
113 
114  // HDQMSummary MEMBERS...
115  //
116  std::vector<std::string> userDBContent_;
117  std::vector<float> v_sum_;
118  std::vector<DetRegistry> indexes_;
119 
120  int runNr_;
121  unsigned long long timeValue_;
122 
123 protected:
124  // RETURNS POSITION OF ELEMENTNAME IN userDBContent_
125  const short getPosition(std::string elementName) const;
126 
128 };
129 
130 #endif
mps_fire.i
i
Definition: mps_fire.py:355
input
static const std::string input
Definition: EdmProvDump.cc:48
HDQMSummary::StrictWeakOrdering
Definition: HDQMSummary.h:48
HDQMSummary::setRunNr
void setRunNr(int inputRunNr)
Definition: HDQMSummary.h:103
HDQMSummary::getRange
const Range getRange(const uint32_t &detID) const
Definition: HDQMSummary.cc:53
HDQMSummary::getPosition
const short getPosition(std::string elementName) const
Definition: HDQMSummary.cc:73
HDQMSummary::getDataVectorBegin
ContainerIterator getDataVectorBegin() const
Definition: HDQMSummary.h:66
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
HDQMSummary::setTimeValue
void setTimeValue(unsigned long long inputTimeValue)
Definition: HDQMSummary.h:104
COND_SERIALIZABLE
#define COND_SERIALIZABLE
Definition: Serializable.h:39
HDQMSummary::DetRegistry::detid
uint32_t detid
Definition: HDQMSummary.h:42
HDQMSummary::getRegistryVectorBegin
RegistryIterator getRegistryVectorBegin() const
Definition: HDQMSummary.h:68
HDQMSummary::getTimeValue
unsigned long long getTimeValue() const
Definition: HDQMSummary.h:106
HDQMSummary::DetRegistry::ibegin
uint32_t ibegin
Definition: HDQMSummary.h:43
HDQMSummary::setObj
void setObj(const uint32_t &detID, std::string elementName, float value)
Definition: HDQMSummary.cc:86
HDQMSummary::runNr_
int runNr_
Definition: HDQMSummary.h:120
HDQMSummary::getRegistryVectorEnd
RegistryIterator getRegistryVectorEnd() const
Definition: HDQMSummary.h:69
HDQMSummary::InputVector
std::vector< float > InputVector
Definition: HDQMSummary.h:59
HDQMSummary::put
bool put(const uint32_t &detID, InputVector &input, std::vector< std::string > &userContent)
Definition: HDQMSummary.cc:22
HDQMSummary::v_sum_
std::vector< float > v_sum_
Definition: HDQMSummary.h:117
HDQMSummary::getSummaryObj
std::vector< float > getSummaryObj() const
Definition: HDQMSummary.cc:139
HDQMSummary::setUserDBContent
void setUserDBContent(const std::vector< std::string > &userDBContent)
Definition: HDQMSummary.h:102
HDQMSummary::timeValue_
unsigned long long timeValue_
Definition: HDQMSummary.h:121
HDQMSummary::RegistryIterator
Registry::const_iterator RegistryIterator
Definition: HDQMSummary.h:58
HDQMSummary::indexes_
std::vector< DetRegistry > indexes_
Definition: HDQMSummary.h:118
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
HDQMSummary::userDBContent_
std::vector< std::string > userDBContent_
Definition: HDQMSummary.h:116
HDQMSummary::print
void print()
Definition: HDQMSummary.cc:160
HDQMSummary::getRunNr
int getRunNr() const
Definition: HDQMSummary.h:108
HDQMSummary::~HDQMSummary
~HDQMSummary()
Definition: HDQMSummary.h:64
HDQMSummary::Registry
std::vector< DetRegistry > Registry
Definition: HDQMSummary.h:57
Serializable.h
HDQMSummary::getUserDBContent
std::vector< std::string > getUserDBContent() const
Definition: HDQMSummary.h:107
value
Definition: value.py:1
HDQMSummary::getDetIds
std::vector< uint32_t > getDetIds() const
Definition: HDQMSummary.cc:62
HDQMSummary::StrictWeakOrdering::operator()
bool operator()(const DetRegistry &p, const uint32_t &i) const
Definition: HDQMSummary.h:50
HDQMSummary::DetRegistry
Definition: HDQMSummary.h:41
HDQMSummary::getDataVectorEnd
ContainerIterator getDataVectorEnd() const
Definition: HDQMSummary.h:67
HDQMSummary
Definition: HDQMSummary.h:39
Exception.h
list
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger list("!*", "!HLTx*" if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL. It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of "!*" before the partial wildcard feature was incorporated). Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run
HDQMSummary::Range
std::pair< ContainerIterator, ContainerIterator > Range
Definition: HDQMSummary.h:56
HDQMSummary::ContainerIterator
std::vector< float >::const_iterator ContainerIterator
Definition: HDQMSummary.h:55
HDQMSummary::HDQMSummary
HDQMSummary()
Definition: HDQMSummary.h:63