CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
HcalNoiseRBXArray.h
Go to the documentation of this file.
1 #ifndef _RECOMET_METALGORITHMS_HCALNOISERBXARRAY_H_
2 #define _RECOMET_METALGORITHMS_HCALNOISERBXARRAY_H_
3 
4 //
5 // HcalNoiseRBXArray.h
6 //
7 // description: A boost::array of 72 HcalNoiseRBXs designed to simply search/sorting of elements
8 // Automatically labels each RBX individually, and provides O(1) searching tools
9 //
10 //
11 // author: J.P. Chou, Brown
12 //
13 //
14 
15 #include <array>
16 
24 
25 namespace reco {
26 
27  class HcalNoiseRBXArray : public std::array<HcalNoiseRBX, HcalHPDRBXMap::NUM_RBXS> {
28  public:
29  // constructor/destructor
31  virtual ~HcalNoiseRBXArray();
32 
33  // one past the "last" HPD
34  // provides the same functionality as HcalNoiseRBXArray::iterator end()
35  // defined already by the base class, to denote that the HPD was not found
36  std::vector<HcalNoiseHPD>::iterator endHPD(void);
37  std::vector<HcalNoiseHPD>::const_iterator endHPD(void) const;
38 
39  // endRBX() and end() are identical
40  // added for symmetry with endHPD()
41  inline HcalNoiseRBXArray::iterator endRBX(void) { return end(); }
42  inline HcalNoiseRBXArray::const_iterator endRBX(void) const { return end(); }
43 
44  // search tools to get the appropriate HPD/RBX in the array
45  // if input is invalid, returns endHPD() or endRBX() when appropriate
46  std::vector<HcalNoiseHPD>::iterator findHPD(int hpdindex);
47  std::vector<HcalNoiseHPD>::const_iterator findHPD(int hpdindex) const;
48  HcalNoiseRBXArray::iterator findRBX(int rbxindex);
49  HcalNoiseRBXArray::const_iterator findRBX(int rbxindex) const;
50  std::vector<HcalNoiseHPD>::iterator findHPD(const HcalDetId&);
51  std::vector<HcalNoiseHPD>::const_iterator findHPD(const HcalDetId&) const;
52  HcalNoiseRBXArray::iterator findRBX(const HcalDetId&);
53  HcalNoiseRBXArray::const_iterator findRBX(const HcalDetId&) const;
54  std::vector<HcalNoiseHPD>::iterator findHPD(const HBHEDataFrame&);
55  std::vector<HcalNoiseHPD>::const_iterator findHPD(const HBHEDataFrame&) const;
56  HcalNoiseRBXArray::iterator findRBX(const HBHEDataFrame&);
57  HcalNoiseRBXArray::const_iterator findRBX(const HBHEDataFrame&) const;
58  std::vector<HcalNoiseHPD>::iterator findHPD(const HBHERecHit&);
59  std::vector<HcalNoiseHPD>::const_iterator findHPD(const HBHERecHit&) const;
60  HcalNoiseRBXArray::iterator findRBX(const HBHERecHit&);
61  HcalNoiseRBXArray::const_iterator findRBX(const HBHERecHit&) const;
62 
63  // same as above but, multiple HPDs/RBXs are possible within one calotower
64  void findHPD(const CaloTower&, std::vector<std::vector<HcalNoiseHPD>::iterator>&);
65  void findHPD(const CaloTower&, std::vector<std::vector<HcalNoiseHPD>::const_iterator>&) const;
66  void findRBX(const CaloTower&, std::vector<HcalNoiseRBXArray::iterator>&);
67  void findRBX(const CaloTower&, std::vector<HcalNoiseRBXArray::const_iterator>&) const;
68 
69  private:
70  };
71 
72 } // namespace reco
73 
74 #endif
tuple array
Definition: mps_check.py:216
std::vector< HcalNoiseHPD >::iterator endHPD(void)
HcalNoiseRBXArray::iterator findRBX(int rbxindex)
std::vector< HcalNoiseHPD >::iterator findHPD(int hpdindex)
HcalNoiseRBXArray::iterator endRBX(void)
string end
Definition: dataset.py:937
HcalNoiseRBXArray::const_iterator endRBX(void) const