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 
5 
6 #include<vector>
7 #include<map>
8 #include<iostream>
9 #include<boost/cstdint.hpp>
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 
41  public:
42 
43  struct DetRegistry{
44  uint32_t detid;
45  uint32_t ibegin;
46 
48 };
49 
51  public:
52  bool operator() (const DetRegistry& p,const uint32_t& i) const {return p.detid < i;}
53  };
54 
55 
56  // SOME DEFINITIONS
57  //
58  typedef std::vector<float>::const_iterator ContainerIterator;
59  typedef std::pair<ContainerIterator, ContainerIterator> Range;
60  typedef std::vector<DetRegistry> Registry;
61  typedef Registry::const_iterator RegistryIterator;
62  typedef std::vector<float> InputVector;
63 
64 
65  HDQMSummary(std::vector<std::string>& userDBContent);
69 
70 
71  ContainerIterator getDataVectorBegin() const {return v_sum_.begin(); }
72  ContainerIterator getDataVectorEnd() const {return v_sum_.end(); }
75 
76  // RETURNS POSITION OF DETID IN v_sum_
77  //
78  const Range getRange(const uint32_t& detID) const;
79 
80 
81  // RETURNS LIST OF DETIDS
82  //
83  std::vector<uint32_t> getDetIds() const;
84 
85 
86  // INSERT SUMMARY OBJECTS...
87  //
88  bool put(const uint32_t& detID, InputVector &input, std::vector<std::string>& userContent );
89  void setObj(const uint32_t& detID, std::string elementName, float value);
90 
91 
92  // RETRIEVE SUMMARY OBJECTS...
93  //
94 
95  // returns a vector of selected infos related to a given detId
96  std::vector<float> getSummaryObj(uint32_t& detID, const std::vector<std::string>& list) const;
97 
98  // returns a vector filled with "info elementName" for each detId
99  // The order is SORTED according to the one used in getDetIds() !
100  std::vector<float> getSummaryObj(std::string elementName) const;
101 
102  // returns the entire SummaryObj related to one detId
103  std::vector<float> getSummaryObj(uint32_t& detID) const;
104 
105  // returns everything, all SummaryObjects for all detIds (unsorted !)
106  std::vector<float> getSummaryObj() const;
107 
108 
109  // INLINE METHODS ABOUT RUN, TIME VALUE...
110  //
111  inline void setUserDBContent(const std::vector<std::string>& userDBContent) { userDBContent_ = userDBContent;}
112  inline void setRunNr(int inputRunNr) { runNr_ = inputRunNr; }
113  inline void setTimeValue(unsigned long long inputTimeValue){ timeValue_=inputTimeValue;}
114 
115  inline unsigned long long getTimeValue() const { return timeValue_; }
116  inline std::vector<std::string> getUserDBContent() const { return userDBContent_; }
117  inline int getRunNr() const { return runNr_; }
118 
119 
120  // PRINT METHOD...
121  //
122  void print();
123 
124 
125  // HDQMSummary MEMBERS...
126  //
127  std::vector<std::string> userDBContent_;
128  std::vector<float> v_sum_;
129  std::vector<DetRegistry> indexes_;
130 
131  int runNr_;
132  unsigned long long timeValue_;
133 
134 
135  protected:
136 
137  // RETURNS POSITION OF ELEMENTNAME IN userDBContent_
138  const short getPosition(std::string elementName) const;
139 
140 
141 
143 };
144 
145 
146 #endif
int i
Definition: DBlmapReader.cc:9
std::pair< ContainerIterator, ContainerIterator > Range
Definition: HDQMSummary.h:59
void setRunNr(int inputRunNr)
Definition: HDQMSummary.h:112
unsigned long long getTimeValue() const
Definition: HDQMSummary.h:115
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:128
void setTimeValue(unsigned long long inputTimeValue)
Definition: HDQMSummary.h:113
RegistryIterator getRegistryVectorBegin() const
Definition: HDQMSummary.h:73
void setObj(const uint32_t &detID, std::string elementName, float value)
Definition: HDQMSummary.cc:98
static std::string const input
Definition: EdmProvDump.cc:43
unsigned long long timeValue_
Definition: HDQMSummary.h:132
ContainerIterator getDataVectorEnd() const
Definition: HDQMSummary.h:72
void setUserDBContent(const std::vector< std::string > &userDBContent)
Definition: HDQMSummary.h:111
std::vector< DetRegistry > Registry
Definition: HDQMSummary.h:60
std::vector< float > InputVector
Definition: HDQMSummary.h:62
void print()
Definition: HDQMSummary.cc:179
Registry::const_iterator RegistryIterator
Definition: HDQMSummary.h:61
std::vector< DetRegistry > indexes_
Definition: HDQMSummary.h:129
bool operator()(const DetRegistry &p, const uint32_t &i) const
Definition: HDQMSummary.h:52
int getRunNr() const
Definition: HDQMSummary.h:117
std::vector< std::string > userDBContent_
Definition: HDQMSummary.h:127
RegistryIterator getRegistryVectorEnd() const
Definition: HDQMSummary.h:74
std::vector< float > getSummaryObj() const
Definition: HDQMSummary.cc:153
const short getPosition(std::string elementName) const
Definition: HDQMSummary.cc:85
const Range getRange(const uint32_t &detID) const
Definition: HDQMSummary.cc:60
#define COND_SERIALIZABLE
Definition: Serializable.h:37
std::vector< uint32_t > getDetIds() const
Definition: HDQMSummary.cc:71
std::vector< float >::const_iterator ContainerIterator
Definition: HDQMSummary.h:58
std::vector< std::string > getUserDBContent() const
Definition: HDQMSummary.h:116
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:71