CMS 3D CMS Logo

EcalTBHodoscopeRawInfo.h
Go to the documentation of this file.
1 #ifndef DIGIECAL_ECALTBHODOSCOPERAWINFO_H
2 #define DIGIECAL_ECALTBHODOSCOPERAWINFO_H 1
3 
4 #include <ostream>
5 
12 
14 public:
16 
18  planeHits_.reserve(planes);
19  for (unsigned int i = 0; i < planes; i++)
20  planeHits_[i] = 0;
21  }
22 
24  unsigned int planes() const { return planeHits_.size(); }
25  unsigned int channels(unsigned int plane) const { return planeHits_[plane].channels(); }
26  const std::vector<bool>& hits(unsigned int plane) const { return planeHits_[plane].hits(); }
27  const EcalTBHodoscopePlaneRawHits& getPlaneRawHits(unsigned int i) const { return planeHits_[i]; }
28  const EcalTBHodoscopePlaneRawHits& operator[](unsigned int i) const { return planeHits_[i]; }
29 
31  void setPlanes(unsigned int size) { planeHits_.resize(size); };
32 
33  void setPlane(unsigned int i, const EcalTBHodoscopePlaneRawHits& planeHit) {
34  if (planeHits_.size() < i + 1)
35  planeHits_.resize(i + 1);
36  planeHits_[i] = planeHit;
37  };
38 
39 private:
40  std::vector<EcalTBHodoscopePlaneRawHits> planeHits_;
41 };
42 
43 std::ostream& operator<<(std::ostream&, const EcalTBHodoscopeRawInfo&);
44 
45 #endif
size
Write out results.
std::vector< EcalTBHodoscopePlaneRawHits > planeHits_
const EcalTBHodoscopePlaneRawHits & operator[](unsigned int i) const
void setPlane(unsigned int i, const EcalTBHodoscopePlaneRawHits &planeHit)
unsigned int planes() const
Get Methods.
EcalTBHodoscopeRawInfo(unsigned int planes)
const EcalTBHodoscopePlaneRawHits & getPlaneRawHits(unsigned int i) const
const std::vector< bool > & hits(unsigned int plane) const
unsigned int channels(unsigned int plane) const
std::ostream & operator<<(std::ostream &, const EcalTBHodoscopeRawInfo &)
void setPlanes(unsigned int size)
Set methods.