CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
FTLDataFrameT< D, S, DECODE > Class Template Reference

Readout digi for HGC. More...

#include <FTLDataFrameT.h>

Public Types

typedef D key_type
 key to sort the collection More...
 

Public Member Functions

const int column () const
 column More...
 
 FTLDataFrameT ()
 CTOR. More...
 
 FTLDataFrameT (const D &id)
 
const D & id () const
 det id More...
 
const Soperator[] (int i) const
 assess/set specific samples More...
 
void print (std::ostream &out=std::cout)
 
void resize (size_t s)
 allow to set size More...
 
const int row () const
 row More...
 
const Ssample (int i) const
 
void setSample (int i, const S &sample)
 
int size () const
 total number of samples in the digi More...
 

Private Attributes

std::vector< Sdata_
 
id_
 
size_t maxSampleSize_
 

Detailed Description

template<class D, class S, class DECODE>
class FTLDataFrameT< D, S, DECODE >

Readout digi for HGC.

Definition at line 14 of file FTLDataFrameT.h.

Member Typedef Documentation

◆ key_type

template<class D , class S , class DECODE >
typedef D FTLDataFrameT< D, S, DECODE >::key_type

key to sort the collection

Definition at line 19 of file FTLDataFrameT.h.

Constructor & Destructor Documentation

◆ FTLDataFrameT() [1/2]

template<class D , class S , class DECODE >
FTLDataFrameT< D, S, DECODE >::FTLDataFrameT ( )
inline

CTOR.

Definition at line 24 of file FTLDataFrameT.h.

References FTLDataFrameT< D, S, DECODE >::data_, and FTLDataFrameT< D, S, DECODE >::maxSampleSize_.

24 : id_(0), maxSampleSize_(15) { data_.resize(maxSampleSize_); }
size_t maxSampleSize_
Definition: FTLDataFrameT.h:76
std::vector< S > data_
Definition: FTLDataFrameT.h:70

◆ FTLDataFrameT() [2/2]

template<class D , class S , class DECODE >
FTLDataFrameT< D, S, DECODE >::FTLDataFrameT ( const D &  id)
inline

Member Function Documentation

◆ column()

template<class D , class S , class DECODE >
const int FTLDataFrameT< D, S, DECODE >::column ( ) const
inline

◆ id()

template<class D , class S , class DECODE >
const D& FTLDataFrameT< D, S, DECODE >::id ( ) const
inline

◆ operator[]()

template<class D , class S , class DECODE >
const S& FTLDataFrameT< D, S, DECODE >::operator[] ( int  i) const
inline

assess/set specific samples

Definition at line 55 of file FTLDataFrameT.h.

References FTLDataFrameT< D, S, DECODE >::data_, and mps_fire::i.

55 { return data_[i]; }
std::vector< S > data_
Definition: FTLDataFrameT.h:70

◆ print()

template<class D , class S , class DECODE >
void FTLDataFrameT< D, S, DECODE >::print ( std::ostream &  out = std::cout)
inline

Definition at line 61 of file FTLDataFrameT.h.

References FTLDataFrameT< D, S, DECODE >::data_, mps_fire::i, and MillePedeFileConverter_cfg::out.

Referenced by BTLElectronicsSim::runTrivialShaper(), and ETLElectronicsSim::runTrivialShaper().

61  {
62  for (size_t i = 0; i < data_.size(); i++) {
63  out << "[" << i << "] ";
64  data_[i].print(out);
65  }
66  }
std::vector< S > data_
Definition: FTLDataFrameT.h:70

◆ resize()

template<class D , class S , class DECODE >
void FTLDataFrameT< D, S, DECODE >::resize ( size_t  s)
inline

allow to set size

Definition at line 50 of file FTLDataFrameT.h.

References FTLDataFrameT< D, S, DECODE >::data_, and alignCSCRings::s.

Referenced by BTLElectronicsSim::updateOutput(), and ETLElectronicsSim::updateOutput().

50 { data_.resize(s); }
std::vector< S > data_
Definition: FTLDataFrameT.h:70

◆ row()

template<class D , class S , class DECODE >
const int FTLDataFrameT< D, S, DECODE >::row ( ) const
inline

row

Definition at line 35 of file FTLDataFrameT.h.

References FTLDataFrameT< D, S, DECODE >::data_, and FTLDataFrameT< D, S, DECODE >::id_.

Referenced by ETLUncalibRecHitAlgo::makeRecHit(), and BTLUncalibRecHitAlgo::makeRecHit().

35 { return DECODE::row(id_, data_); }
std::vector< S > data_
Definition: FTLDataFrameT.h:70

◆ sample()

template<class D , class S , class DECODE >
const S& FTLDataFrameT< D, S, DECODE >::sample ( int  i) const
inline

◆ setSample()

template<class D , class S , class DECODE >
void FTLDataFrameT< D, S, DECODE >::setSample ( int  i,
const S sample 
)
inline

Definition at line 57 of file FTLDataFrameT.h.

References FTLDataFrameT< D, S, DECODE >::data_, mps_fire::i, and FTLDataFrameT< D, S, DECODE >::sample().

Referenced by BTLElectronicsSim::runTrivialShaper(), and ETLElectronicsSim::runTrivialShaper().

57  {
58  if (i < (int)data_.size())
59  data_[i] = sample;
60  }
std::vector< S > data_
Definition: FTLDataFrameT.h:70
const S & sample(int i) const
Definition: FTLDataFrameT.h:56

◆ size()

template<class D , class S , class DECODE >
int FTLDataFrameT< D, S, DECODE >::size ( void  ) const
inline

total number of samples in the digi

Definition at line 45 of file FTLDataFrameT.h.

References FTLDataFrameT< D, S, DECODE >::data_.

Referenced by ntupleDataFormat._Collection::__iter__(), ntupleDataFormat._Collection::__len__(), and ETLElectronicsSim::updateOutput().

45 { return data_.size() & 0xf; }
std::vector< S > data_
Definition: FTLDataFrameT.h:70

Member Data Documentation

◆ data_

template<class D , class S , class DECODE >
std::vector<S> FTLDataFrameT< D, S, DECODE >::data_
private

◆ id_

template<class D , class S , class DECODE >
D FTLDataFrameT< D, S, DECODE >::id_
private

◆ maxSampleSize_

template<class D , class S , class DECODE >
size_t FTLDataFrameT< D, S, DECODE >::maxSampleSize_
private

Definition at line 76 of file FTLDataFrameT.h.

Referenced by FTLDataFrameT< D, S, DECODE >::FTLDataFrameT().