test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
HGCalTriggerDigiFEReproducer Class Reference
Inheritance diagram for HGCalTriggerDigiFEReproducer:
edm::EDProducer edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

virtual void beginRun (const edm::Run &, const edm::EventSetup &)
 
 HGCalTriggerDigiFEReproducer (const edm::ParameterSet &)
 
virtual void produce (edm::Event &, const edm::EventSetup &)
 
 ~HGCalTriggerDigiFEReproducer ()
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector
< edm::ProductResolverIndex >
const & 
indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription
const &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, std::unordered_multimap< std::string, edm::ProductResolverIndex > const &iIndicies, std::string const &moduleLabel)
 
virtual ~ProducerBase () noexcept(false)
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector
< ProductResolverIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Attributes

HGCalTriggerBackendProcessor backEndProcessor_
 
std::unique_ptr
< HGCalTriggerFECodecBase
codec_
 
edm::EDGetToken inputdigi_
 
std::unique_ptr
< HGCalTriggerGeometryBase
triggerGeometry_
 

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Definition at line 18 of file HGCalTriggerDigiFEReproducer.cc.

Constructor & Destructor Documentation

HGCalTriggerDigiFEReproducer::HGCalTriggerDigiFEReproducer ( const edm::ParameterSet conf)

Definition at line 40 of file HGCalTriggerDigiFEReproducer.cc.

References backEndProcessor_, codec_, geometry, reco::get(), edm::ParameterSet::getParameter(), edm::ParameterSet::getParameterSet(), HGCalTriggerBackendProcessor::setProduces(), AlCaHLTBitMon_QueryRunRegistry::string, and triggerGeometry_.

40  :
41  inputdigi_(consumes<l1t::HGCFETriggerDigiCollection>(conf.getParameter<edm::InputTag>("feDigis"))),
42  backEndProcessor_(conf.getParameterSet("BEConfiguration"))
43 /*****************************************************************/
44 {
45  //setup geometry configuration
46  const edm::ParameterSet& geometryConfig = conf.getParameterSet("TriggerGeometry");
47  const std::string& trigGeomName = geometryConfig.getParameter<std::string>("TriggerGeometryName");
48  HGCalTriggerGeometryBase* geometry = HGCalTriggerGeometryFactory::get()->create(trigGeomName,geometryConfig);
49  triggerGeometry_.reset(geometry);
50 
51  //setup FE codec
52  const edm::ParameterSet& feCodecConfig = conf.getParameterSet("FECodec");
53  const std::string& feCodecName = feCodecConfig.getParameter<std::string>("CodecName");
54  HGCalTriggerFECodecBase* codec = HGCalTriggerFECodecFactory::get()->create(feCodecName,feCodecConfig);
55  codec_.reset(codec);
56  codec_->unSetDataPayload();
57 
58  produces<l1t::HGCFETriggerDigiCollection>();
59  // register backend processor products
61 }
T getParameter(std::string const &) const
std::unique_ptr< HGCalTriggerFECodecBase > codec_
std::unique_ptr< HGCalTriggerGeometryBase > triggerGeometry_
HGCalTriggerBackendProcessor backEndProcessor_
void setProduces(edm::EDProducer &prod) const
ParameterSet const & getParameterSet(std::string const &) const
ESHandle< TrackerGeometry > geometry
T get(const Candidate &c)
Definition: component.h:55
HGCalTriggerDigiFEReproducer::~HGCalTriggerDigiFEReproducer ( )
inline

Definition at line 22 of file HGCalTriggerDigiFEReproducer.cc.

22 { }

Member Function Documentation

void HGCalTriggerDigiFEReproducer::beginRun ( const edm::Run ,
const edm::EventSetup es 
)
virtual

Reimplemented from edm::EDProducer.

Definition at line 64 of file HGCalTriggerDigiFEReproducer.cc.

References HGCalTriggerGeometryBase::es_info::geom_bh, HGCalTriggerGeometryBase::es_info::geom_ee, HGCalTriggerGeometryBase::es_info::geom_fh, edm::EventSetup::get(), info(), AlCaHLTBitMon_QueryRunRegistry::string, HGCalTriggerGeometryBase::es_info::topo_bh, HGCalTriggerGeometryBase::es_info::topo_ee, HGCalTriggerGeometryBase::es_info::topo_fh, and triggerGeometry_.

