CMS 3D CMS Logo

IntegerCaloSamples.h
Go to the documentation of this file.
1 #ifndef INTEGERCALOSAMPLES_H
2 #define INTEGERCALOSAMPLES_H 1
3 
5 #include <ostream>
6 
17 public:
19  explicit IntegerCaloSamples(const DetId &id, int size);
20 
22  DetId id() const { return id_; }
23 
25  int size() const { return size_; }
27  uint32_t &operator[](int i) { return data_[i]; }
29  uint32_t operator[](int i) const { return data_[i]; }
30 
32  int presamples() const { return presamples_; }
34  void setPresamples(int pre);
35 
36  static const int MAXSAMPLES = 10;
37 
38 private:
40  uint32_t data_[MAXSAMPLES]; //
42 };
43 
44 std::ostream &operator<<(std::ostream &s, const IntegerCaloSamples &samps);
45 
46 #endif
uint32_t data_[MAXSAMPLES]
std::ostream & operator<<(std::ostream &s, const IntegerCaloSamples &samps)
DetId id() const
get the (generic) id
uint32_t operator[](int i) const
const operator to access samples
void setPresamples(int pre)
set presample information
uint32_t & operator[](int i)
mutable operator to access samples
int presamples() const
access presample information
Definition: DetId.h:17
static const int MAXSAMPLES
int size() const
get the size