1 #ifndef __L1Trigger_L1THGCal_HGCalTriggerFECodecBase_h__ 2 #define __L1Trigger_L1THGCal_HGCalTriggerFECodecBase_h__ 31 codec_idx_(static_cast<unsigned char>(conf.getParameter<uint32_t>(
"CodecIndex")))
68 template<
typename Impl,
typename DATA>
81 <<
"No data payload was set for HGCTriggerFECodec: " 84 digi.encode(static_cast<const Impl&>(*
this),data_);
89 <<
"Data payload was already set for HGCTriggerFECodec: " 90 << this->
name() <<
" overwriting current data!";
92 digi.decode(static_cast<const Impl&>(*
this),data_);
101 <<
"Data payload was already set for HGCTriggerFECodec: " 102 << this->
name() <<
" overwriting current data!";
106 <<
"The HGC trigger geometry has not been passed to the front-end codec\n";
108 static_cast<Impl&
>(*this).setDataPayloadImpl(ee,fh,bh);
115 <<
"Data payload was already set for HGCTriggerFECodec: " 116 << this->
name() <<
" overwriting current data!";
120 <<
"The HGC trigger geometry has not been passed to the front-end codec\n";
122 static_cast<Impl&
>(*this).setDataPayloadImpl(digi);
131 return this->
encode(data_);
136 digi.
print(static_cast<const Impl&>(*
this),
out);
142 <<
"The HGC trigger geometry has not been passed to the front-end codec\n";
144 return static_cast<const Impl&
>(*this).encodeImpl(data);
150 <<
"The HGC trigger geometry has not been passed to the front-end codec\n";
152 return static_cast<const Impl&
>(*this).decodeImpl(data,
module);
void setDataPayload(const l1t::HGCFETriggerDigi &digi) final
void decode(const l1t::HGCFETriggerDigi &digi) final
virtual ~HGCalTriggerFECodecBase()
DATA decode(const std::vector< bool > &data, const uint32_t module=0) const
virtual std::vector< bool > getDataPayload() const =0
Codec(const edm::ParameterSet &conf)
std::vector< bool > getDataPayload() const final
std::vector< bool > encode(const DATA &data) const
void setDataPayload(const HGCEEDigiCollection &ee, const HGCHEDigiCollection &fh, const HGCBHDigiCollection &bh) final
virtual void unSetDataPayload()=0
edmplugin::PluginFactory< HGCalTriggerFECodecBase *(const edm::ParameterSet &) > HGCalTriggerFECodecFactory
void print(const l1t::HGCFETriggerDigi &digi, std::ostream &out=std::cout) const final
HGCalTriggerFECodecBase(const edm::ParameterSet &conf)
const unsigned char getCodecType() const
virtual void decode(const l1t::HGCFETriggerDigi &)=0
virtual void setDataPayload(const HGCEEDigiCollection &, const HGCHEDigiCollection &, const HGCBHDigiCollection &)=0
void setGeometry(const HGCalTriggerGeometryBase *const geom)
const HGCalTriggerGeometryBase * geometry_
void print(std::ostream &out) const
virtual void print(const l1t::HGCFETriggerDigi &digi, std::ostream &out=std::cout) const =0
char data[epos_bytes_allocation]
const std::string & name() const
void unSetDataPayload() final
void encode(l1t::HGCFETriggerDigi &digi) final
virtual void encode(l1t::HGCFETriggerDigi &)=0