CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
RandomClusterAlgo Class Reference
Inheritance diagram for RandomClusterAlgo:
HGCalTriggerBackend::Algorithm< HGCal64BitRandomCodec > HGCalTriggerBackendAlgorithmBase

Public Member Functions

virtual void putInEvent (edm::Event &evt) override final
 
 RandomClusterAlgo (const edm::ParameterSet &conf, edm::ConsumesCollector &cc)
 
virtual void reset () override final
 
virtual void run (const l1t::HGCFETriggerDigiCollection &coll, const edm::EventSetup &es, edm::Event &evt) override final
 
virtual void setProduces (edm::stream::EDProducer<> &prod) const override final
 
- Public Member Functions inherited from HGCalTriggerBackend::Algorithm< HGCal64BitRandomCodec >
 Algorithm (const edm::ParameterSet &conf, edm::ConsumesCollector &cc)
 
virtual void setGeometry (const HGCalTriggerGeometryBase *const geom) override final
 
- Public Member Functions inherited from HGCalTriggerBackendAlgorithmBase
 HGCalTriggerBackendAlgorithmBase (const edm::ParameterSet &conf, edm::ConsumesCollector &cc)
 
const std::string & name () const
 
virtual ~HGCalTriggerBackendAlgorithmBase ()
 

Private Attributes

std::unique_ptr< l1t::HGCalClusterBxCollectioncluster_product_
 

Additional Inherited Members

- Protected Attributes inherited from HGCalTriggerBackend::Algorithm< HGCal64BitRandomCodec >
HGCal64BitRandomCodec codec_
 
- Protected Attributes inherited from HGCalTriggerBackendAlgorithmBase
const HGCalTriggerGeometryBasegeometry_
 

Detailed Description

Definition at line 8 of file RandomClusterAlgo.cc.

Constructor & Destructor Documentation

RandomClusterAlgo::RandomClusterAlgo ( const edm::ParameterSet conf,
edm::ConsumesCollector cc 
)
inline

Definition at line 11 of file RandomClusterAlgo.cc.

Member Function Documentation

virtual void RandomClusterAlgo::putInEvent ( edm::Event evt)
inlinefinaloverridevirtual

Implements HGCalTriggerBackendAlgorithmBase.

Definition at line 25 of file RandomClusterAlgo.cc.

References eostools::move(), dataset::name, and edm::Event::put().

25  {
27  }
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:122
std::unique_ptr< l1t::HGCalClusterBxCollection > cluster_product_
def move(src, dest)
Definition: eostools.py:510
virtual void RandomClusterAlgo::reset ( void  )
inlinefinaloverridevirtual

Implements HGCalTriggerBackendAlgorithmBase.

Definition at line 29 of file RandomClusterAlgo.cc.

29  {
31  }
std::unique_ptr< l1t::HGCalClusterBxCollection > cluster_product_
void RandomClusterAlgo::run ( const l1t::HGCFETriggerDigiCollection coll,
const edm::EventSetup es,
edm::Event evt 
)
finaloverridevirtual

Implements HGCalTriggerBackendAlgorithmBase.

Definition at line 38 of file RandomClusterAlgo.cc.

References DEFINE_EDM_PLUGIN, and HGCal64BitRandomDataPayload::payload.

41  {
42  for( const auto& digi : coll ) {
44  digi.decode(codec_,my_data);
45 
46  unsigned word1 = my_data.payload & 0xffff;
47  unsigned word2 = (my_data.payload >> 16) & 0xffff;
48  unsigned word3 = (my_data.payload >> 32) & 0xffff;
49  unsigned word4 = (my_data.payload >> 48) & 0xffff;
50 
52  word1, word2, word3^word4 );
53 
54  cluster_product_->push_back(0,cluster);
55  }
56 }
std::unique_ptr< l1t::HGCalClusterBxCollection > cluster_product_
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: LeafCandidate.h:23
virtual void RandomClusterAlgo::setProduces ( edm::stream::EDProducer<> &  prod) const
inlinefinaloverridevirtual

Implements HGCalTriggerBackendAlgorithmBase.

Definition at line 16 of file RandomClusterAlgo.cc.

References coll, dataset::name, parseEventContent::prod, and findQualityFiles::run.

16  {
17  prod.produces<l1t::HGCalClusterBxCollection>(name());
18  }

Member Data Documentation

std::unique_ptr<l1t::HGCalClusterBxCollection> RandomClusterAlgo::cluster_product_
private

Definition at line 34 of file RandomClusterAlgo.cc.