CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
CrossingFramePlaybackInfo Class Reference

#include <CrossingFramePlaybackInfo.h>

Public Member Functions

 CrossingFramePlaybackInfo ()
 
 CrossingFramePlaybackInfo (int minBunch, int maxBunch, unsigned int maxNbSources)
 
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 21 of file CrossingFramePlaybackInfo.h.

Constructor & Destructor Documentation

CrossingFramePlaybackInfo::CrossingFramePlaybackInfo ( )
inline

Definition at line 27 of file CrossingFramePlaybackInfo.h.

27 {;}
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_.

3  :maxNbSources_(maxNbSources),minBunch_(minBunch)
4 {
5  //initialise data structures
6  nBcrossings_=maxBunch-minBunch+1;
9  nrEvents_.resize(maxNbSources_);
10  for (unsigned int i=0;i<maxNbSources_;++i) {
11  pileupFileNr_[i].resize(nBcrossings_);
12  idFirstPileup_[i].resize(nBcrossings_);
13  nrEvents_[i].resize(nBcrossings_);
14  for (int j=0;j<nBcrossings_;++j) {
15  (pileupFileNr_[i])[j]=-1;
16  (idFirstPileup_[i])[j]=edm::EventID(0,0,0);
17  (nrEvents_[i])[j]=0;
18  }
19  }
20 }
int i
Definition: DBlmapReader.cc:9
std::vector< std::vector< int > > pileupFileNr_
int j
Definition: DBlmapReader.cc:9
std::vector< std::vector< edm::EventID > > idFirstPileup_
std::vector< std::vector< unsigned int > > nrEvents_
CrossingFramePlaybackInfo::~CrossingFramePlaybackInfo ( )
inline

Definition at line 30 of file CrossingFramePlaybackInfo.h.

30 {;}

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 37 of file CrossingFramePlaybackInfo.h.

References idFirstPileup_, nrEvents_, pileupFileNr_, and alignCSCRings::s.

37  {
38  ids=idFirstPileup_[s];
39  fileNrs= pileupFileNr_[s];
40  nrEvents=nrEvents_[s];
41  }
std::vector< std::vector< int > > pileupFileNr_
std::vector< std::vector< edm::EventID > > idFirstPileup_
std::vector< std::vector< unsigned int > > nrEvents_
int CrossingFramePlaybackInfo::getNrEvents ( const unsigned int  s,
const int  bcr 
) const
inline

Definition at line 35 of file CrossingFramePlaybackInfo.h.

References minBunch_, and nrEvents_.

35 {return (nrEvents_[s])[bcr-minBunch_];}
std::vector< std::vector< unsigned int > > nrEvents_
edm::EventID CrossingFramePlaybackInfo::getStartEventId ( const unsigned int  s,
const int  bcr 
) const
inline

Definition at line 34 of file CrossingFramePlaybackInfo.h.

References idFirstPileup_, and minBunch_.

34 {return (idFirstPileup_[s])[bcr-minBunch_];}
std::vector< std::vector< edm::EventID > > idFirstPileup_
int CrossingFramePlaybackInfo::getStartFileNr ( const unsigned int  s,
const int  bcr 
) const
inline

Definition at line 33 of file CrossingFramePlaybackInfo.h.

References minBunch_, and pileupFileNr_.

33 {return (pileupFileNr_[s])[bcr-minBunch_];}
std::vector< std::vector< int > > pileupFileNr_
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_, pileupFileNr_, and alignCSCRings::s.

23 {
24  idFirstPileup_[s]=id;
25  pileupFileNr_[s]=fileNr;
26  nrEvents_[s]=nrEvents;
27 }
std::vector< std::vector< int > > pileupFileNr_
std::vector< std::vector< edm::EventID > > idFirstPileup_
std::vector< std::vector< unsigned int > > nrEvents_
void CrossingFramePlaybackInfo::setNrEvents ( const unsigned int  nr,
const unsigned int  s,
const int  bcr 
)
inline

Definition at line 47 of file CrossingFramePlaybackInfo.h.

References minBunch_, nrEvents_, and alignCSCRings::s.

47 {nrEvents_[s][bcr-minBunch_]=nr;}
std::vector< std::vector< unsigned int > > nrEvents_
void CrossingFramePlaybackInfo::setStartEventId ( const edm::EventID id,
const unsigned int  s,
const int  bcr 
)
inline

Definition at line 46 of file CrossingFramePlaybackInfo.h.

References idFirstPileup_, minBunch_, and alignCSCRings::s.

46 {idFirstPileup_[s][bcr-minBunch_]=id;}
std::vector< std::vector< edm::EventID > > idFirstPileup_
void CrossingFramePlaybackInfo::setStartFileNr ( const unsigned int  nr,
const unsigned int  s,
const int  bcr 
)
inline

Definition at line 45 of file CrossingFramePlaybackInfo.h.

References minBunch_, pileupFileNr_, and alignCSCRings::s.

Member Data Documentation

std::vector<std::vector<edm::EventID> > CrossingFramePlaybackInfo::idFirstPileup_
private
unsigned int CrossingFramePlaybackInfo::maxNbSources_
private

Definition at line 53 of file CrossingFramePlaybackInfo.h.

Referenced by CrossingFramePlaybackInfo().

int CrossingFramePlaybackInfo::minBunch_
private
int CrossingFramePlaybackInfo::nBcrossings_
private

Definition at line 58 of file CrossingFramePlaybackInfo.h.

Referenced by CrossingFramePlaybackInfo().

std::vector<std::vector<unsigned int> > CrossingFramePlaybackInfo::nrEvents_
private
std::vector<std::vector<int> > CrossingFramePlaybackInfo::pileupFileNr_
private