CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SiStripSummary.h
Go to the documentation of this file.
1 #ifndef SiStripSummary_h
2 #define SiStripSummary_h
3 
4 #include<vector>
5 #include<map>
6 #include<iostream>
7 #include<boost/cstdint.hpp>
9 
16 namespace sistripsummary {
17  enum TrackerRegion { TRACKER = 0,
18  TIB = 1,
19  TIB_1 = 11, TIB_2 = 12, TIB_3 = 13, TIB_4 = 14,
20  TOB = 2,
21  TOB_1 = 21, TOB_2 = 22, TOB_3 = 23, TOB_4 = 24, TOB_5 = 25, TOB_6 = 26,
22  TID = 3,
23  TIDM = 31,
24  TIDP = 32,
25  TIDM_1 = 311, TIDM_2 = 312, TIDM_3 = 313,
26  TIDP_1 = 321, TIDP_2 = 322, TIDP_3 = 323,
27  TEC = 4,
28  TECM = 41,
29  TECP = 42,
30  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,
31  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
32  };
33 }
34 
36 
37  public:
38 
39  struct DetRegistry{
40  uint32_t detid;
41  uint32_t ibegin;
42  };
43 
45  public:
46  bool operator() (const DetRegistry& p,const uint32_t& i) const {return p.detid < i;}
47  };
48 
49 
50  // SOME DEFINITIONS
51  //
52  typedef std::vector<float>::const_iterator ContainerIterator;
53  typedef std::pair<ContainerIterator, ContainerIterator> Range;
54  typedef std::vector<DetRegistry> Registry;
55  typedef Registry::const_iterator RegistryIterator;
56  typedef std::vector<float> InputVector;
57 
58 
59  SiStripSummary(std::vector<std::string>& userDBContent);
63 
64 
65  ContainerIterator getDataVectorBegin() const {return v_sum_.begin(); }
66  ContainerIterator getDataVectorEnd() const {return v_sum_.end(); }
69 
70  // RETURNS POSITION OF DETID IN v_sum_
71  //
72  const Range getRange(const uint32_t& detID) const;
73 
74 
75  // RETURNS LIST OF DETIDS
76  //
77  std::vector<uint32_t> getDetIds() const;
78 
79 
80  // INSERT SUMMARY OBJECTS...
81  //
82  bool put(const uint32_t& detID, InputVector &input, std::vector<std::string>& userContent );
83  bool put(sistripsummary::TrackerRegion region, InputVector &input, std::vector<std::string>& userContent );
84  void setObj(const uint32_t& detID, std::string elementName, float value);
85 
86 
87  // RETRIEVE SUMMARY OBJECTS...
88  //
89 
90  // returns a vector of selected infos related to a given detId
91  std::vector<float> getSummaryObj(uint32_t& detID, const std::vector<std::string>& list) const;
92  std::vector<float> getSummaryObj(sistripsummary::TrackerRegion region,const 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(const 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  // SISTRIPSUMMARY 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
std::vector< uint32_t > getDetIds() const
ContainerIterator getDataVectorBegin() const
int i
Definition: DBlmapReader.cc:9
unsigned long long getTimeValue() const
const Range getRange(const uint32_t &detID) const
std::vector< DetRegistry > indexes_
void setRunNr(int inputRunNr)
Registry::const_iterator RegistryIterator
std::pair< ContainerIterator, ContainerIterator > Range
static std::string const input
Definition: EdmProvDump.cc:44
std::vector< float > v_sum_
void setObj(const uint32_t &detID, std::string elementName, float value)
RegistryIterator getRegistryVectorBegin() const
unsigned long long timeValue_
std::vector< float > InputVector
bool put(const uint32_t &detID, InputVector &input, std::vector< std::string > &userContent)
std::vector< std::string > getUserDBContent() const
int getRunNr() const
RegistryIterator getRegistryVectorEnd() const
std::vector< float > getSummaryObj() const
bool operator()(const DetRegistry &p, const uint32_t &i) const
std::vector< float >::const_iterator ContainerIterator
std::vector< std::string > userDBContent_
void setUserDBContent(const std::vector< std::string > &userDBContent)
void setTimeValue(unsigned long long inputTimeValue)
std::vector< DetRegistry > Registry
ContainerIterator getDataVectorEnd() const
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
const short getPosition(std::string elementName) const