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)
 
 FTLDataFrameT (const FTLDataFrameT &o)
 
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/3]

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:77
std::vector< S > data_
Definition: FTLDataFrameT.h:71

◆ FTLDataFrameT() [2/3]

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

◆ FTLDataFrameT() [3/3]

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

Definition at line 26 of file FTLDataFrameT.h.

26 : data_(o.data_), id_(o.id_), maxSampleSize_(o.maxSampleSize_) {}
size_t maxSampleSize_
Definition: FTLDataFrameT.h:77
std::vector< S > data_
Definition: FTLDataFrameT.h:71

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 56 of file FTLDataFrameT.h.

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

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

◆ print()

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

Definition at line 62 of file FTLDataFrameT.h.

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

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

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

◆ 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 51 of file FTLDataFrameT.h.

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

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

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

◆ row()

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

row

Definition at line 36 of file FTLDataFrameT.h.

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

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

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

◆ 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 58 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().

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

◆ 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 46 of file FTLDataFrameT.h.

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

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

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

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 77 of file FTLDataFrameT.h.

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