CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_4_5_patch3/src/SimDataFormats/CrossingFrame/interface/CrossingFramePlaybackInfoExtended.h

Go to the documentation of this file.
00001 #ifndef CROSSING_FRAME_PLAYBACKINFOEXTENDED_H
00002 #define CROSSING_FRAME_PLAYBACKINFOEXTENDED_H
00003 
00017 #include "DataFormats/Provenance/interface/EventID.h"
00018 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00019 #include <vector>
00020 #include <utility>
00021 
00022 #include <iostream>
00023 
00024 class CrossingFramePlaybackInfoExtended 
00025 { 
00026 
00027  public:
00028   // con- and destructors
00029 
00030   CrossingFramePlaybackInfoExtended() {;}
00031   CrossingFramePlaybackInfoExtended(int minBunch, int maxBunch, unsigned int maxNbSources);
00032 
00033   ~CrossingFramePlaybackInfoExtended() {;}
00034 
00035   // getters
00036   std::vector<edm::EventID> getStartEventId(const unsigned int s,const int bcr) const {return (idFirstPileup_[s])[bcr-minBunch_];}
00037   
00038   void getEventStartInfo(std::vector<std::vector<edm::EventID> > &ids, const unsigned int s) const {
00039     ids=idFirstPileup_[s];
00040   }
00041   
00042    
00043   // setters 
00044   //FIXME: max nr sources, test on max nrsources
00045   void setStartEventId( const std::vector<edm::EventID> &id, const unsigned int s, const int bcr, const int start) {
00046     std::vector<edm::EventID> newVec;
00047     std::vector<edm::EventID>::const_iterator idStart = id.begin()+start;
00048     newVec.insert(newVec.begin(), idStart, id.end());
00049     idFirstPileup_[s][bcr-minBunch_]=newVec;
00050   }
00051   void setEventStartInfo(std::vector<std::vector<edm::EventID> > &id, const unsigned int s);
00052 
00053  private:
00054 
00055   // we need the same info for each bunchcrossing
00056   unsigned int maxNbSources_;
00057   
00058   std::vector<std::vector<std::vector<edm::EventID> > > idFirstPileup_;
00059  
00060   int nBcrossings_;
00061   int minBunch_;
00062 };
00063 
00064 
00065 #endif