CMS 3D CMS Logo

CrossingFramePlaybackInfo Class Reference

CrossingFramePlaybackInfo is written by the Sim Mixing Module it contains information to allow a 'playback' of the MixingModule i.e to find again, on an event/event basis, exactly the same events to superpose. More...

#include <SimDataFormats/CrossingFrame/interface/CrossingFramePlaybackInfo.h>

List of all members.

Public Member Functions

 CrossingFramePlaybackInfo (int minBunch, int maxBunch, unsigned int maxNbSources)
 CrossingFramePlaybackInfo ()
void getEventStartInfo (std::vector< edm::EventID > &ids, std::vector< int > &fileNrs, std::vector< unsigned int > &nrEvents, const unsigned int s) const
int getNrEvents (const unsigned int s, const int bcr) const
edm::EventID getStartEventId (const unsigned int s, const int bcr) const
int getStartFileNr (const unsigned int s, const int bcr) const
void setEventStartInfo (std::vector< edm::EventID > &id, std::vector< int > &fileNr, std::vector< unsigned int > &nrEvents, const unsigned int s)
void setNrEvents (const unsigned int nr, const unsigned int s, const int bcr)
void setStartEventId (const edm::EventID &id, const unsigned int s, const int bcr)
void setStartFileNr (const unsigned int nr, const unsigned int s, const int bcr)
 ~CrossingFramePlaybackInfo ()

Private Attributes

std::vector< std::vector
< edm::EventID > > 
idFirstPileup_
unsigned int maxNbSources_
int minBunch_
int nBcrossings_
std::vector< std::vector
< unsigned int > > 
nrEvents_
std::vector< std::vector< int > > pileupFileNr_


Detailed Description

CrossingFramePlaybackInfo is written by the Sim Mixing Module it contains information to allow a 'playback' of the MixingModule i.e to find again, on an event/event basis, exactly the same events to superpose.

Author:
Ursula Berthon, Claude Charlot, LLR Palaiseau
Version:
1st Version Nov 2007

Definition at line 20 of file CrossingFramePlaybackInfo.h.


Constructor & Destructor Documentation

CrossingFramePlaybackInfo::CrossingFramePlaybackInfo (  )  [inline]

Definition at line 26 of file CrossingFramePlaybackInfo.h.

00026 {;}

CrossingFramePlaybackInfo::CrossingFramePlaybackInfo ( int  minBunch,
int  maxBunch,
unsigned int  maxNbSources 
)

Definition at line 3 of file CrossingFramePlaybackInfo.cc.

References i, idFirstPileup_, j, maxNbSources_, nBcrossings_, nrEvents_, and pileupFileNr_.

00003                                                                                                          :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);
00017       (nrEvents_[i])[j]=0;
00018     }
00019   }
00020 }

CrossingFramePlaybackInfo::~CrossingFramePlaybackInfo (  )  [inline]

Definition at line 29 of file CrossingFramePlaybackInfo.h.

00029 {;}


Member Function Documentation

void CrossingFramePlaybackInfo::getEventStartInfo ( std::vector< edm::EventID > &  ids,
std::vector< int > &  fileNrs,
std::vector< unsigned int > &  nrEvents,
const unsigned int  s 
) const [inline]

Definition at line 36 of file CrossingFramePlaybackInfo.h.

References idFirstPileup_, nrEvents_, and pileupFileNr_.

00036                                                                                                                                                {
00037     ids=idFirstPileup_[s];
00038     fileNrs= pileupFileNr_[s];
00039     nrEvents=nrEvents_[s];
00040   }

int CrossingFramePlaybackInfo::getNrEvents ( const unsigned int  s,
const int  bcr 
) const [inline]

Definition at line 34 of file CrossingFramePlaybackInfo.h.

References minBunch_, and nrEvents_.

00034 {return (nrEvents_[s])[bcr-minBunch_];}