66 {
67  triggerGeometry_->reset();
69  const std::string& ee_sd_name = triggerGeometry_->eeSDName();
70  const std::string& fh_sd_name = triggerGeometry_->fhSDName();
71  const std::string& bh_sd_name = triggerGeometry_->bhSDName();
72  es.get<IdealGeometryRecord>().get(ee_sd_name,info.geom_ee);
73  es.get<IdealGeometryRecord>().get(fh_sd_name,info.geom_fh);
74  es.get<IdealGeometryRecord>().get(bh_sd_name,info.geom_bh);
75  es.get<IdealGeometryRecord>().get(ee_sd_name,info.topo_ee);
76  es.get<IdealGeometryRecord>().get(fh_sd_name,info.topo_fh);
77  es.get<IdealGeometryRecord>().get(bh_sd_name,info.topo_bh);
78  triggerGeometry_->initialize(info);
79 }
static const TGPicture * info(bool iBackgroundIsBlack)
edm::ESHandle< HGCalTopology > topo_ee
edm::ESHandle< HGCalGeometry > geom_bh
std::unique_ptr< HGCalTriggerGeometryBase > triggerGeometry_
edm::ESHandle< HGCalGeometry > geom_ee
edm::ESHandle< HGCalGeometry > geom_fh
edm::ESHandle< HGCalTopology > topo_bh
edm::ESHandle< HGCalTopology > topo_fh
const T & get() const
Definition: EventSetup.h:56
void HGCalTriggerDigiFEReproducer::produce ( edm::Event e,
const edm::EventSetup es 
)
virtual

Implements edm::EDProducer.

Definition at line 82 of file HGCalTriggerDigiFEReproducer.cc.

References backEndProcessor_, codec_, edm::Event::getByToken(), inputdigi_, eostools::move(), convertSQLitetoXML_cfg::output, edm::Event::put(), HGCalTriggerBackendProcessor::putInEvent(), HGCalTriggerBackendProcessor::reset(), HGCalTriggerBackendProcessor::run(), l1t::HGCFETriggerDigi::setDetId(), edm::SortedCollection< T, SORT >::size(), AlCaHLTBitMon_QueryRunRegistry::string, and triggerGeometry_.

84 {
85  std::unique_ptr<l1t::HGCFETriggerDigiCollection> fe_output( new l1t::HGCFETriggerDigiCollection );
86 
88 
89  e.getByToken(inputdigi_,digis_h);
90 
91  const l1t::HGCFETriggerDigiCollection& digis = *digis_h;
92 
93  fe_output->reserve(digis.size());
94  std::stringstream output;
95  for( const auto& digi_in : digis )
96  {
97  fe_output->push_back(l1t::HGCFETriggerDigi());
98  l1t::HGCFETriggerDigi& digi_out = fe_output->back();
99  codec_->setDataPayload(*triggerGeometry_, digi_in);
100  codec_->encode(digi_out);
101  digi_out.setDetId( digi_in.getDetId<HGCalDetId>() );
102  codec_->print(digi_out,output);
103  edm::LogInfo("HGCalTriggerDigiFEReproducer")
104  << output.str();
105  codec_->unSetDataPayload();
106  output.str(std::string());
107  output.clear();
108  }
109 
110  // get the orphan handle and fe digi collection
111  auto fe_digis_handle = e.put(std::move(fe_output));
112  auto fe_digis_coll = *fe_digis_handle;
113 
114  //now we run the emulation of the back-end processor
115  backEndProcessor_.run(fe_digis_coll,triggerGeometry_);
118 }
std::unique_ptr< HGCalTriggerFECodecBase > codec_
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:122
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:457
std::unique_ptr< HGCalTriggerGeometryBase > triggerGeometry_
HGCalTriggerBackendProcessor backEndProcessor_
void setDetId(const IDTYPE &id)
def move
Definition: eostools.py:510
void run(const l1t::HGCFETriggerDigiCollection &coll, const std::unique_ptr< HGCalTriggerGeometryBase > &geom)
size_type size() const

Member Data Documentation

HGCalTriggerBackendProcessor HGCalTriggerDigiFEReproducer::backEndProcessor_
private

Definition at line 33 of file HGCalTriggerDigiFEReproducer.cc.

Referenced by HGCalTriggerDigiFEReproducer(), and produce().

std::unique_ptr<HGCalTriggerFECodecBase> HGCalTriggerDigiFEReproducer::codec_
private

Definition at line 32 of file HGCalTriggerDigiFEReproducer.cc.

Referenced by HGCalTriggerDigiFEReproducer(), and produce().

edm::EDGetToken HGCalTriggerDigiFEReproducer::inputdigi_
private

Definition at line 29 of file HGCalTriggerDigiFEReproducer.cc.

Referenced by produce().

std::unique_ptr<HGCalTriggerGeometryBase> HGCalTriggerDigiFEReproducer::triggerGeometry_
private

Definition at line 31 of file HGCalTriggerDigiFEReproducer.cc.

Referenced by beginRun(), HGCalTriggerDigiFEReproducer(), and produce().