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

#include <HcalSimpleAmplitudeZS.h>

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

Public Member Functions

 HcalSimpleAmplitudeZS (const edm::ParameterSet &ps)
 
virtual void produce (edm::Event &e, const edm::EventSetup &c)
 
virtual ~HcalSimpleAmplitudeZS ()
 
- 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< HcalZSAlgoEnergyhbhe_
 
std::auto_ptr< HcalZSAlgoEnergyhf_
 
std::auto_ptr< HcalZSAlgoEnergyho_
 
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)
 
static void prevalidate (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

Date:
2011/05/20 17:17:34
Revision:
1.3
Author
J. Mans - Minnesota

Definition at line 19 of file HcalSimpleAmplitudeZS.h.

Constructor & Destructor Documentation

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

Definition at line 18 of file HcalSimpleAmplitudeZS.cc.

References edm::ParameterSet::getParameter(), hbhe_, hf_, and ho_.

18  :
19  inputLabel_(conf.getParameter<edm::InputTag>("digiLabel"))
20 {
21  const edm::ParameterSet& psHBHE=conf.getParameter<edm::ParameterSet>("hbhe");
22  bool markAndPass=psHBHE.getParameter<bool>("markAndPass");
23  hbhe_=std::auto_ptr<HcalZSAlgoEnergy>(new HcalZSAlgoEnergy(markAndPass,
24  psHBHE.getParameter<int>("level"),
25  psHBHE.getParameter<int>("firstSample"),
26  psHBHE.getParameter<int>("samplesToAdd"),
27  psHBHE.getParameter<bool>("twoSided")));
28  produces<HBHEDigiCollection>();
29 
30  const edm::ParameterSet& psHO=conf.getParameter<edm::ParameterSet>("ho");
31  markAndPass=psHO.getParameter<bool>("markAndPass");
32  ho_=std::auto_ptr<HcalZSAlgoEnergy>(new HcalZSAlgoEnergy(markAndPass,
33  psHO.getParameter<int>("level"),
34  psHO.getParameter<int>("firstSample"),
35  psHO.getParameter<int>("samplesToAdd"),
36  psHO.getParameter<bool>("twoSided")));
37  produces<HODigiCollection>();
38 
39  const edm::ParameterSet& psHF=conf.getParameter<edm::ParameterSet>("hf");
40  markAndPass=psHO.getParameter<bool>("markAndPass");
41  hf_=std::auto_ptr<HcalZSAlgoEnergy>(new HcalZSAlgoEnergy(markAndPass,
42  psHF.getParameter<int>("level"),
43  psHF.getParameter<int>("firstSample"),
44  psHF.getParameter<int>("samplesToAdd"),
45  psHF.getParameter<bool>("twoSided")));
46  produces<HFDigiCollection>();
47 
48 }
T getParameter(std::string const &) const
std::auto_ptr< HcalZSAlgoEnergy > hbhe_
tuple conf
Definition: dbtoconf.py:185
std::auto_ptr< HcalZSAlgoEnergy > ho_
std::auto_ptr< HcalZSAlgoEnergy > hf_
HcalSimpleAmplitudeZS::~HcalSimpleAmplitudeZS ( )
virtual

Definition at line 50 of file HcalSimpleAmplitudeZS.cc.

50  {
51 }

Member Function Documentation

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

Implements edm::EDProducer.

Definition at line 53 of file HcalSimpleAmplitudeZS.cc.

References edm::EventSetup::get(), edm::Event::getByLabel(), hbhe_, hf_, ho_, inputLabel_, edm::Handle< T >::product(), and edm::Event::put().

54 {
55  // get conditions
57  eventSetup.get<HcalDbRecord>().get(conditions);
58 
59 
60  {
61  hbhe_->prepare(&(*conditions));
63  e.getByLabel(inputLabel_,digi);
64 
65  // create empty output
66  std::auto_ptr<HBHEDigiCollection> zs(new HBHEDigiCollection);
67  // run the algorithm
68  hbhe_->suppress(*(digi.product()),*zs);
69 
70  edm::LogInfo("HcalZeroSuppression") << "Suppression (HBHE) input " << digi->size() << " digis, output " << zs->size() << " digis";
71 
72  // return result
73  e.put(zs);
74  hbhe_->done();
75  }
76  {
77  ho_->prepare(&(*conditions));
79  e.getByLabel(inputLabel_,digi);
80 
81  // create empty output
82  std::auto_ptr<HODigiCollection> zs(new HODigiCollection);
83  // run the algorithm
84  ho_->suppress(*(digi.product()),*zs);
85 
86  edm::LogInfo("HcalZeroSuppression") << "Suppression (HO) input " << digi->size() << " digis, output " << zs->size() << " digis";
87 
88  // return result
89  e.put(zs);
90  ho_->done();
91  }
92  {
93  hf_->prepare(&(*conditions));
95  e.getByLabel(inputLabel_,digi);
96 
97  // create empty output
98  std::auto_ptr<HFDigiCollection> zs(new HFDigiCollection);
99  // run the algorithm
100  hf_->suppress(*(digi.product()),*zs);
101 
102  edm::LogInfo("HcalZeroSuppression") << "Suppression (HF) input " << digi->size() << " digis, output " << zs->size() << " digis";
103 
104  // return result
105  e.put(zs);
106  hf_->done();
107  }
108 
109 }
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:85
std::auto_ptr< HcalZSAlgoEnergy > hbhe_
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
T const * product() const
Definition: Handle.h:74
std::auto_ptr< HcalZSAlgoEnergy > ho_
std::auto_ptr< HcalZSAlgoEnergy > hf_

Member Data Documentation

std::auto_ptr<HcalZSAlgoEnergy> HcalSimpleAmplitudeZS::hbhe_
private

Definition at line 25 of file HcalSimpleAmplitudeZS.h.

Referenced by HcalSimpleAmplitudeZS(), and produce().

std::auto_ptr<HcalZSAlgoEnergy> HcalSimpleAmplitudeZS::hf_
private

Definition at line 25 of file HcalSimpleAmplitudeZS.h.

Referenced by HcalSimpleAmplitudeZS(), and produce().

std::auto_ptr<HcalZSAlgoEnergy> HcalSimpleAmplitudeZS::ho_
private

Definition at line 25 of file HcalSimpleAmplitudeZS.h.

Referenced by HcalSimpleAmplitudeZS(), and produce().

edm::InputTag HcalSimpleAmplitudeZS::inputLabel_
private

Definition at line 26 of file HcalSimpleAmplitudeZS.h.

Referenced by produce().