CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_7_hltpatch2/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) {idFirstPileup_[s][bcr-minBunch_]=id;}
00046   void setEventStartInfo(std::vector<std::vector<edm::EventID> > &id, const unsigned int s);
00047 
00048  private:
00049 
00050   // we need the same info for each bunchcrossing
00051   unsigned int maxNbSources_;
00052   
00053   std::vector<std::vector<std::vector<edm::EventID> > > idFirstPileup_;
00054  
00055   int nBcrossings_;
00056   int minBunch_;
00057 };
00058 
00059 
00060 #endif