CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CrossingFramePlaybackInfo.h
Go to the documentation of this file.
1 #ifndef CROSSING_FRAME_PLAYBACKINFO_H
2 #define CROSSING_FRAME_PLAYBACKINFO_H
3 
19 #include <vector>
20 
22 {
23 
24  public:
25  // con- and destructors
26 
28  CrossingFramePlaybackInfo(int minBunch, int maxBunch, unsigned int maxNbSources);
29 
31 
32  // getters
33  int getStartFileNr(const unsigned int s,const int bcr) const {return (pileupFileNr_[s])[bcr-minBunch_];}
34  edm::EventID getStartEventId(const unsigned int s,const int bcr) const {return (idFirstPileup_[s])[bcr-minBunch_];}
35  int getNrEvents(const unsigned int s,const int bcr) const {return (nrEvents_[s])[bcr-minBunch_];}
36 
37  void getEventStartInfo(std::vector<edm::EventID> &ids, std::vector<int> & fileNrs, std::vector<unsigned int> &nrEvents, const unsigned int s) const {
38  ids=idFirstPileup_[s];
39  fileNrs= pileupFileNr_[s];
40  nrEvents=nrEvents_[s];
41  }
42 
43  // setters
44  //FIXME: max nr sources, test on max nrsources
45  void setStartFileNr(const unsigned int nr, const unsigned int s,const int bcr) {pileupFileNr_[s][bcr-minBunch_]=nr;}
46  void setStartEventId( const edm::EventID &id, const unsigned int s, const int bcr) {idFirstPileup_[s][bcr-minBunch_]=id;}
47  void setNrEvents(const unsigned int nr, const unsigned int s, const int bcr) {nrEvents_[s][bcr-minBunch_]=nr;}
48  void setEventStartInfo(std::vector<edm::EventID> &id, std::vector<int>& fileNr, std::vector<unsigned int>& nrEvents, const unsigned int s);
49 
50  private:
51 
52  // we need the same info for each bunchcrossing
53  unsigned int maxNbSources_;
54  std::vector<std::vector<edm::EventID> > idFirstPileup_; // EventId fof the first pileup event used for this signal event
55  std::vector<std::vector<int> > pileupFileNr_; // ordinal number of the pileup file this event was in
56  std::vector<std::vector<unsigned int> > nrEvents_;
57 
59  int minBunch_;
60 
61 };
62 
63 
64 #endif
void setNrEvents(const unsigned int nr, const unsigned int s, const int bcr)
void setEventStartInfo(std::vector< edm::EventID > &id, std::vector< int > &fileNr, std::vector< unsigned int > &nrEvents, const unsigned int s)
std::vector< std::vector< int > > pileupFileNr_
void setStartEventId(const edm::EventID &id, const unsigned int s, const int bcr)
void getEventStartInfo(std::vector< edm::EventID > &ids, std::vector< int > &fileNrs, std::vector< unsigned int > &nrEvents, const unsigned int s) const
int getStartFileNr(const unsigned int s, const int bcr) const
std::vector< std::vector< edm::EventID > > idFirstPileup_
void setStartFileNr(const unsigned int nr, const unsigned int s, const int bcr)
edm::EventID getStartEventId(const unsigned int s, const int bcr) const
int getNrEvents(const unsigned int s, const int bcr) const
std::vector< std::vector< unsigned int > > nrEvents_