edm::EventID CrossingFramePlaybackInfo::getStartEventId ( const unsigned int  s,
const int  bcr 
) const [inline]

Definition at line 33 of file CrossingFramePlaybackInfo.h.

References idFirstPileup_, and minBunch_.

00033 {return (idFirstPileup_[s])[bcr-minBunch_];}

int CrossingFramePlaybackInfo::getStartFileNr ( const unsigned int  s,
const int  bcr 
) const [inline]

Definition at line 32 of file CrossingFramePlaybackInfo.h.

References minBunch_, and pileupFileNr_.

00032 {return (pileupFileNr_[s])[bcr-minBunch_];}

void CrossingFramePlaybackInfo::setEventStartInfo ( std::vector< edm::EventID > &  id,
std::vector< int > &  fileNr,
std::vector< unsigned int > &  nrEvents,
const unsigned int  s 
)

Definition at line 22 of file CrossingFramePlaybackInfo.cc.

References idFirstPileup_, nrEvents_, and pileupFileNr_.

00023 {
00024   idFirstPileup_[s]=id;
00025   pileupFileNr_[s]=fileNr;
00026   nrEvents_[s]=nrEvents;
00027 }

void CrossingFramePlaybackInfo::setNrEvents ( const unsigned int  nr,
const unsigned int  s,
const int  bcr 
) [inline]

Definition at line 46 of file CrossingFramePlaybackInfo.h.

References minBunch_, and nrEvents_.

00046 {nrEvents_[s][bcr-minBunch_]=nr;}

void CrossingFramePlaybackInfo::setStartEventId ( const edm::EventID id,
const unsigned int  s,
const int  bcr 
) [inline]

Definition at line 45 of file CrossingFramePlaybackInfo.h.

References idFirstPileup_, and minBunch_.

00045 {idFirstPileup_[s][bcr-minBunch_]=id;}

void CrossingFramePlaybackInfo::setStartFileNr ( const unsigned int  nr,
const unsigned int  s,
const int  bcr 
) [inline]

Definition at line 44 of file CrossingFramePlaybackInfo.h.

References minBunch_, and pileupFileNr_.

00044 {pileupFileNr_[s][bcr-minBunch_]=nr;}


Member Data Documentation

std::vector<std::vector<edm::EventID> > CrossingFramePlaybackInfo::idFirstPileup_ [private]

Definition at line 53 of file CrossingFramePlaybackInfo.h.

Referenced by CrossingFramePlaybackInfo(), getEventStartInfo(), getStartEventId(), setEventStartInfo(), and setStartEventId().

unsigned int CrossingFramePlaybackInfo::maxNbSources_ [private]

Definition at line 52 of file CrossingFramePlaybackInfo.h.

Referenced by CrossingFramePlaybackInfo().

int CrossingFramePlaybackInfo::minBunch_ [private]

Definition at line 58 of file CrossingFramePlaybackInfo.h.

Referenced by getNrEvents(), getStartEventId(), getStartFileNr(), setNrEvents(), setStartEventId(), and setStartFileNr().

int CrossingFramePlaybackInfo::nBcrossings_ [private]

Definition at line 57 of file CrossingFramePlaybackInfo.h.

Referenced by CrossingFramePlaybackInfo().

std::vector<std::vector<unsigned int> > CrossingFramePlaybackInfo::nrEvents_ [private]

Definition at line 55 of file CrossingFramePlaybackInfo.h.

Referenced by CrossingFramePlaybackInfo(), getEventStartInfo(), getNrEvents(), setEventStartInfo(), and setNrEvents().

std::vector<std::vector<int> > CrossingFramePlaybackInfo::pileupFileNr_ [private]

Definition at line 54 of file CrossingFramePlaybackInfo.h.

Referenced by CrossingFramePlaybackInfo(), getEventStartInfo(), getStartFileNr(), setEventStartInfo(), and setStartFileNr().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:17:00 2009 for CMSSW by  doxygen 1.5.4