CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10_patch1/src/SimDataFormats/CrossingFrame/src/CrossingFramePlaybackInfo.cc

Go to the documentation of this file.
00001 # include "SimDataFormats/CrossingFrame/interface/CrossingFramePlaybackInfo.h"
00002 
00003 CrossingFramePlaybackInfo::CrossingFramePlaybackInfo(int minBunch, int maxBunch, unsigned int maxNbSources):maxNbSources_(maxNbSources),minBunch_(minBunch)
00004 {
00005   //initialise data structures
00006   nBcrossings_=maxBunch-minBunch+1;
00007   pileupFileNr_.resize(maxNbSources_);
00008   idFirstPileup_.resize(maxNbSources_);
00009   nrEvents_.resize(maxNbSources_);
00010   for (unsigned int i=0;i<maxNbSources_;++i) {
00011     pileupFileNr_[i].resize(nBcrossings_);
00012     idFirstPileup_[i].resize(nBcrossings_);
00013     nrEvents_[i].resize(nBcrossings_);
00014     for (int j=0;j<nBcrossings_;++j) {
00015       (pileupFileNr_[i])[j]=-1;
00016       (idFirstPileup_[i])[j]=edm::EventID(0,0,0);
00017       (nrEvents_[i])[j]=0;
00018     }
00019   }
00020 }
00021 
00022 void CrossingFramePlaybackInfo::setEventStartInfo(std::vector<edm::EventID> &id, std::vector<int>& fileNr, std::vector<unsigned int>& nrEvents, const unsigned int s)
00023 {
00024   idFirstPileup_[s]=id;
00025   pileupFileNr_[s]=fileNr;
00026   nrEvents_[s]=nrEvents;
00027 }