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
HcalRealisticZS Class Reference

#include <HcalRealisticZS.h>

Inheritance diagram for HcalRealisticZS:
edm::EDProducer edm::ProducerBase edm::ProductRegistryHelper

Public Member Functions

 HcalRealisticZS (const edm::ParameterSet &ps)
 
virtual void produce (edm::Event &e, const edm::EventSetup &c)
 
virtual ~HcalRealisticZS ()
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
boost::function< void(const
BranchDescription &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 

Private Attributes

std::auto_ptr
< HcalZSAlgoRealistic
algo_
 
edm::InputTag inputLabel_
 

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
typedef WorkerT< EDProducerWorkerType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDProducer
CurrentProcessingContext const * currentContext () const
 
- Protected Member Functions inherited from edm::ProducerBase
template<class TProducer , class TMethod >
void callWhenNewProductsRegistered (TProducer *iProd, TMethod iMethod)
 

Detailed Description

Definition at line 23 of file HcalRealisticZS.h.

Constructor & Destructor Documentation

HcalRealisticZS::HcalRealisticZS ( const edm::ParameterSet ps)
explicit

Definition at line 16 of file HcalRealisticZS.cc.

References algo_, and edm::ParameterSet::getParameter().

16  :
17  inputLabel_(conf.getParameter<edm::InputTag>("digiLabel"))
18 {
19  bool markAndPass=conf.getParameter<bool>("markAndPass");
20 
21  algo_=std::auto_ptr<HcalZSAlgoRealistic>(new HcalZSAlgoRealistic(markAndPass));
22 
23  //this constructor will be called if useConfigZSvalues is set to 1 in
24  //HcalZeroSuppressionProducers/python/hcalDigisRealistic_cfi.py
25  //which means that channel-by-channel ZS thresholds from DB will NOT be used
26  if ( conf.getParameter<int>("useConfigZSvalues") )
27  algo_=std::auto_ptr<HcalZSAlgoRealistic>(new HcalZSAlgoRealistic(markAndPass,
28  conf.getParameter<int>("HBlevel"),
29  conf.getParameter<int>("HElevel"),
30  conf.getParameter<int>("HOlevel"),
31  conf.getParameter<int>("HFlevel")));
32 
33  produces<HBHEDigiCollection>();
34  produces<HODigiCollection>();
35  produces<HFDigiCollection>();
36 
37 }
std::auto_ptr< HcalZSAlgoRealistic > algo_
edm::InputTag inputLabel_
tuple conf
Definition: dbtoconf.py:185
HcalRealisticZS::~HcalRealisticZS ( )
virtual

Definition at line 39 of file HcalRealisticZS.cc.

References algo_.

39  {
40  algo_->clearDbService();
41 }
std::auto_ptr< HcalZSAlgoRealistic > algo_

Member Function Documentation

void HcalRealisticZS::produce ( edm::Event e,
const edm::EventSetup c 
)
virtual

Implements edm::EDProducer.

Definition at line 43 of file HcalRealisticZS.cc.

References algo_, edm::EventSetup::get(), edm::Event::getByLabel(), inputLabel_, edm::Handle< T >::product(), edm::ESHandle< class >::product(), and edm::Event::put().

44 {
45 
49 
51  eventSetup.get<HcalDbRecord>().get(conditions);
52  algo_->setDbService(conditions.product());
53 
54  e.getByLabel(inputLabel_,hbhe);
55 
56  // create empty output
57  std::auto_ptr<HBHEDigiCollection> zs_hbhe(new HBHEDigiCollection);
58 
59  e.getByLabel(inputLabel_,ho);
60 
61  // create empty output
62  std::auto_ptr<HODigiCollection> zs_ho(new HODigiCollection);
63 
64  e.getByLabel(inputLabel_,hf);
65 
66  // create empty output
67  std::auto_ptr<HFDigiCollection> zs_hf(new HFDigiCollection);
68 
69  //run the algorithm
70 
71  algo_->suppress(*(hbhe.product()),*zs_hbhe);
72  algo_->suppress(*(ho.product()),*zs_ho);
73  algo_->suppress(*(hf.product()),*zs_hf);
74 
75 
76  edm::LogInfo("HcalZeroSuppression") << "Suppression (HBHE) input " << hbhe->size() << " digis, output " << zs_hbhe->size() << " digis"
77  << " (HO) input " << ho->size() << " digis, output " << zs_ho->size() << " digis"
78  << " (HF) input " << hf->size() << " digis, output " << zs_hf->size() << " digis";
79 
80 
81  // return result
82  e.put(zs_hbhe);
83  e.put(zs_ho);
84  e.put(zs_hf);
85 
86 }
std::auto_ptr< HcalZSAlgoRealistic > algo_
edm::InputTag inputLabel_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:84
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:355
T const * product() const
Definition: ESHandle.h:62
T const * product() const
Definition: Handle.h:74

Member Data Documentation

std::auto_ptr<HcalZSAlgoRealistic> HcalRealisticZS::algo_
private

Definition at line 29 of file HcalRealisticZS.h.

Referenced by HcalRealisticZS(), produce(), and ~HcalRealisticZS().

edm::InputTag HcalRealisticZS::inputLabel_
private

Definition at line 30 of file HcalRealisticZS.h.

Referenced by produce().