CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HDQMSummary.h
Go to the documentation of this file.
1 #ifndef HDQMSummary_h
2 #define HDQMSummary_h
3 
4 #include<vector>
5 #include<map>
6 #include<iostream>
7 #include<boost/cstdint.hpp>
9 
16 /*
17 namespace hdqmsummary {
18  enum CMSRegion { TRACKER = 0,
19  TIB = 1,
20  TIB_1 = 11, TIB_2 = 12, TIB_3 = 13, TIB_4 = 14,
21  TOB = 2,
22  TOB_1 = 21, TOB_2 = 22, TOB_3 = 23, TOB_4 = 24, TOB_5 = 25, TOB_6 = 26,
23  TID = 3,
24  TIDM = 31,
25  TIDP = 32,
26  TIDM_1 = 311, TIDM_2 = 312, TIDM_3 = 313,
27  TIDP_1 = 321, TIDP_2 = 322, TIDP_3 = 323,
28  TEC = 4,
29  TECM = 41,
30  TECP = 42,
31  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,
32  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
33  };
34 }
35 */
36 
37 class HDQMSummary {
38 
39  public:
40 
41  struct DetRegistry{
42  uint32_t detid;
43  uint32_t ibegin;
44  };
45 
47  public:
48  bool operator() (const DetRegistry& p,const uint32_t& i) const {return p.detid < i;}
49  };
50 
51 
52  // SOME DEFINITIONS
53  //
54  typedef std::vector<float>::const_iterator ContainerIterator;
55  typedef std::pair<ContainerIterator, ContainerIterator> Range;
56  typedef std::vector<DetRegistry> Registry;
57  typedef Registry::const_iterator RegistryIterator;
58  typedef std::vector<float> InputVector;
59 
60 
61  HDQMSummary(std::vector<std::string>& userDBContent);
65 
66 
67  ContainerIterator getDataVectorBegin() const {return v_sum_.begin(); }
68  ContainerIterator getDataVectorEnd() const {return v_sum_.end(); }
71 
72  // RETURNS POSITION OF DETID IN v_sum_
73  //
74  const Range getRange(const uint32_t& detID) const;
75 
76 
77  // RETURNS LIST OF DETIDS
78  //
79  std::vector<uint32_t> getDetIds() const;
80 
81 
82  // INSERT SUMMARY OBJECTS...
83  //
84  bool put(const uint32_t& detID, InputVector &input, std::vector<std::string>& userContent );
85  void setObj(const uint32_t& detID, std::string elementName, float value);
86 
87 
88  // RETRIEVE SUMMARY OBJECTS...
89  //
90 
91  // returns a vector of selected infos related to a given detId
92  std::vector<float> getSummaryObj(uint32_t& detID, std::vector<std::string> list) const;
93 
94  // returns a vector filled with "info elementName" for each detId
95  // The order is SORTED according to the one used in getDetIds() !
96  std::vector<float> getSummaryObj(std::string elementName) const;
97 
98  // returns the entire SummaryObj related to one detId
99  std::vector<float> getSummaryObj(uint32_t& detID) const;
100 
101  // returns everything, all SummaryObjects for all detIds (unsorted !)
102  std::vector<float> getSummaryObj() const;
103 
104 
105  // INLINE METHODS ABOUT RUN, TIME VALUE...
106  //
107  inline void setUserDBContent(std::vector<std::string> userDBContent) { userDBContent_ = userDBContent;}
108  inline void setRunNr(int inputRunNr) { runNr_ = inputRunNr; }
109  inline void setTimeValue(unsigned long long inputTimeValue){ timeValue_=inputTimeValue;}
110 
111  inline unsigned long long getTimeValue() const { return timeValue_; }
112  inline std::vector<std::string> getUserDBContent() const { return userDBContent_; }
113  inline int getRunNr() const { return runNr_; }
114 
115 
116  // PRINT METHOD...
117  //
118  void print();
119 
120 
121  // HDQMSummary MEMBERS...
122  //
123  std::vector<std::string> userDBContent_;
124  std::vector<float> v_sum_;
125  std::vector<DetRegistry> indexes_;
126 
127  int runNr_;
128  unsigned long long timeValue_;
129 
130 
131  protected:
132 
133  // RETURNS POSITION OF ELEMENTNAME IN userDBContent_
134  const short getPosition(std::string elementName) const;
135 
136 
137  };
138 
139 
140 #endif
int i
Definition: DBlmapReader.cc:9
std::pair< ContainerIterator, ContainerIterator > Range
Definition: HDQMSummary.h:55
void setRunNr(int inputRunNr)
Definition: HDQMSummary.h:108
unsigned long long getTimeValue() const
Definition: HDQMSummary.h:111
bool put(const uint32_t &detID, InputVector &input, std::vector< std::string > &userContent)
Definition: HDQMSummary.cc:26
std::vector< float > v_sum_
Definition: HDQMSummary.h:124
void setTimeValue(unsigned long long inputTimeValue)
Definition: HDQMSummary.h:109
RegistryIterator getRegistryVectorBegin() const
Definition: HDQMSummary.h:69
void setObj(const uint32_t &detID, std::string elementName, float value)
Definition: HDQMSummary.cc:98
unsigned long long timeValue_
Definition: HDQMSummary.h:128
ContainerIterator getDataVectorEnd() const
Definition: HDQMSummary.h:68
std::vector< DetRegistry > Registry
Definition: HDQMSummary.h:56
std::vector< float > InputVector
Definition: HDQMSummary.h:58
void print()
Definition: HDQMSummary.cc:178
Registry::const_iterator RegistryIterator
Definition: HDQMSummary.h:57
std::vector< DetRegistry > indexes_
Definition: HDQMSummary.h:125
bool operator()(const DetRegistry &p, const uint32_t &i) const
Definition: HDQMSummary.h:48
int getRunNr() const
Definition: HDQMSummary.h:113
void setUserDBContent(std::vector< std::string > userDBContent)
Definition: HDQMSummary.h:107
std::vector< std::string > userDBContent_
Definition: HDQMSummary.h:123
RegistryIterator getRegistryVectorEnd() const
Definition: HDQMSummary.h:70
std::vector< float > getSummaryObj() const
Definition: HDQMSummary.cc:152
const short getPosition(std::string elementName) const
Definition: HDQMSummary.cc:85
const Range getRange(const uint32_t &detID) const
Definition: HDQMSummary.cc:60
std::vector< uint32_t > getDetIds() const
Definition: HDQMSummary.cc:71
std::vector< float >::const_iterator ContainerIterator
Definition: HDQMSummary.h:54
std::vector< std::string > getUserDBContent() const
Definition: HDQMSummary.h:112
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
ContainerIterator getDataVectorBegin() const
Definition: HDQMSummary.h:67