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 #include <vector>
00020
00021 class CrossingFramePlaybackInfo
00022 {
00023
00024 public:
00025
00026
00027 CrossingFramePlaybackInfo() {;}
00028 CrossingFramePlaybackInfo(int minBunch, int maxBunch, unsigned int maxNbSources);
00029
00030 ~CrossingFramePlaybackInfo() {;}
00031
00032
00033 int getStartFileNr(const unsigned int s,const int bcr) const {return (pileupFileNr_[s])[bcr-minBunch_];}
00034 edm::EventID getStartEventId(const unsigned int s,const int bcr) const {return (idFirstPileup_[s])[bcr-minBunch_];}
00035 int getNrEvents(const unsigned int s,const int bcr) const {return (nrEvents_[s])[bcr-minBunch_];}
00036
00037 void getEventStartInfo(std::vector<edm::EventID> &ids, std::vector<int> & fileNrs, std::vector<unsigned int> &nrEvents, const unsigned int s) const {
00038 ids=idFirstPileup_[s];
00039 fileNrs= pileupFileNr_[s];
00040 nrEvents=nrEvents_[s];
00041 }
00042
00043
00044
00045 void setStartFileNr(const unsigned int nr, const unsigned int s,const int bcr) {pileupFileNr_[s][bcr-minBunch_]=nr;}
00046 void setStartEventId( const edm::EventID &id, const unsigned int s, const int bcr) {idFirstPileup_[s][bcr-minBunch_]=id;}
00047 void setNrEvents(const unsigned int nr, const unsigned int s, const int bcr) {nrEvents_[s][bcr-minBunch_]=nr;}
00048 void setEventStartInfo(std::vector<edm::EventID> &id, std::vector<int>& fileNr, std::vector<unsigned int>& nrEvents, const unsigned int s);
00049
00050 private:
00051
00052
00053 unsigned int maxNbSources_;
00054 std::vector<std::vector<edm::EventID> > idFirstPileup_;
00055 std::vector<std::vector<int> > pileupFileNr_;
00056 std::vector<std::vector<unsigned int> > nrEvents_;
00057
00058 int nBcrossings_;
00059 int minBunch_;
00060
00061 };
00062
00063
00064 #endif