CMS 3D CMS Logo

Public Member Functions | Private Attributes

CrossingFramePlaybackInfo Class Reference

#include <CrossingFramePlaybackInfo.h>

List of all members.

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.

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

                                                                                                         :maxNbSources_(maxNbSources),minBunch_(minBunch)
{
  //initialise data structures
  nBcrossings_=maxBunch-minBunch+1;
  pileupFileNr_.resize(maxNbSources_);
  idFirstPileup_.resize(maxNbSources_);
  nrEvents_.resize(maxNbSources_);
  for (unsigned int i=0;i<maxNbSources_;++i) {
    pileupFileNr_[i].resize(nBcrossings_);
    idFirstPileup_[i].resize(nBcrossings_);
    nrEvents_[i].resize(nBcrossings_);
    for (int j=0;j<nBcrossings_;++j) {
      (pileupFileNr_[i])[j]=-1;
      (idFirstPileup_[i])[j]=edm::EventID(0,0,0);
      (nrEvents_[i])[j]=0;
    }
  }
}
CrossingFramePlaybackInfo::~CrossingFramePlaybackInfo ( ) [inline]

Definition at line 30 of file CrossingFramePlaybackInfo.h.

{;}

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.

                                                                                                                                               {
    ids=idFirstPileup_[s];
    fileNrs= pileupFileNr_[s];
    nrEvents=nrEvents_[s];
  }
int CrossingFramePlaybackInfo::getNrEvents ( const unsigned int  s,
const int  bcr 
) const [inline]

Definition at line 35 of file CrossingFramePlaybackInfo.h.

References minBunch_, and nrEvents_.

{return (nrEvents_[s])[bcr-minBunch_];}
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_.

{return (idFirstPileup_[s])[bcr-minBunch_];}
int CrossingFramePlaybackInfo::getStartFileNr ( const unsigned int  s,
const int  bcr 
) const [inline]

Definition at line 33 of file CrossingFramePlaybackInfo.h.

References minBunch_, and pileupFileNr_.

{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_, pileupFileNr_, and alignCSCRings::s.

{
  idFirstPileup_[s]=id;
  pileupFileNr_[s]=fileNr;
  nrEvents_[s]=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.

{nrEvents_[s][bcr-minBunch_]=nr;}
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.

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]

Definition at line 53 of file CrossingFramePlaybackInfo.h.

Referenced by CrossingFramePlaybackInfo().

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]