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 
5 #include <ostream>
6 #include <boost/cstdint.hpp>
7 
14 
16  public:
18 
20  {
21  planeHits_.reserve(planes);
22  for (unsigned int i=0;i<planes;i++)
23  planeHits_[i]=0;
24  }
25 
27  unsigned int planes() const { return planeHits_.size(); }
28  unsigned int channels(unsigned int plane) const { return planeHits_[plane].channels(); }
29  const std::vector<bool>& hits(unsigned int plane) const { return planeHits_[plane].hits(); }
30  const EcalTBHodoscopePlaneRawHits& getPlaneRawHits(unsigned int i) const { return planeHits_[i]; }
31  const EcalTBHodoscopePlaneRawHits& operator[](unsigned int i) const { return planeHits_[i]; }
32 
34  void setPlanes(unsigned int size)
35  {
36  planeHits_.resize(size);
37  };
38 
39  void setPlane(unsigned int i, const EcalTBHodoscopePlaneRawHits& planeHit)
40  {
41  if (planeHits_.size() < i+1 )
42  planeHits_.resize(i+1);
43  planeHits_[i]=planeHit;
44  };
45 
46 
47  private:
48  std::vector<EcalTBHodoscopePlaneRawHits> planeHits_;
49 
50 };
51 
52 std::ostream& operator<<(std::ostream&, const EcalTBHodoscopeRawInfo&);
53 
54 #endif
size
Write out results.
const EcalTBHodoscopePlaneRawHits & getPlaneRawHits(unsigned int i) const
const std::vector< bool > & hits(unsigned int plane) const
std::vector< EcalTBHodoscopePlaneRawHits > planeHits_
void setPlane(unsigned int i, const EcalTBHodoscopePlaneRawHits &planeHit)
unsigned int channels(unsigned int plane) const
const EcalTBHodoscopePlaneRawHits & operator[](unsigned int i) const
EcalTBHodoscopeRawInfo(unsigned int planes)
std::ostream & operator<<(std::ostream &, const EcalTBHodoscopeRawInfo &)
unsigned int planes() const
Get Methods.
void setPlanes(unsigned int size)
Set methods.