CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
FTLDataFrameT< D, S > 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

 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 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 FTLDataFrameT< D, S >

Readout digi for HGC.

Definition at line 14 of file FTLDataFrameT.h.

Member Typedef Documentation

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

key to sort the collection

Definition at line 20 of file FTLDataFrameT.h.

Constructor & Destructor Documentation

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

CTOR.

Definition at line 25 of file FTLDataFrameT.h.

25 : id_(0), maxSampleSize_(15) { data_.resize(maxSampleSize_); }
size_t maxSampleSize_
Definition: FTLDataFrameT.h:69
std::vector< S > data_
Definition: FTLDataFrameT.h:63
template<class D, class S>
FTLDataFrameT< D, S >::FTLDataFrameT ( const D &  id)
inline

Definition at line 26 of file FTLDataFrameT.h.

26 : id_(id), maxSampleSize_(15) { data_.resize(maxSampleSize_); }
size_t maxSampleSize_
Definition: FTLDataFrameT.h:69
std::vector< S > data_
Definition: FTLDataFrameT.h:63
template<class D, class S>
FTLDataFrameT< D, S >::FTLDataFrameT ( const FTLDataFrameT< D, S > &  o)
inline

Definition at line 27 of file FTLDataFrameT.h.

size_t maxSampleSize_
Definition: FTLDataFrameT.h:69
std::vector< S > data_
Definition: FTLDataFrameT.h:63

Member Function Documentation

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

det id

Definition at line 32 of file FTLDataFrameT.h.

Referenced by FTLSimpleUncalibRecHitAlgo::makeRecHit(), and SimpleElectronicsSimInMIPs::updateOutput().

32 { return id_; }
template<class D, class S>
const S& FTLDataFrameT< D, S >::operator[] ( int  i) const
inline

assess/set specific samples

Definition at line 47 of file FTLDataFrameT.h.

47 { return data_[i]; }
int i
Definition: DBlmapReader.cc:9
std::vector< S > data_
Definition: FTLDataFrameT.h:63
template<class D, class S>
void FTLDataFrameT< D, S >::print ( std::ostream &  out = std::cout)
inline

Definition at line 50 of file FTLDataFrameT.h.

Referenced by SimpleElectronicsSimInMIPs::runTrivialShaper().

51  {
52  for(size_t i=0; i<data_.size(); i++)
53  {
54  out << "[" << i << "] ";
55  data_[i].print(out);
56  }
57  }
int i
Definition: DBlmapReader.cc:9
std::vector< S > data_
Definition: FTLDataFrameT.h:63
template<class D, class S>
void FTLDataFrameT< D, S >::resize ( size_t  s)
inline
template<class D, class S>
const S& FTLDataFrameT< D, S >::sample ( int  i) const
inline

Definition at line 48 of file FTLDataFrameT.h.

Referenced by FTLSimpleUncalibRecHitAlgo::makeRecHit().

48 { return data_[i]; }
int i
Definition: DBlmapReader.cc:9
std::vector< S > data_
Definition: FTLDataFrameT.h:63
template<class D, class S>
void FTLDataFrameT< D, S >::setSample ( int  i,
const S sample 
)
inline

Definition at line 49 of file FTLDataFrameT.h.

Referenced by SimpleElectronicsSimInMIPs::runTrivialShaper().

49 { if(i<(int)data_.size()) data_[i]=sample; }
int i
Definition: DBlmapReader.cc:9
const S & sample(int i) const
Definition: FTLDataFrameT.h:48
std::vector< S > data_
Definition: FTLDataFrameT.h:63
template<class D, class S>
int FTLDataFrameT< D, S >::size ( void  ) const
inline

total number of samples in the digi

Definition at line 37 of file FTLDataFrameT.h.

Referenced by ntuple._Collection::__iter__(), ntuple._Collection::__len__(), and SimpleElectronicsSimInMIPs::updateOutput().

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

Member Data Documentation

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

Definition at line 66 of file FTLDataFrameT.h.

Referenced by FTLDataFrameT< FastTimeDetId, FTLSample >::id().

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