CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SiPixelSummary.h
Go to the documentation of this file.
1 #ifndef SiPixelSummary_h
2 #define SiPixelSummary_h
3 
4 #include<vector>
5 #include<map>
6 #include <string>
7 #include<iostream>
8 #include<boost/cstdint.hpp>
10 
17 namespace sipixelsummary {
19  TRACKER = 0,
20  Barrel = 1,
21  Shell_mI = 2,
22  Shell_mO = 3,
23  Shell_pI = 4,
24  Shell_pO = 5,
25  Endcap = 6,
30  };
31 
32 
33 
34 }
35 
37 
38  public:
39 
40  struct DetRegistry{
41  uint32_t detid;
42  uint32_t ibegin;
43  };
44 
46  public:
47  bool operator() (const DetRegistry& p,const uint32_t& i) const {return p.detid < i;}
48  };
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  SiPixelSummary(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  bool put(sipixelsummary::TrackerRegion region, InputVector &input, std::vector<std::string>& userContent );
86  void setObj(const uint32_t& detID, std::string elementName, float value);
87 
88 
89  // RETRIEVE SUMMARY OBJECTS...
90  //
91 
92  // returns a vector of selected infos related to a given detId
93  std::vector<float> getSummaryObj(uint32_t& detID, std::vector<std::string> list) const;
94  std::vector<float> getSummaryObj(sipixelsummary::TrackerRegion region, std::vector<std::string> list) const;
95 
96  // returns a vector filled with "info elementName" for each detId
97  // The order is SORTED according to the one used in getDetIds() !
98  std::vector<float> getSummaryObj(std::string elementName) const;
99 
100  // returns the entire SummaryObj related to one detId
101  std::vector<float> getSummaryObj(uint32_t& detID) const;
102 
103  // returns everything, all SummaryObjects for all detIds (unsorted !)
104  std::vector<float> getSummaryObj() const;
105 
106 
107  // INLINE METHODS ABOUT RUN, TIME VALUE...
108  //
109  inline void setUserDBContent(std::vector<std::string> userDBContent) { userDBContent_ = userDBContent;}
110  inline void setRunNr(int inputRunNr) { runNr_ = inputRunNr; }
111  inline void setTimeValue(unsigned long long inputTimeValue){ timeValue_=inputTimeValue;}
112 
113  inline unsigned long long getTimeValue() const { return timeValue_; }
114  inline std::vector<std::string> getUserDBContent() const { return userDBContent_; }
115  inline int getRunNr() const { return runNr_; }
116 
117 
118  // PRINT METHOD...
119  //
120  void print();
121 
122 
123  // SISTRIPSUMMARY MEMBERS...
124  //
125  std::vector<std::string> userDBContent_;
126  std::vector<float> v_sum_;
127  std::vector<DetRegistry> indexes_;
128 
129  int runNr_;
130  unsigned long long timeValue_;
131 
132 
133  protected:
134 
135  // RETURNS POSITION OF ELEMENTNAME IN userDBContent_
136  const short getPosition(std::string elementName) const;
137 
138 
139 };
140 
141 
142 #endif
std::vector< std::string > userDBContent_
int i
Definition: DBlmapReader.cc:9
std::vector< uint32_t > getDetIds() const
bool operator()(const DetRegistry &p, const uint32_t &i) const
bool put(const uint32_t &detID, InputVector &input, std::vector< std::string > &userContent)
void setTimeValue(unsigned long long inputTimeValue)
std::pair< ContainerIterator, ContainerIterator > Range
unsigned long long timeValue_
Registry::const_iterator RegistryIterator
int getRunNr() const
void setUserDBContent(std::vector< std::string > userDBContent)
void setRunNr(int inputRunNr)
const Range getRange(const uint32_t &detID) const
ContainerIterator getDataVectorBegin() const
std::vector< DetRegistry > indexes_
const short getPosition(std::string elementName) const
std::vector< float > v_sum_
unsigned long long getTimeValue() const
std::vector< std::string > getUserDBContent() const
RegistryIterator getRegistryVectorEnd() const
std::vector< DetRegistry > Registry
std::vector< float > InputVector
std::vector< float > getSummaryObj() const
RegistryIterator getRegistryVectorBegin() const
std::vector< float >::const_iterator ContainerIterator
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
void setObj(const uint32_t &detID, std::string elementName, float value)