CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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 "boost/array.hpp"
16 
24 
25 namespace reco {
26 
27  class HcalNoiseRBXArray : public boost::array<HcalNoiseRBX, HcalHPDRBXMap::NUM_RBXS>
28  {
29  public:
30  // constructor/destructor
32  virtual ~HcalNoiseRBXArray();
33 
34  // one past the "last" HPD
35  // provides the same functionality as HcalNoiseRBXArray::iterator end()
36  // defined already by the base class, to denote that the HPD was not found
37  std::vector<HcalNoiseHPD>::iterator endHPD(void);
38  std::vector<HcalNoiseHPD>::const_iterator endHPD(void) const;
39 
40  // endRBX() and end() are identical
41  // added for symmetry with endHPD()
42  inline HcalNoiseRBXArray::iterator endRBX(void) { return end(); }
43  inline HcalNoiseRBXArray::const_iterator endRBX(void) const { return end(); }
44 
45  // search tools to get the appropriate HPD/RBX in the array
46  // if input is invalid, returns endHPD() or endRBX() when appropriate
47  std::vector<HcalNoiseHPD>::iterator findHPD(int hpdindex);
48  std::vector<HcalNoiseHPD>::const_iterator findHPD(int hpdindex) const;
49  HcalNoiseRBXArray::iterator findRBX(int rbxindex);
50  HcalNoiseRBXArray::const_iterator findRBX(int rbxindex) const;
51  std::vector<HcalNoiseHPD>::iterator findHPD(const HcalDetId&);
52  std::vector<HcalNoiseHPD>::const_iterator findHPD(const HcalDetId&) const;
53  HcalNoiseRBXArray::iterator findRBX(const HcalDetId&);
54  HcalNoiseRBXArray::const_iterator findRBX(const HcalDetId&) const;
55  std::vector<HcalNoiseHPD>::iterator findHPD(const HBHEDataFrame&);
56  std::vector<HcalNoiseHPD>::const_iterator findHPD(const HBHEDataFrame&) const;
57  HcalNoiseRBXArray::iterator findRBX(const HBHEDataFrame&);
58  HcalNoiseRBXArray::const_iterator findRBX(const HBHEDataFrame&) const;
59  std::vector<HcalNoiseHPD>::iterator findHPD(const HBHERecHit&);
60  std::vector<HcalNoiseHPD>::const_iterator findHPD(const HBHERecHit&) const;
61  HcalNoiseRBXArray::iterator findRBX(const HBHERecHit&);
62  HcalNoiseRBXArray::const_iterator findRBX(const HBHERecHit&) const;
63 
64  // same as above but, multiple HPDs/RBXs are possible within one calotower
65  void findHPD(const CaloTower&, std::vector<std::vector<HcalNoiseHPD>::iterator>&);
66  void findHPD(const CaloTower&, std::vector<std::vector<HcalNoiseHPD>::const_iterator>&) const;
67  void findRBX(const CaloTower&, std::vector<HcalNoiseRBXArray::iterator>&);
68  void findRBX(const CaloTower&, std::vector<HcalNoiseRBXArray::const_iterator>&) const;
69 
70  private:
71 
72  };
73 
74 } // end of namespace
75 
76 #endif
std::vector< HcalNoiseHPD >::iterator endHPD(void)
HcalNoiseRBXArray::iterator findRBX(int rbxindex)
std::vector< HcalNoiseHPD >::iterator findHPD(int hpdindex)
HcalNoiseRBXArray::iterator endRBX(void)
#define end
Definition: vmac.h:38
HcalNoiseRBXArray::const_iterator endRBX(void) const