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 
18 #include <iterator>
19 #include <vector>
20 #include <utility>
21 
23 public:
24  // con- and destructors
25 
27  CrossingFramePlaybackInfoNew(int minBunch, int maxBunch, unsigned int maxNbSources);
28 
30 
31  typedef std::vector<edm::SecondaryEventIDAndFileInfo>::iterator iterator;
32  typedef std::pair<iterator, iterator> range;
33 
34  // setter
35  void setInfo(std::vector<edm::SecondaryEventIDAndFileInfo>& eventInfo, std::vector<size_t>& sizes) {
36  sizes_.swap(sizes);
37  eventInfo_.swap(eventInfo);
38  }
39 
40  // getters
41  std::vector<edm::SecondaryEventIDAndFileInfo>::const_iterator getEventId(size_t offset) const {
42  std::vector<edm::SecondaryEventIDAndFileInfo>::const_iterator iter = eventInfo_.begin();
43  std::advance(iter, offset);
44  return iter;
45  }
46 
47  size_t getNumberOfEvents(int bunchIdx, size_t sourceNumber) const {
48  return sizes_[((bunchIdx - minBunch_) * maxNbSources_) + sourceNumber];
49  }
50 
51  //private:
52 
53  // we need the same info for each bunchcrossing
54  unsigned int maxNbSources_;
56  std::vector<size_t> sizes_;
57  std::vector<edm::SecondaryEventIDAndFileInfo> eventInfo_;
58  int minBunch_;
59 };
60 
61 #endif
CrossingFramePlaybackInfoNew::getEventId
std::vector< edm::SecondaryEventIDAndFileInfo >::const_iterator getEventId(size_t offset) const
Definition: CrossingFramePlaybackInfoNew.h:41
CrossingFramePlaybackInfoNew::minBunch_
int minBunch_
Definition: CrossingFramePlaybackInfoNew.h:58
CrossingFramePlaybackInfoNew::iterator
std::vector< edm::SecondaryEventIDAndFileInfo >::iterator iterator
Definition: CrossingFramePlaybackInfoNew.h:31
MixingModule_cfi.maxBunch
maxBunch
Definition: MixingModule_cfi.py:42
CrossingFramePlaybackInfoNew::range
std::pair< iterator, iterator > range
Definition: CrossingFramePlaybackInfoNew.h:32
CrossingFramePlaybackInfoNew::nBcrossings_
int nBcrossings_
Definition: CrossingFramePlaybackInfoNew.h:55
CrossingFramePlaybackInfoNew
Definition: CrossingFramePlaybackInfoNew.h:22
EventID.h
CrossingFramePlaybackInfoNew::maxNbSources_
unsigned int maxNbSources_
Definition: CrossingFramePlaybackInfoNew.h:54
CrossingFramePlaybackInfoNew::eventInfo_
std::vector< edm::SecondaryEventIDAndFileInfo > eventInfo_
Definition: CrossingFramePlaybackInfoNew.h:57
CrossingFramePlaybackInfoNew::setInfo
void setInfo(std::vector< edm::SecondaryEventIDAndFileInfo > &eventInfo, std::vector< size_t > &sizes)
Definition: CrossingFramePlaybackInfoNew.h:35
CrossingFramePlaybackInfoNew::~CrossingFramePlaybackInfoNew
~CrossingFramePlaybackInfoNew()
Definition: CrossingFramePlaybackInfoNew.h:29
dumpTauVariables_cfi.eventInfo
eventInfo
add run, event number and lumi section
Definition: dumpTauVariables_cfi.py:12
MixingModule_cfi.minBunch
minBunch
Definition: MixingModule_cfi.py:43
CrossingFramePlaybackInfoNew::CrossingFramePlaybackInfoNew
CrossingFramePlaybackInfoNew()
Definition: CrossingFramePlaybackInfoNew.h:26
hltrates_dqm_sourceclient-live_cfg.offset
offset
Definition: hltrates_dqm_sourceclient-live_cfg.py:82
CrossingFramePlaybackInfoNew::getNumberOfEvents
size_t getNumberOfEvents(int bunchIdx, size_t sourceNumber) const
Definition: CrossingFramePlaybackInfoNew.h:47
CrossingFramePlaybackInfoNew::sizes_
std::vector< size_t > sizes_
Definition: CrossingFramePlaybackInfoNew.h:56
SecondaryEventIDAndFileInfo.h