CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_1/src/CalibFormats/CaloObjects/interface/IntegerCaloSamples.h

Go to the documentation of this file.
00001 #ifndef INTEGERCALOSAMPLES_H
00002 #define INTEGERCALOSAMPLES_H 1
00003 
00004 #include <ostream>
00005 #include "DataFormats/DetId/interface/DetId.h"
00006 
00018 class IntegerCaloSamples {
00019 public:
00020   IntegerCaloSamples();
00021   explicit IntegerCaloSamples(const DetId& id, int size);
00022   
00024   DetId id() const { return id_; }
00025 
00027   int size() const { return size_; }
00029   uint32_t& operator[](int i) { return data_[i]; }
00031   uint32_t operator[](int i) const { return data_[i]; }
00032 
00034   int presamples() const { return presamples_; }
00036   void setPresamples(int pre);
00037 
00038   static const int MAXSAMPLES=10;
00039 private:
00040   DetId id_;
00041   uint32_t data_[MAXSAMPLES]; // 
00042   int size_, presamples_;
00043 };
00044 
00045 std::ostream& operator<<(std::ostream& s, const IntegerCaloSamples& samps);
00046 
00047 #endif