CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
PCrossingFrame< T > Class Template Reference

#include <CrossingFrame.h>

Public Member Functions

std::pair< int, int > getBunchRange () const
 
int getBunchSpace () const
 
edm::EventID getEventID () const
 
edm::EventID getIdFirstPileup () const
 
unsigned int getMaxNbSources () const
 
unsigned int getPileupFileNr () const
 
const std::vector< unsigned int > & getPileupOffsetsBcr () const
 
const std::vector< std::vector< unsigned int > > & getPileupOffsetsSource () const
 
const std::vector< T > & getPileupRefs () const
 
std::vector< const T * > getPileups () const
 
const std::vector< T > & getSignals () const
 
std::string getSubDet () const
 
 PCrossingFrame ()
 
 PCrossingFrame (const CrossingFrame< T > &cf)
 
void setAllExceptSignalFrom (const PCrossingFrame< T > &cf)
 
 ~PCrossingFrame ()
 

Private Attributes

int firstPCrossing_
 
int lastPCrossing_
 
int PbunchSpace_
 
edm::EventID PCFidFirstPileup_
 
unsigned int PCFpileupFileNr_
 
std::vector< unsigned int > PCFpileupOffsetsBcr_
 
std::vector< std::vector< unsigned int > > PCFpileupOffsetsSource_
 
std::vector< TPCFpileups_
 
std::vector< TPCFsignals_
 
std::string PCFsubdet_
 
edm::EventID Pid_
 
unsigned int PmaxNbSources_
 

Detailed Description

template<class T>
class PCrossingFrame< T >

PCrossingFrame allow the write the transient CrossingFrame

Author
EmiliaBecheva, Claude Charlot, LLR Palaiseau
Version
1st Version April 2009

Definition at line 28 of file CrossingFrame.h.

Constructor & Destructor Documentation

template<class T>
PCrossingFrame< T >::PCrossingFrame ( )
inline

Definition at line 22 of file PCrossingFrame.h.

Referenced by PCrossingFrame< PCaloHit >::PCrossingFrame().

22 {}
template<class T>
PCrossingFrame< T >::PCrossingFrame ( const CrossingFrame< T > &  cf)

Definition at line 66 of file PCrossingFrame.h.

References PCrossingFrame< T >::firstPCrossing_, CrossingFrame< T >::getBunchRange(), CrossingFrame< T >::getBunchSpace(), CrossingFrame< T >::getEventID(), CrossingFrame< T >::getIdFirstPileup(), CrossingFrame< T >::getMaxNbSources(), CrossingFrame< T >::getPileupFileNr(), CrossingFrame< T >::getPileupOffsetsBcr(), CrossingFrame< T >::getPileupOffsetsSource(), CrossingFrame< T >::getPileups(), CrossingFrame< T >::getSignal(), CrossingFrame< T >::getSubDet(), PCrossingFrame< T >::lastPCrossing_, PCrossingFrame< T >::PbunchSpace_, PCrossingFrame< T >::PCFidFirstPileup_, PCrossingFrame< T >::PCFpileupFileNr_, PCrossingFrame< T >::PCFpileupOffsetsBcr_, PCrossingFrame< T >::PCFpileupOffsetsSource_, PCrossingFrame< T >::PCFpileups_, PCrossingFrame< T >::PCFsignals_, PCrossingFrame< T >::PCFsubdet_, PCrossingFrame< T >::Pid_, pileupDistInMC::pileups, and PCrossingFrame< T >::PmaxNbSources_.

