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::EDConsumerBase 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 &)
 
std::function< void(BranchDescription
const &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndex indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

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
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
- 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

Date:
2012/10/31 15:34:25
Revision:
1.4
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 17 of file HcalSimpleAmplitudeZS.cc.

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

17  :
18  inputLabel_(conf.getParameter<edm::InputTag>("digiLabel"))
19 {
20  const edm::ParameterSet& psHBHE=conf.getParameter<edm::ParameterSet>("hbhe");
21  bool markAndPass=psHBHE.getParameter<bool>("markAndPass");
22  hbhe_=std::auto_ptr<HcalZSAlgoEnergy>(new HcalZSAlgoEnergy(markAndPass,
23  psHBHE.getParameter<int>("level"),
24  psHBHE.getParameter<int>("firstSample"),
25  psHBHE.getParameter<int>("samplesToAdd"),
26  psHBHE.getParameter<bool>("twoSided")));
27  produces<HBHEDigiCollection>();
28 
29  const edm::ParameterSet& psHO=conf.getParameter<edm::ParameterSet>("ho");
30  markAndPass=psHO.getParameter<bool>("markAndPass");
31  ho_=std::auto_ptr<HcalZSAlgoEnergy>(new HcalZSAlgoEnergy(markAndPass,
32  psHO.getParameter<int>("level"),
33  psHO.getParameter<int>("firstSample"),
34  psHO.getParameter<int>("samplesToAdd"),
35  psHO.getParameter<bool>("twoSided")));
36  produces<HODigiCollection>();
37 
38  const edm::ParameterSet& psHF=conf.getParameter<edm::ParameterSet>("hf");
39  markAndPass=psHO.getParameter<bool>("markAndPass");
40  hf_=std::auto_ptr<HcalZSAlgoEnergy>(new HcalZSAlgoEnergy(markAndPass,
41  psHF.getParameter<int>("level"),
42  psHF.getParameter<int>("firstSample"),
43  psHF.getParameter<int>("samplesToAdd"),
44  psHF.getParameter<bool>("twoSided")));
45  produces<HFDigiCollection>();
46 
47 }
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 49 of file HcalSimpleAmplitudeZS.cc.

49  {
50 }

Member Function Documentation

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

Implements edm::EDProducer.

Definition at line 52 of file HcalSimpleAmplitudeZS.cc.

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

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