CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Attributes | Private Attributes
HGCalTriggerFE::Codec< Impl, DATA > Class Template Reference

#include <HGCalTriggerFECodecBase.h>

Inheritance diagram for HGCalTriggerFE::Codec< Impl, DATA >:
HGCalTriggerFECodecBase

Public Member Functions

 Codec (const edm::ParameterSet &conf)
 
virtual void decode (const l1t::HGCFETriggerDigi &digi) overridefinal
 
DATA decode (const std::vector< bool > &data) const
 
virtual void encode (l1t::HGCFETriggerDigi &digi) overridefinal
 
std::vector< bool > encode (const DATA &data) const
 
std::vector< bool > getDataPayload () const overridefinal
 
virtual void print (const l1t::HGCFETriggerDigi &digi, std::ostream &out=std::cout) const overridefinal
 
virtual void setDataPayload (const HGCalTriggerGeometryBase &geom, const HGCEEDigiCollection &ee, const HGCHEDigiCollection &fh, const HGCHEDigiCollection &bh) overridefinal
 
virtual void setDataPayload (const HGCalTriggerGeometryBase &geom, const l1t::HGCFETriggerDigi &digi) overridefinal
 
virtual void unSetDataPayload () overridefinal
 
- Public Member Functions inherited from HGCalTriggerFECodecBase
const unsigned char getCodecType () const
 
 HGCalTriggerFECodecBase (const edm::ParameterSet &conf)
 
const std::string & name () const
 
virtual ~HGCalTriggerFECodecBase ()
 

Protected Attributes

DATA data_
 

Private Attributes

bool dataIsSet_
 

Detailed Description

template<typename Impl, typename DATA>
class HGCalTriggerFE::Codec< Impl, DATA >

Definition at line 66 of file HGCalTriggerFECodecBase.h.

Constructor & Destructor Documentation

template<typename Impl, typename DATA>
HGCalTriggerFE::Codec< Impl, DATA >::Codec ( const edm::ParameterSet conf)
inline

Definition at line 68 of file HGCalTriggerFECodecBase.h.

68  :
70  dataIsSet_(false) {
71  }
HGCalTriggerFECodecBase(const edm::ParameterSet &conf)

Member Function Documentation

template<typename Impl, typename DATA>
virtual void HGCalTriggerFE::Codec< Impl, DATA >::decode ( const l1t::HGCFETriggerDigi digi)
inlinefinaloverridevirtual

Implements HGCalTriggerFECodecBase.

Definition at line 83 of file HGCalTriggerFECodecBase.h.

83  {
84  if( dataIsSet_ ) {
85  edm::LogWarning("HGCalTriggerFECodec|OverwritePayload")
86  << "Data payload was already set for HGCTriggerFECodec: "
87  << this->name() << " overwriting current data!";
88  }
89  digi.decode(static_cast<const Impl&>(*this),data_);
90  dataIsSet_ = true;
91  }
void decode(const CODEC &codec, DATA &data) const
const std::string & name() const
template<typename Impl, typename DATA>
DATA HGCalTriggerFE::Codec< Impl, DATA >::decode ( const std::vector< bool > &  data) const
inline

Definition at line 134 of file HGCalTriggerFECodecBase.h.

134  {
135  return static_cast<const Impl&>(*this).decodeImpl(data);
136  }
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
template<typename Impl, typename DATA>
virtual void HGCalTriggerFE::Codec< Impl, DATA >::encode ( l1t::HGCFETriggerDigi digi)
inlinefinaloverridevirtual

Implements HGCalTriggerFECodecBase.

Definition at line 75 of file HGCalTriggerFECodecBase.h.

Referenced by HGCalTriggerFE::Codec< HGCalBestChoiceCodec, HGCalBestChoiceDataPayload >::getDataPayload().

75  {
76  if( !dataIsSet_ ) {
77  edm::LogWarning("HGCalTriggerFECodec|NoDataPayload")
78  << "No data payload was set for HGCTriggerFECodec: "
79  << this->name();
80  }
81  digi.encode(static_cast<const Impl&>(*this),data_);
82  }
void encode(const CODEC &codec, const DATA &data)
const std::string & name() const
template<typename Impl, typename DATA>
std::vector<bool> HGCalTriggerFE::Codec< Impl, DATA >::encode ( const DATA &  data) const
inline

Definition at line 130 of file HGCalTriggerFECodecBase.h.

130  {
131  return static_cast<const Impl&>(*this).encodeImpl(data);
132  }
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
template<typename Impl, typename DATA>
std::vector<bool> HGCalTriggerFE::Codec< Impl, DATA >::getDataPayload ( ) const
inlinefinaloverridevirtual

Implements HGCalTriggerFECodecBase.

Definition at line 121 of file HGCalTriggerFECodecBase.h.

121  {
122  return this->encode(data_);
123  }
virtual void encode(l1t::HGCFETriggerDigi &digi) overridefinal
template<typename Impl, typename DATA>
virtual void HGCalTriggerFE::Codec< Impl, DATA >::print ( const l1t::HGCFETriggerDigi digi,
std::ostream &  out = std::cout 
) const
inlinefinaloverridevirtual

Implements HGCalTriggerFECodecBase.

Definition at line 125 of file HGCalTriggerFECodecBase.h.

126  {
127  digi.print(static_cast<const Impl&>(*this),out);
128  }
void print(std::ostream &out) const
template<typename Impl, typename DATA>
virtual void HGCalTriggerFE::Codec< Impl, DATA >::setDataPayload ( const HGCalTriggerGeometryBase geom,
const HGCEEDigiCollection ee,
const HGCHEDigiCollection fh,
const HGCHEDigiCollection bh 
)
inlinefinaloverridevirtual

Implements HGCalTriggerFECodecBase.

Definition at line 93 of file HGCalTriggerFECodecBase.h.

96  {
97  if( dataIsSet_ ) {
98  edm::LogWarning("HGCalTriggerFECodec|OverwritePayload")
99  << "Data payload was already set for HGCTriggerFECodec: "
100  << this->name() << " overwriting current data!";
101  }
102  static_cast<Impl&>(*this).setDataPayloadImpl(geom,ee,fh,bh);
103  dataIsSet_ = true;
104  }
const std::string & name() const
template<typename Impl, typename DATA>
virtual void HGCalTriggerFE::Codec< Impl, DATA >::setDataPayload ( const HGCalTriggerGeometryBase geom,
const l1t::HGCFETriggerDigi digi 
)
inlinefinaloverridevirtual

Implements HGCalTriggerFECodecBase.

Definition at line 106 of file HGCalTriggerFECodecBase.h.

107  {
108  if( dataIsSet_ ) {
109  edm::LogWarning("HGCalTriggerFECodec|OverwritePayload")
110  << "Data payload was already set for HGCTriggerFECodec: "
111  << this->name() << " overwriting current data!";
112  }
113  static_cast<Impl&>(*this).setDataPayloadImpl(geom,digi);
114  dataIsSet_ = true;
115  }
const std::string & name() const
template<typename Impl, typename DATA>
virtual void HGCalTriggerFE::Codec< Impl, DATA >::unSetDataPayload ( )
inlinefinaloverridevirtual

Implements HGCalTriggerFECodecBase.

Definition at line 117 of file HGCalTriggerFECodecBase.h.

117  {
118  data_.reset();
119  dataIsSet_ = false;
120  }

Member Data Documentation

template<typename Impl, typename DATA>
DATA HGCalTriggerFE::Codec< Impl, DATA >::data_
protected
template<typename Impl, typename DATA>
bool HGCalTriggerFE::Codec< Impl, DATA >::dataIsSet_
private