CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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

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

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
template<class D , class S , class DECODE >
FTLDataFrameT< D, S, DECODE >::FTLDataFrameT ( const D &  id)
inline
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.

size_t maxSampleSize_
Definition: FTLDataFrameT.h:77
std::vector< S > data_
Definition: FTLDataFrameT.h:71

Member Function Documentation

template<class D , class S , class DECODE >
const int FTLDataFrameT< D, S, DECODE >::column ( ) const
inline
template<class D , class S , class DECODE >
const D& FTLDataFrameT< D, S, DECODE >::id ( ) const
inline
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
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 submitPVResolutionJobs::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
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_.

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

51 { data_.resize(s); }
std::vector< S > data_
Definition: FTLDataFrameT.h:71
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
template<class D , class S , class DECODE >
const S& FTLDataFrameT< D, S, DECODE >::sample ( int  i) const
inline

Definition at line 57 of file FTLDataFrameT.h.

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

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

57 { return data_[i]; }
std::vector< S > data_
Definition: FTLDataFrameT.h:71
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_.

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
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

template<class D , class S , class DECODE >
std::vector<S> FTLDataFrameT< D, S, DECODE >::data_
private
template<class D , class S , class DECODE >
D FTLDataFrameT< D, S, DECODE >::id_
private
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().