CMS 3D CMS Logo

CrossingFramePlaybackInfo.h

Go to the documentation of this file.
00001 #ifndef CROSSING_FRAME_PLAYBACKINFO_H
00002 #define CROSSING_FRAME_PLAYBACKINFO_H
00003 
00017 #include "DataFormats/Provenance/interface/EventID.h"
00018 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00019 
00020 class CrossingFramePlaybackInfo 
00021 { 
00022 
00023  public:
00024   // con- and destructors
00025 
00026   CrossingFramePlaybackInfo() {;}
00027   CrossingFramePlaybackInfo(int minBunch, int maxBunch, unsigned int maxNbSources);
00028 
00029   ~CrossingFramePlaybackInfo() {;}
00030 
00031   // getters 
00032   int getStartFileNr(const unsigned int s,const int bcr) const {return (pileupFileNr_[s])[bcr-minBunch_];}
00033   edm::EventID getStartEventId(const unsigned int s,const int bcr) const {return (idFirstPileup_[s])[bcr-minBunch_];}
00034   int getNrEvents(const unsigned int s,const int bcr) const {return (nrEvents_[s])[bcr-minBunch_];}
00035 
00036   void getEventStartInfo(std::vector<edm::EventID> &ids, std::vector<int> &  fileNrs, std::vector<unsigned int> &nrEvents, const unsigned int s) const {
00037     ids=idFirstPileup_[s];
00038     fileNrs= pileupFileNr_[s];
00039     nrEvents=nrEvents_[s];
00040   }
00041 
00042   // setters 
00043   //FIXME: max nr sources, test on max nrsources
00044   void setStartFileNr(const  unsigned int nr, const unsigned int s,const int bcr) {pileupFileNr_[s][bcr-minBunch_]=nr;}
00045   void setStartEventId( const edm::EventID &id, const unsigned int s, const int bcr) {idFirstPileup_[s][bcr-minBunch_]=id;}
00046   void setNrEvents(const  unsigned int nr, const unsigned int s, const int bcr) {nrEvents_[s][bcr-minBunch_]=nr;}
00047   void setEventStartInfo(std::vector<edm::EventID> &id, std::vector<int>& fileNr, std::vector<unsigned int>& nrEvents, const unsigned int s);
00048 
00049  private:
00050 
00051   // we need the same info for each bunchcrossing
00052   unsigned int maxNbSources_;
00053   std::vector<std::vector<edm::EventID> > idFirstPileup_;   // EventId fof the first pileup event used for this signal event
00054   std::vector<std::vector<int> > pileupFileNr_;             // ordinal number of the pileup file this event was in
00055   std::vector<std::vector<unsigned int> > nrEvents_;
00056 
00057   int nBcrossings_;
00058   int minBunch_;
00059 
00060 };
00061 
00062 
00063 #endif 

Generated on Tue Jun 9 17:46:31 2009 for CMSSW by  doxygen 1.5.4