67 {
68  //get data members from CrossingFrame
71  Pid_ = cf.getEventID();
72  firstPCrossing_ = cf.getBunchRange().first;
73  lastPCrossing_ = cf.getBunchRange().second;
74 
75  const auto& pileups = cf.getPileups();
76  PCFpileups_.reserve(pileups.size());
77  for(const auto& ptr: pileups) {
78  PCFpileups_.emplace_back(*ptr);
79  }
80  const auto& signal = cf.getSignal();
81  PCFsignals_.reserve(signal.size());
82  for(const auto& ptr: signal) {
83  PCFsignals_.emplace_back(*ptr);
84  }
85 
86  PCFsubdet_ = cf.getSubDet();
91 }
unsigned int PCFpileupFileNr_
std::pair< int, int > getBunchRange() const
Definition: CrossingFrame.h:88
std::vector< std::vector< unsigned int > > PCFpileupOffsetsSource_
edm::EventID PCFidFirstPileup_
const std::vector< unsigned int > & getPileupOffsetsBcr() const
Definition: CrossingFrame.h:94
unsigned int getMaxNbSources() const
Definition: CrossingFrame.h:90
unsigned int PmaxNbSources_
std::string getSubDet() const
Definition: CrossingFrame.h:91
edm::EventID getEventID() const
Definition: CrossingFrame.h:87
std::vector< T > PCFsignals_
const std::vector< std::vector< unsigned int > > & getPileupOffsetsSource() const
Definition: CrossingFrame.h:95
const std::vector< const T * > & getPileups() const
Definition: CrossingFrame.h:96
const std::vector< const T * > & getSignal() const
Definition: CrossingFrame.h:97
edm::EventID Pid_
unsigned int getPileupFileNr() const
Definition: CrossingFrame.h:92
std::vector< T > PCFpileups_
std::string PCFsubdet_
std::vector< unsigned int > PCFpileupOffsetsBcr_
edm::EventID getIdFirstPileup() const
Definition: CrossingFrame.h:93
int getBunchSpace() const
Definition: CrossingFrame.h:89
template<class T>
PCrossingFrame< T >::~PCrossingFrame ( )
inline

Definition at line 25 of file PCrossingFrame.h.

25 {;}

Member Function Documentation

template<class T>
std::pair<int,int> PCrossingFrame< T >::getBunchRange ( ) const
inline
template<class T>
int PCrossingFrame< T >::getBunchSpace ( ) const
inline
template<class T>
edm::EventID PCrossingFrame< T >::getEventID ( ) const
inline

Definition at line 30 of file PCrossingFrame.h.

30 {return Pid_;}
edm::EventID Pid_
template<class T>
edm::EventID PCrossingFrame< T >::getIdFirstPileup ( ) const
inline
template<class T>
unsigned int PCrossingFrame< T >::getMaxNbSources ( ) const
inline
template<class T>
unsigned int PCrossingFrame< T >::getPileupFileNr ( ) const
inline
template<class T>
const std::vector<unsigned int>& PCrossingFrame< T >::getPileupOffsetsBcr ( ) const
inline

Definition at line 44 of file PCrossingFrame.h.

Referenced by edm::MixingWorker< T >::copyPCrossingFrame(), and PCrossingFrame< T >::setAllExceptSignalFrom().

44 {return PCFpileupOffsetsBcr_;}
std::vector< unsigned int > PCFpileupOffsetsBcr_
template<class T>
const std::vector< std::vector<unsigned int> >& PCrossingFrame< T >::getPileupOffsetsSource ( ) const
inline

Definition at line 45 of file PCrossingFrame.h.

Referenced by edm::MixingWorker< T >::copyPCrossingFrame(), and PCrossingFrame< T >::setAllExceptSignalFrom().

45 {return PCFpileupOffsetsSource_;} //one per source
std::vector< std::vector< unsigned int > > PCFpileupOffsetsSource_
template<class T>
const std::vector<T>& PCrossingFrame< T >::getPileupRefs ( ) const
inline

Definition at line 32 of file PCrossingFrame.h.

Referenced by PCrossingFrame< T >::setAllExceptSignalFrom().

32 { return PCFpileups_; }
std::vector< T > PCFpileups_
template<class T>
std::vector<const T *> PCrossingFrame< T >::getPileups ( ) const
inline

Definition at line 33 of file PCrossingFrame.h.

Referenced by edm::MixingWorker< T >::copyPCrossingFrame().

