CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Private Attributes
HGCDataFrame< D, S > Class Template Reference

Readout digi for HGC. More...

#include <HGCDataFrame.h>

Public Types

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

Public Member Functions

 HGCDataFrame ()
 CTOR. More...
 
 HGCDataFrame (const D &id)
 
const D & id () const
 det id More...
 
const Soperator[] (int i) const
 assess/set specific samples More...
 
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 HGCDataFrame< D, S >

Readout digi for HGC.

Definition at line 13 of file HGCDataFrame.h.

Member Typedef Documentation

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

key to sort the collection

Definition at line 19 of file HGCDataFrame.h.

Constructor & Destructor Documentation

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

CTOR.

Definition at line 24 of file HGCDataFrame.h.

24 : id_(0), maxSampleSize_(6) { data_.resize(maxSampleSize_); }
size_t maxSampleSize_
Definition: HGCDataFrame.h:59
std::vector< S > data_
Definition: HGCDataFrame.h:53
template<class D, class S>
HGCDataFrame< D, S >::HGCDataFrame ( const D &  id)
inlineexplicit

Definition at line 25 of file HGCDataFrame.h.

25 : id_(id), maxSampleSize_(6) { data_.resize(maxSampleSize_); }
size_t maxSampleSize_
Definition: HGCDataFrame.h:59
std::vector< S > data_
Definition: HGCDataFrame.h:53

Member Function Documentation

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

det id

Definition at line 30 of file HGCDataFrame.h.

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

assess/set specific samples

Definition at line 45 of file HGCDataFrame.h.

45 { return data_[i]; }
int i
Definition: DBlmapReader.cc:9
std::vector< S > data_
Definition: HGCDataFrame.h:53
template<class D, class S>
void HGCDataFrame< D, S >::resize ( size_t  s)
inline
template<class D, class S>
const S& HGCDataFrame< D, S >::sample ( int  i) const
inline

Definition at line 46 of file HGCDataFrame.h.

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

Definition at line 47 of file HGCDataFrame.h.

Referenced by HGCHEbackDigitizer::runCaliceLikeDigitizer().

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

total number of samples in the digi

Definition at line 35 of file HGCDataFrame.h.

35 { return data_.size() & 0xf; }
std::vector< S > data_
Definition: HGCDataFrame.h:53

Member Data Documentation

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

Definition at line 56 of file HGCDataFrame.h.

Referenced by HGCDataFrame< HGCHEDetId, HGCSample >::id().

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

Definition at line 59 of file HGCDataFrame.h.

Referenced by HGCDataFrame< HGCHEDetId, HGCSample >::HGCDataFrame().