CMS 3D CMS Logo

CrossingFramePlaybackInfoNew.h
Go to the documentation of this file.
1 #ifndef CROSSING_FRAME_PLAYBACKINFONEW_H
2 #define CROSSING_FRAME_PLAYBACKINFONEW_H
3 
19 #include <iterator>
20 #include <vector>
21 #include <utility>
22 
24 public:
25  // con- and destructors
26 
28  CrossingFramePlaybackInfoNew(int minBunch, int maxBunch, unsigned int maxNbSources);
29 
31 
32  typedef std::vector<edm::SecondaryEventIDAndFileInfo>::iterator iterator;
33  typedef std::pair<iterator, iterator> range;
34 
35  // setter
36  void setInfo(std::vector<edm::SecondaryEventIDAndFileInfo>& eventInfo, std::vector<size_t>& sizes) {
37  sizes_.swap(sizes);
38  eventInfo_.swap(eventInfo);
39  }
40 
41  // getters
42  std::vector<edm::SecondaryEventIDAndFileInfo>::const_iterator getEventId(size_t offset) const {
43  std::vector<edm::SecondaryEventIDAndFileInfo>::const_iterator iter = eventInfo_.begin();
44  std::advance(iter, offset);
45  return iter;
46  }
47 
48  size_t getNumberOfEvents(int bunchIdx, size_t sourceNumber) const {
49  return sizes_[((bunchIdx - minBunch_) * maxNbSources_) + sourceNumber];
50  }
51 
52  //private:
53 
54  // we need the same info for each bunchcrossing
55  unsigned int maxNbSources_;
57  std::vector<size_t> sizes_;
58  std::vector<edm::SecondaryEventIDAndFileInfo> eventInfo_;
59  int minBunch_;
60 };
61 
62 #endif
CrossingFramePlaybackInfoNew::getEventId
std::vector< edm::SecondaryEventIDAndFileInfo >::const_iterator getEventId(size_t offset) const
Definition: CrossingFramePlaybackInfoNew.h:42
MessageLogger.h
CrossingFramePlaybackInfoNew::minBunch_
int minBunch_
Definition: CrossingFramePlaybackInfoNew.h:59
CrossingFramePlaybackInfoNew::iterator
std::vector< edm::SecondaryEventIDAndFileInfo >::iterator iterator
Definition: CrossingFramePlaybackInfoNew.h:32
MixingModule_cfi.maxBunch
maxBunch
Definition: MixingModule_cfi.py:42
CrossingFramePlaybackInfoNew::range
std::pair< iterator, iterator > range
Definition: CrossingFramePlaybackInfoNew.h:33
CrossingFramePlaybackInfoNew::nBcrossings_
int nBcrossings_
Definition: CrossingFramePlaybackInfoNew.h:56
CrossingFramePlaybackInfoNew
Definition: CrossingFramePlaybackInfoNew.h:23
EventID.h
CrossingFramePlaybackInfoNew::maxNbSources_
unsigned int maxNbSources_
Definition: CrossingFramePlaybackInfoNew.h:55
ZMuMuAnalysisNtupler_cff.eventInfo
eventInfo
Definition: ZMuMuAnalysisNtupler_cff.py:15
CrossingFramePlaybackInfoNew::eventInfo_
std::vector< edm::SecondaryEventIDAndFileInfo > eventInfo_
Definition: CrossingFramePlaybackInfoNew.h:58
CrossingFramePlaybackInfoNew::setInfo
void setInfo(std::vector< edm::SecondaryEventIDAndFileInfo > &eventInfo, std::vector< size_t > &sizes)
Definition: CrossingFramePlaybackInfoNew.h:36
CrossingFramePlaybackInfoNew::~CrossingFramePlaybackInfoNew
~CrossingFramePlaybackInfoNew()
Definition: CrossingFramePlaybackInfoNew.h:30
MixingModule_cfi.minBunch
minBunch
Definition: MixingModule_cfi.py:43
CrossingFramePlaybackInfoNew::CrossingFramePlaybackInfoNew
CrossingFramePlaybackInfoNew()
Definition: CrossingFramePlaybackInfoNew.h:27
hltrates_dqm_sourceclient-live_cfg.offset
offset
Definition: hltrates_dqm_sourceclient-live_cfg.py:78
CrossingFramePlaybackInfoNew::getNumberOfEvents
size_t getNumberOfEvents(int bunchIdx, size_t sourceNumber) const
Definition: CrossingFramePlaybackInfoNew.h:48
CrossingFramePlaybackInfoNew::sizes_
std::vector< size_t > sizes_
Definition: CrossingFramePlaybackInfoNew.h:57
SecondaryEventIDAndFileInfo.h