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

Constructor & Destructor Documentation

◆ PCrossingFrame() [1/2]

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

Definition at line 19 of file PCrossingFrame.h.

19 {}

◆ PCrossingFrame() [2/2]

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

Definition at line 64 of file PCrossingFrame.h.

References 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(), and pileupDistInMC::pileups.

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 }
unsigned int PCFpileupFileNr_
const std::vector< const T * > & getPileups() const
Definition: CrossingFrame.h:90
edm::EventID PCFidFirstPileup_
unsigned int getPileupFileNr() const
Definition: CrossingFrame.h:84
edm::EventID getEventID() const
Definition: CrossingFrame.h:79
unsigned int PmaxNbSources_
std::vector< T > PCFsignals_
edm::EventID Pid_
int getBunchSpace() const
Definition: CrossingFrame.h:81
std::vector< T > PCFpileups_
std::string getSubDet() const
Definition: CrossingFrame.h:83
const std::vector< const T * > & getSignal() const
Definition: CrossingFrame.h:91
const std::vector< std::vector< unsigned int > > & getPileupOffsetsSource() const
Definition: CrossingFrame.h:87
std::vector< std::vector< unsigned int > > PCFpileupOffsetsSource_
std::string PCFsubdet_
edm::EventID getIdFirstPileup() const
Definition: CrossingFrame.h:85
const std::vector< unsigned int > & getPileupOffsetsBcr() const
Definition: CrossingFrame.h:86
std::vector< unsigned int > PCFpileupOffsetsBcr_
std::pair< int, int > getBunchRange() const
Definition: CrossingFrame.h:80
unsigned int getMaxNbSources() const
Definition: CrossingFrame.h:82

◆ ~PCrossingFrame()

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

Definition at line 22 of file PCrossingFrame.h.

22 { ; }

Member Function Documentation

◆ getBunchRange()

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

◆ getBunchSpace()

template<class T>
int PCrossingFrame< T >::getBunchSpace ( ) const
inline

◆ getEventID()

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_

◆ getIdFirstPileup()

template<class T>
edm::EventID PCrossingFrame< T >::getIdFirstPileup ( ) const
inline

◆ getMaxNbSources()

template<class T>
unsigned int PCrossingFrame< T >::getMaxNbSources ( ) const
inline

◆ getPileupFileNr()

template<class T>
unsigned int PCrossingFrame< T >::getPileupFileNr ( ) const
inline

◆ getPileupOffsetsBcr()

template<class T>
const std::vector<unsigned int>& PCrossingFrame< T >::getPileupOffsetsBcr ( ) const
inline

◆ getPileupOffsetsSource()

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_

◆ getPileupRefs()

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_

◆ getPileups()

template<class T>
std::vector<const T*> PCrossingFrame< T >::getPileups ( ) const
inline

Definition at line 30 of file PCrossingFrame.h.

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

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  }
ret
prodAgent to be discontinued
std::vector< T > PCFpileups_

◆ getSignals()

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_

◆ getSubDet()

template<class T>
std::string PCrossingFrame< T >::getSubDet ( ) const
inline

◆ setAllExceptSignalFrom()

template<typename T >
void PCrossingFrame< T >::setAllExceptSignalFrom ( const PCrossingFrame< T > &  cf)

Definition at line 91 of file PCrossingFrame.h.

References PCrossingFrame< T >::getBunchRange(), PCrossingFrame< T >::getBunchSpace(), PCrossingFrame< T >::getIdFirstPileup(), PCrossingFrame< T >::getMaxNbSources(), PCrossingFrame< T >::getPileupFileNr(), PCrossingFrame< T >::getPileupOffsetsBcr(), PCrossingFrame< T >::getPileupOffsetsSource(), PCrossingFrame< T >::getPileupRefs(), and PCrossingFrame< T >::getSubDet().

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

Member Data Documentation

◆ firstPCrossing_

template<class T>
int PCrossingFrame< T >::firstPCrossing_
private

Definition at line 52 of file PCrossingFrame.h.

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

◆ lastPCrossing_

template<class T>
int PCrossingFrame< T >::lastPCrossing_
private

Definition at line 53 of file PCrossingFrame.h.

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

◆ PbunchSpace_

template<class T>
int PCrossingFrame< T >::PbunchSpace_
private

Definition at line 50 of file PCrossingFrame.h.

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

◆ PCFidFirstPileup_

template<class T>
edm::EventID PCrossingFrame< T >::PCFidFirstPileup_
private

Definition at line 58 of file PCrossingFrame.h.

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

◆ PCFpileupFileNr_

template<class T>
unsigned int PCrossingFrame< T >::PCFpileupFileNr_
private

Definition at line 57 of file PCrossingFrame.h.

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

◆ PCFpileupOffsetsBcr_

template<class T>
std::vector<unsigned int> PCrossingFrame< T >::PCFpileupOffsetsBcr_
private

Definition at line 59 of file PCrossingFrame.h.

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

◆ PCFpileupOffsetsSource_

template<class T>
std::vector<std::vector<unsigned int> > PCrossingFrame< T >::PCFpileupOffsetsSource_
private

Definition at line 60 of file PCrossingFrame.h.

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

◆ PCFpileups_

template<class T>
std::vector<T> PCrossingFrame< T >::PCFpileups_
private

◆ PCFsignals_

template<class T>
std::vector<T> PCrossingFrame< T >::PCFsignals_
private

Definition at line 55 of file PCrossingFrame.h.

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

◆ PCFsubdet_

template<class T>
std::string PCrossingFrame< T >::PCFsubdet_
private

Definition at line 56 of file PCrossingFrame.h.

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

◆ Pid_

template<class T>
edm::EventID PCrossingFrame< T >::Pid_
private

Definition at line 51 of file PCrossingFrame.h.

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

◆ PmaxNbSources_

template<class T>
unsigned int PCrossingFrame< T >::PmaxNbSources_
private

Definition at line 49 of file PCrossingFrame.h.

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