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

void putInEvent (edm::Event &evt) final
 
 RandomClusterAlgo (const edm::ParameterSet &conf, edm::ConsumesCollector &cc)
 
void reset () final
 
void run (const l1t::HGCFETriggerDigiCollection &coll, const edm::EventSetup &es, edm::Event &evt) final
 
void setProduces (edm::stream::EDProducer<> &prod) const final
 
- Public Member Functions inherited from HGCalTriggerBackend::Algorithm< HGCal64BitRandomCodec >
 Algorithm (const edm::ParameterSet &conf, edm::ConsumesCollector &cc)
 
void setGeometry (const HGCalTriggerGeometryBase *const geom) 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

void RandomClusterAlgo::putInEvent ( edm::Event evt)
inlinefinalvirtual

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:137
std::unique_ptr< l1t::HGCalClusterBxCollection > cluster_product_
def move(src, dest)
Definition: eostools.py:511
void RandomClusterAlgo::reset ( void  )
inlinefinalvirtual

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 
)
finalvirtual

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
void RandomClusterAlgo::setProduces ( edm::stream::EDProducer<> &  prod) const
inlinefinalvirtual

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.