CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_1/src/DataFormats/HcalDigi/interface/HcalHistogramDigi.h

Go to the documentation of this file.
00001 #ifndef DATAFORMATS_HCALDIGI_HCALHISTOGRAMDIGI_H
00002 #define DATAFORMATS_HCALDIGI_HCALHISTOGRAMDIGI_H 1
00003 
00004 #include <ostream>
00005 #include <boost/cstdint.hpp>
00006 #include "DataFormats/HcalDetId/interface/HcalDetId.h"
00007 
00014 class HcalHistogramDigi {
00015 public:
00016   typedef HcalDetId key_type; 
00017 
00018   HcalHistogramDigi(); // For persistence
00019   explicit HcalHistogramDigi(const HcalDetId& id);
00020 
00021   const HcalDetId& id() const { return id_; }
00023   uint16_t get(int capid, int bin) const;
00025   int getSum(int bin) const;
00026 
00028   uint16_t* getArray(int capid);
00029 
00030   static const int BINS_PER_HISTOGRAM=32;
00031 private:
00032   HcalDetId id_;
00033   uint16_t bins_[BINS_PER_HISTOGRAM*4];
00034 };
00035 
00036 std::ostream& operator<<(std::ostream&, const HcalHistogramDigi& digi);
00037 
00038 #endif