33  {
34  std::vector<const T *> ret;
35  ret.reserve(PCFpileups_.size());
36  for(const auto& p: PCFpileups_) ret.emplace_back(&p);
37  return ret;
38  }
std::vector< T > PCFpileups_
template<class T>
const std::vector<T>& PCrossingFrame< T >::getSignals ( ) const
inline

Definition at line 31 of file PCrossingFrame.h.

31 { return PCFsignals_; }
std::vector< T > PCFsignals_
template<class T>
std::string PCrossingFrame< T >::getSubDet ( ) const
inline
template<typename T>
void PCrossingFrame< T >::setAllExceptSignalFrom ( const PCrossingFrame< T > &  cf)

Definition at line 94 of file PCrossingFrame.h.

References PCrossingFrame< T >::firstPCrossing_, PCrossingFrame< T >::getBunchRange(), PCrossingFrame< T >::getBunchSpace(), PCrossingFrame< T >::getIdFirstPileup(), PCrossingFrame< T >::getMaxNbSources(), PCrossingFrame< T >::getPileupFileNr(), PCrossingFrame< T >::getPileupOffsetsBcr(), PCrossingFrame< T >::getPileupOffsetsSource(), PCrossingFrame< T >::getPileupRefs(), PCrossingFrame< T >::getSubDet(), PCrossingFrame< T >::lastPCrossing_, PCrossingFrame< T >::PbunchSpace_, PCrossingFrame< T >::PCFidFirstPileup_, PCrossingFrame< T >::PCFpileupFileNr_, PCrossingFrame< T >::PCFpileupOffsetsBcr_, PCrossingFrame< T >::PCFpileupOffsetsSource_, PCrossingFrame< T >::PCFpileups_, PCrossingFrame< T >::PCFsubdet_, and PCrossingFrame< T >::PmaxNbSources_.

Referenced by PCrossingFrame< PCaloHit >::~PCrossingFrame().

94  {
95  // TODO: reduce copy-paste
98  firstPCrossing_ = cf.getBunchRange().first;
99  lastPCrossing_ = cf.getBunchRange().second;
100 
101  PCFpileups_ = cf.getPileupRefs();
102 
103  PCFsubdet_ = cf.getSubDet();
108 }
unsigned int PCFpileupFileNr_
const std::vector< std::vector< unsigned int > > & getPileupOffsetsSource() const
std::vector< std::vector< unsigned int > > PCFpileupOffsetsSource_
edm::EventID PCFidFirstPileup_
int getBunchSpace() const
unsigned int getPileupFileNr() const
unsigned int PmaxNbSources_
edm::EventID getIdFirstPileup() const
const std::vector< T > & getPileupRefs() const
std::vector< T > PCFpileups_
std::string getSubDet() const
unsigned int getMaxNbSources() const
std::pair< int, int > getBunchRange() const
std::string PCFsubdet_
std::vector< unsigned int > PCFpileupOffsetsBcr_
const std::vector< unsigned int > & getPileupOffsetsBcr() const

Member Data Documentation

template<class T>
int PCrossingFrame< T >::firstPCrossing_
private
template<class T>
int PCrossingFrame< T >::lastPCrossing_
private
template<class T>
int PCrossingFrame< T >::PbunchSpace_
private
template<class T>
edm::EventID PCrossingFrame< T >::PCFidFirstPileup_
private
template<class T>
unsigned int PCrossingFrame< T >::PCFpileupFileNr_
private
template<class T>
std::vector<unsigned int> PCrossingFrame< T >::PCFpileupOffsetsBcr_
private
template<class T>
std::vector< std::vector<unsigned int> > PCrossingFrame< T >::PCFpileupOffsetsSource_
private
template<class T>
std::vector<T> PCrossingFrame< T >::PCFpileups_
private
template<class T>
std::vector<T> PCrossingFrame< T >::PCFsignals_
private
template<class T>
std::string PCrossingFrame< T >::PCFsubdet_
private
template<class T>
edm::EventID PCrossingFrame< T >::Pid_
private
template<class T>
unsigned int PCrossingFrame< T >::PmaxNbSources_
private