CMS 3D CMS Logo

EcalTriggerPrimitiveDigi.h

Go to the documentation of this file.
00001 #ifndef ECALTRIGGERPRIMITIVEDIGI_H
00002 #define ECALTRIGGERPRIMITIVEDIGI_H 1
00003 
00004 #include <ostream>
00005 #include <vector>
00006 #include "DataFormats/EcalDetId/interface/EcalTrigTowerDetId.h"
00007 #include "DataFormats/EcalDigi/interface/EcalTriggerPrimitiveSample.h"
00008 
00009 
00010 
00016 class EcalTriggerPrimitiveDigi {
00017  public:
00018   typedef EcalTrigTowerDetId key_type; 
00019 
00020   EcalTriggerPrimitiveDigi(); // for persistence
00021   explicit EcalTriggerPrimitiveDigi(const EcalTrigTowerDetId& id);
00022     
00023   const EcalTrigTowerDetId& id() const { return id_; }
00024   int size() const { return size_; }
00025     
00026   const EcalTriggerPrimitiveSample& operator[](int i) const { return data_[i]; }
00027   const EcalTriggerPrimitiveSample& sample(int i) const { return data_[i]; }
00028     
00029   void setSize(int size);
00030   void setSample(int i, const EcalTriggerPrimitiveSample& sam) { data_[i]=sam; }
00031   void setSampleValue(int i, uint16_t value) { data_[i].setValue(value); }
00032     
00033   static const int MAXSAMPLES = 20;
00034 
00036   int compressedEt() const; 
00037   
00038   
00040   bool fineGrain() const; 
00041   
00043   int ttFlag() const; 
00044   
00046   bool isDebug() const;
00047 
00049   int sampleOfInterest() const;
00050   
00051  private:
00052   
00053   EcalTrigTowerDetId id_;
00054   int size_;
00055   std::vector<EcalTriggerPrimitiveSample> data_;
00056 };
00057 
00058 
00059 std::ostream& operator<<(std::ostream& s, const EcalTriggerPrimitiveDigi& digi);
00060 
00061 
00062 
00063 #endif

Generated on Tue Jun 9 17:30:42 2009 for CMSSW by  doxygen 1.5.4