1 #ifndef __L1Trigger_L1THGCal_HGCalTriggerFECodecBase_h__ 2 #define __L1Trigger_L1THGCal_HGCalTriggerFECodecBase_h__ 31 codec_idx_(static_cast<unsigned char>(conf.getParameter<uint32_t>(
"CodecIndex"))) {}
64 template <
typename Impl,
typename DATA>
74 <<
"No data payload was set for HGCTriggerFECodec: " << this->
name();
76 digi.encode(static_cast<const Impl&>(*
this), data_);
81 <<
"Data payload was already set for HGCTriggerFECodec: " << this->
name() <<
" overwriting current data!";
83 digi.decode(static_cast<const Impl&>(*
this), data_);
92 <<
"Data payload was already set for HGCTriggerFECodec: " << this->
name() <<
" overwriting current data!";
96 <<
"The HGC trigger geometry has not been passed to the front-end codec\n";
98 static_cast<Impl&
>(*this).setDataPayloadImpl(ee, fh, bh);
105 <<
"Data payload was already set for HGCTriggerFECodec: " << this->
name() <<
" overwriting current data!";
109 <<
"The HGC trigger geometry has not been passed to the front-end codec\n";
111 static_cast<Impl&
>(*this).setDataPayloadImpl(digi);
122 digi.
print(static_cast<const Impl&>(*
this),
out);
128 <<
"The HGC trigger geometry has not been passed to the front-end codec\n";
130 return static_cast<const Impl&
>(*this).encodeImpl(data);
136 <<
"The HGC trigger geometry has not been passed to the front-end codec\n";
138 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
void setDataPayload(const HGCalDigiCollection &ee, const HGCalDigiCollection &fh, const HGCalDigiCollection &bh) final
virtual std::vector< bool > getDataPayload() const =0
edmplugin::PluginFactory< HGCalTriggerFECodecBase *(const edm::ParameterSet &)> HGCalTriggerFECodecFactory
Codec(const edm::ParameterSet &conf)
std::vector< bool > getDataPayload() const final
std::vector< bool > encode(const DATA &data) const
virtual void unSetDataPayload()=0
virtual void setDataPayload(const HGCalDigiCollection &, const HGCalDigiCollection &, const HGCalDigiCollection &)=0
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
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