CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_1/src/SimDataFormats/CrossingFrame/interface/PCrossingFrame.h

Go to the documentation of this file.
00001 #ifndef PCROSSING_FRAME_H
00002 #define PCROSSING_FRAME_H
00003 
00014 #include "SimDataFormats/CrossingFrame/interface/CrossingFrame.h"
00015 
00016 template <class T> 
00017 class PCrossingFrame
00018 {
00019 
00020   public:       
00021 
00022   PCrossingFrame(){}
00023   PCrossingFrame(const CrossingFrame<T>& cf);
00024   PCrossingFrame(const PCrossingFrame<T> &pcf){};
00025 
00026   ~PCrossingFrame() {;}
00027   
00028   // getters for data members of PCrossingFrame
00029   edm::EventID getEventID() const {return Pid_;}
00030   std::vector<const T *> getPileups() const {return PCFpileups_;}
00031   int getBunchSpace() const {return PbunchSpace_;}
00032   unsigned int getMaxNbSources() const {return PmaxNbSources_; }
00033   std::string getSubDet() const { return PCFsubdet_;}
00034   unsigned int getPileupFileNr() const {return PCFpileupFileNr_;}
00035   edm::EventID getIdFirstPileup() const {return PCFidFirstPileup_;}
00036   std::vector<unsigned int> getPileupOffsetsBcr() const {return PCFpileupOffsetsBcr_;}   
00037   std::vector< std::vector<unsigned int> > getPileupOffsetsSource() const {return PCFpileupOffsetsSource_;} //one per source
00038   std::pair<int,int> getBunchRange() const {return std::pair<int,int>(firstPCrossing_,lastPCrossing_);}
00039         
00040 
00041   private:
00042   unsigned int PmaxNbSources_;
00043   int PbunchSpace_; 
00044   edm::EventID Pid_;
00045   int firstPCrossing_;
00046   int lastPCrossing_;
00047   std::vector<const T * > PCFpileups_;
00048   std::vector<const T * > PCFsignals_;
00049   std::string PCFsubdet_;
00050   unsigned int PCFpileupFileNr_;
00051   edm::EventID PCFidFirstPileup_;
00052   std::vector<unsigned int> PCFpileupOffsetsBcr_;
00053   std::vector< std::vector<unsigned int> > PCFpileupOffsetsSource_;
00054 };
00055 
00056 
00057 template <class T>
00058 PCrossingFrame<T>::PCrossingFrame(const CrossingFrame<T>& cf)
00059 {
00060  //get data members from CrossingFrame
00061  PmaxNbSources_= cf.getMaxNbSources();
00062  PbunchSpace_ = cf.getBunchSpace();
00063  Pid_ = cf.getEventID();
00064  firstPCrossing_ = cf.getBunchRange().first;
00065  lastPCrossing_ = cf.getBunchRange().second;
00066  PCFpileups_ = cf.getPileups();
00067  PCFsignals_ = cf.getSignal();
00068  PCFsubdet_ = cf.getSubDet();
00069  PCFpileupFileNr_ = cf.getPileupFileNr();
00070  PCFidFirstPileup_ = cf.getIdFirstPileup();
00071  PCFpileupOffsetsBcr_ = cf.getPileupOffsetsBcr();
00072  PCFpileupOffsetsSource_ = cf.getPileupOffsetsSource();
00073 }
00074 
00075 #endif