test
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 
5 
6 #include<vector>
7 #include<map>
8 #include<iostream>
9 #include<boost/cstdint.hpp>
11 
18 namespace sistripsummary {
19  enum TrackerRegion { TRACKER = 0,
20  TIB = 1,
21  TIB_1 = 11, TIB_2 = 12, TIB_3 = 13, TIB_4 = 14,
22  TOB = 2,
23  TOB_1 = 21, TOB_2 = 22, TOB_3 = 23, TOB_4 = 24, TOB_5 = 25, TOB_6 = 26,
24  TID = 3,
25  TIDM = 31,
26  TIDP = 32,
27  TIDM_1 = 311, TIDM_2 = 312, TIDM_3 = 313,
28  TIDP_1 = 321, TIDP_2 = 322, TIDP_3 = 323,
29  TEC = 4,
30  TECM = 41,
31  TECP = 42,
32  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,
33  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
34  };
35 }
36 
38 
39  public:
40 
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 
54  // SOME DEFINITIONS
55  //
56  typedef std::vector<float>::const_iterator ContainerIterator;
57  typedef std::pair<ContainerIterator, ContainerIterator> Range;
58  typedef std::vector<DetRegistry> Registry;
59  typedef Registry::const_iterator RegistryIterator;
60  typedef std::vector<float> InputVector;
61 
62 
63  SiStripSummary(std::vector<std::string>& userDBContent);
67 
68 
69  ContainerIterator getDataVectorBegin() const {return v_sum_.begin(); }
70  ContainerIterator getDataVectorEnd() const {return v_sum_.end(); }
73 
74  // RETURNS POSITION OF DETID IN v_sum_
75  //
76  const Range getRange(const uint32_t& detID) const;
77 
78 
79  // RETURNS LIST OF DETIDS
80  //
81  std::vector<uint32_t> getDetIds() const;
82 
83 
84  // INSERT SUMMARY OBJECTS...
85  //
86  bool put(const uint32_t& detID, InputVector &input, std::vector<std::string>& userContent );
87  bool put(sistripsummary::TrackerRegion region, InputVector &input, std::vector<std::string>& userContent );
88  void setObj(const uint32_t& detID, std::string elementName, float value);
89 
90 
91  // RETRIEVE SUMMARY OBJECTS...
92  //
93 
94  // returns a vector of selected infos related to a given detId
95  std::vector<float> getSummaryObj(uint32_t& detID, const std::vector<std::string>& list) const;
96  std::vector<float> getSummaryObj(sistripsummary::TrackerRegion region,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  // SISTRIPSUMMARY 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
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
#define COND_SERIALIZABLE
Definition: Serializable.h:37
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