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 19 of file PCrossingFrame.h.

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

Definition at line 64 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_.

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

Definition at line 22 of file PCrossingFrame.h.

References PCrossingFrame< T >::setAllExceptSignalFrom().

22 { ; }

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 27 of file PCrossingFrame.h.

References PCrossingFrame< T >::Pid_.

27 { 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
template<class T>
const std::vector<std::vector<unsigned int> >& PCrossingFrame< T >::getPileupOffsetsSource ( ) const
inline

Definition at line 43 of file PCrossingFrame.h.

References PCrossingFrame< T >::PCFpileupOffsetsSource_.

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

43  {
45  } //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 29 of file PCrossingFrame.h.

References PCrossingFrame< T >::PCFpileups_.

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

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

Definition at line 30 of file PCrossingFrame.h.

References AlCaHLTBitMon_ParallelJobs::p, and PCrossingFrame< T >::PCFpileups_.

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

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

Definition at line 28 of file PCrossingFrame.h.

References PCrossingFrame< T >::PCFsignals_.

28 { 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 91 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< T >::~PCrossingFrame().

91  {
92  // TODO: reduce copy-paste
95  firstPCrossing_ = cf.getBunchRange().first;
96  lastPCrossing_ = cf.getBunchRange().second;
97 
99 
100  PCFsubdet_ = cf.getSubDet();
105 }
const std::vector< std::vector< unsigned int > > & getPileupOffsetsSource() const
unsigned int PCFpileupFileNr_
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
std::vector< std::vector< unsigned int > > PCFpileupOffsetsSource_
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