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 ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 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
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (std::string const &iProcessName, std::string const &iModuleLabel, bool iPrint, std::vector< char const * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Attributes

std::auto_ptr< HcalZSAlgoEnergyhbhe_
 
std::auto_ptr< HcalZSAlgoEnergyhbheUpgrade_
 
std::auto_ptr< HcalZSAlgoEnergyhf_
 
std::auto_ptr< HcalZSAlgoEnergyhfQIE10_
 
std::auto_ptr< HcalZSAlgoEnergyhfUpgrade_
 
std::auto_ptr< HcalZSAlgoEnergyho_
 
std::string inputLabel_
 
edm::EDGetTokenT
< HBHEDigiCollection
tok_hbhe_
 
edm::EDGetTokenT
< HBHEUpgradeDigiCollection
tok_hbheUpgrade_
 
edm::EDGetTokenT
< HFDigiCollection
tok_hf_
 
edm::EDGetTokenT
< QIE10DigiCollection
tok_hfQIE10_
 
edm::EDGetTokenT
< HFUpgradeDigiCollection
tok_hfUpgrade_
 
edm::EDGetTokenT
< HODigiCollection
tok_ho_
 

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- 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::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

Author
J. Mans - Minnesota

Definition at line 20 of file HcalSimpleAmplitudeZS.h.

Constructor & Destructor Documentation

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

Definition at line 16 of file HcalSimpleAmplitudeZS.cc.

References edm::ParameterSet::getParameter(), hbhe_, hbheUpgrade_, hf_, hfQIE10_, hfUpgrade_, ho_, inputLabel_, HLT_FULL_cff::InputTag, tok_hbhe_, tok_hbheUpgrade_, tok_hf_, tok_hfQIE10_, tok_hfUpgrade_, and tok_ho_.

16  :
17  inputLabel_(conf.getParameter<std::string>("digiLabel"))
18 {
19 
20  // register for data access
21  tok_hbhe_ = consumes<HBHEDigiCollection>(edm::InputTag(inputLabel_));
22  tok_ho_ = consumes<HODigiCollection>(edm::InputTag(inputLabel_));
23  tok_hf_ = consumes<HFDigiCollection>(edm::InputTag(inputLabel_));
24  tok_hbheUpgrade_ = consumes<HBHEUpgradeDigiCollection>(edm::InputTag(inputLabel_, "HBHEUpgradeDigiCollection"));
25  tok_hfUpgrade_ = consumes<HFUpgradeDigiCollection>(edm::InputTag(inputLabel_, "HFUpgradeDigiCollection"));
26  tok_hfQIE10_ = consumes<QIE10DigiCollection>(edm::InputTag(inputLabel_, "HFQIE10DigiCollection"));
27 
28  const edm::ParameterSet& psHBHE=conf.getParameter<edm::ParameterSet>("hbhe");
29  bool markAndPass=psHBHE.getParameter<bool>("markAndPass");
30  hbhe_=std::auto_ptr<HcalZSAlgoEnergy>(new HcalZSAlgoEnergy(markAndPass,
31  psHBHE.getParameter<int>("level"),
32  psHBHE.getParameter<int>("firstSample"),
33  psHBHE.getParameter<int>("samplesToAdd"),
34  psHBHE.getParameter<bool>("twoSided")));
35  produces<HBHEDigiCollection>();
36  hbheUpgrade_=std::auto_ptr<HcalZSAlgoEnergy>(new HcalZSAlgoEnergy(markAndPass,
37  psHBHE.getParameter<int>("level"),
38  psHBHE.getParameter<int>("firstSample"),
39  psHBHE.getParameter<int>("samplesToAdd"),
40  psHBHE.getParameter<bool>("twoSided")));
41  produces<HBHEUpgradeDigiCollection>("HBHEUpgradeDigiCollection");
42 
43  const edm::ParameterSet& psHO=conf.getParameter<edm::ParameterSet>("ho");
44  markAndPass=psHO.getParameter<bool>("markAndPass");
45  ho_=std::auto_ptr<HcalZSAlgoEnergy>(new HcalZSAlgoEnergy(markAndPass,
46  psHO.getParameter<int>("level"),
47  psHO.getParameter<int>("firstSample"),
48  psHO.getParameter<int>("samplesToAdd"),
49  psHO.getParameter<bool>("twoSided")));
50  produces<HODigiCollection>();
51 
52  const edm::ParameterSet& psHF=conf.getParameter<edm::ParameterSet>("hf");
53  markAndPass=psHF.getParameter<bool>("markAndPass");
54  hf_=std::auto_ptr<HcalZSAlgoEnergy>(new HcalZSAlgoEnergy(markAndPass,
55  psHF.getParameter<int>("level"),
56  psHF.getParameter<int>("firstSample"),
57  psHF.getParameter<int>("samplesToAdd"),
58  psHF.getParameter<bool>("twoSided")));
59  produces<HFDigiCollection>();
60  hfUpgrade_=std::auto_ptr<HcalZSAlgoEnergy>(new HcalZSAlgoEnergy(markAndPass,
61  psHF.getParameter<int>("level"),
62  psHF.getParameter<int>("firstSample"),
63  psHF.getParameter<int>("samplesToAdd"),
64  psHF.getParameter<bool>("twoSided")));
65  produces<HFUpgradeDigiCollection>("HFUpgradeDigiCollection");
66  hfQIE10_=std::auto_ptr<HcalZSAlgoEnergy>(new HcalZSAlgoEnergy(markAndPass,
67  psHF.getParameter<int>("level"),
68  psHF.getParameter<int>("firstSample"),
69  psHF.getParameter<int>("samplesToAdd"),
70  psHF.getParameter<bool>("twoSided")));
71  produces<QIE10DigiCollection>("HFQIE10DigiCollection");
72 }
T getParameter(std::string const &) const
std::auto_ptr< HcalZSAlgoEnergy > hfQIE10_
edm::EDGetTokenT< HFDigiCollection > tok_hf_
edm::EDGetTokenT< QIE10DigiCollection > tok_hfQIE10_
std::auto_ptr< HcalZSAlgoEnergy > hbhe_
edm::EDGetTokenT< HBHEUpgradeDigiCollection > tok_hbheUpgrade_
std::auto_ptr< HcalZSAlgoEnergy > hfUpgrade_
edm::EDGetTokenT< HODigiCollection > tok_ho_
edm::EDGetTokenT< HFUpgradeDigiCollection > tok_hfUpgrade_
std::auto_ptr< HcalZSAlgoEnergy > ho_
std::auto_ptr< HcalZSAlgoEnergy > hbheUpgrade_
std::auto_ptr< HcalZSAlgoEnergy > hf_
edm::EDGetTokenT< HBHEDigiCollection > tok_hbhe_
HcalSimpleAmplitudeZS::~HcalSimpleAmplitudeZS ( )
virtual

Definition at line 74 of file HcalSimpleAmplitudeZS.cc.

74  {
75 }

Member Function Documentation

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

Implements edm::EDProducer.

Definition at line 77 of file HcalSimpleAmplitudeZS.cc.

References edm::EventSetup::get(), edm::Event::getByToken(), hbhe_, hbheUpgrade_, hf_, hfQIE10_, hfUpgrade_, ho_, edm::Handle< T >::product(), edm::Event::put(), tok_hbhe_, tok_hbheUpgrade_, tok_hf_, tok_hfUpgrade_, and tok_ho_.

78 {
79  // get conditions
81  eventSetup.get<HcalDbRecord>().get(conditions);
82 
83 
84  {
85  hbhe_->prepare(&(*conditions));
87  e.getByToken(tok_hbhe_,digi);
88 
89  // create empty output
90  std::auto_ptr<HBHEDigiCollection> zs(new HBHEDigiCollection);
91  // run the algorithm
92  hbhe_->suppress(*(digi.product()),*zs);
93 
94  edm::LogInfo("HcalZeroSuppression") << "Suppression (HBHE) input " << digi->size() << " digis, output " << zs->size() << " digis";
95 
96  // return result
97  e.put(zs);
98  hbhe_->done();
99  }
100  {
101  ho_->prepare(&(*conditions));
103  e.getByToken(tok_ho_,digi);
104 
105  // create empty output
106  std::auto_ptr<HODigiCollection> zs(new HODigiCollection);
107  // run the algorithm
108  ho_->suppress(*(digi.product()),*zs);
109 
110  edm::LogInfo("HcalZeroSuppression") << "Suppression (HO) input " << digi->size() << " digis, output " << zs->size() << " digis";
111 
112  // return result
113  e.put(zs);
114  ho_->done();
115  }
116  {
117  hf_->prepare(&(*conditions));
119  e.getByToken(tok_hf_,digi);
120 
121  // create empty output
122  std::auto_ptr<HFDigiCollection> zs(new HFDigiCollection);
123  // run the algorithm
124  hf_->suppress(*(digi.product()),*zs);
125 
126  edm::LogInfo("HcalZeroSuppression") << "Suppression (HF) input " << digi->size() << " digis, output " << zs->size() << " digis";
127 
128  // return result
129  e.put(zs);
130  hf_->done();
131  }
132  {
133  hbheUpgrade_->prepare(&(*conditions));
136 
137  // create empty output
138  std::auto_ptr<HBHEUpgradeDigiCollection> zs(new HBHEUpgradeDigiCollection);
139  // run the algorithm
140  hbheUpgrade_->suppress(*(digi.product()),*zs);
141 
142  edm::LogInfo("HcalZeroSuppression") << "Suppression (HBHEUpgrade) input " << digi->size() << " digis, output " << zs->size() << " digis";
143 
144  // return result
145  e.put(zs,"HBHEUpgradeDigiCollection");
146  hbheUpgrade_->done();
147  }
148  {
149  hfUpgrade_->prepare(&(*conditions));
151  e.getByToken(tok_hfUpgrade_,digi);
152 
153  // create empty output
154  std::auto_ptr<HFUpgradeDigiCollection> zs(new HFUpgradeDigiCollection);
155  // run the algorithm
156  hfUpgrade_->suppress(*(digi.product()),*zs);
157 
158  edm::LogInfo("HcalZeroSuppression") << "Suppression (HFUpgrade) input " << digi->size() << " digis, output " << zs->size() << " digis";
159 
160  // return result
161  e.put(zs, "HFUpgradeDigiCollection");
162  hfUpgrade_->done();
163  }
164  {
165  hfQIE10_->prepare(&(*conditions));
167  e.getByToken(tok_hfUpgrade_,digi);
168 
169  // create empty output
170  std::auto_ptr<QIE10DigiCollection> zs(new QIE10DigiCollection);
171  // run the algorithm
172  hfQIE10_->suppress(*(digi.product()),*zs);
173 
174  edm::LogInfo("HcalZeroSuppression") << "Suppression (HFQIE10) input " << digi->size() << " digis, output " << zs->size() << " digis";
175 
176  // return result
177  e.put(zs, "HFQIE10DigiCollection");
178  hfQIE10_->done();
179  }
180 
181 }
std::auto_ptr< HcalZSAlgoEnergy > hfQIE10_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:462
edm::EDGetTokenT< HFDigiCollection > tok_hf_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:121
std::auto_ptr< HcalZSAlgoEnergy > hbhe_
edm::EDGetTokenT< HBHEUpgradeDigiCollection > tok_hbheUpgrade_
T const * product() const
Definition: Handle.h:81
std::auto_ptr< HcalZSAlgoEnergy > hfUpgrade_
edm::EDGetTokenT< HODigiCollection > tok_ho_
edm::EDGetTokenT< HFUpgradeDigiCollection > tok_hfUpgrade_
std::auto_ptr< HcalZSAlgoEnergy > ho_
std::auto_ptr< HcalZSAlgoEnergy > hbheUpgrade_
std::auto_ptr< HcalZSAlgoEnergy > hf_
edm::EDGetTokenT< HBHEDigiCollection > tok_hbhe_

Member Data Documentation

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

Definition at line 26 of file HcalSimpleAmplitudeZS.h.

Referenced by HcalSimpleAmplitudeZS(), and produce().

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

Definition at line 26 of file HcalSimpleAmplitudeZS.h.

Referenced by HcalSimpleAmplitudeZS(), and produce().

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

Definition at line 26 of file HcalSimpleAmplitudeZS.h.

Referenced by HcalSimpleAmplitudeZS(), and produce().

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

Definition at line 26 of file HcalSimpleAmplitudeZS.h.

Referenced by HcalSimpleAmplitudeZS(), and produce().

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

Definition at line 26 of file HcalSimpleAmplitudeZS.h.

Referenced by HcalSimpleAmplitudeZS(), and produce().

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

Definition at line 26 of file HcalSimpleAmplitudeZS.h.

Referenced by HcalSimpleAmplitudeZS(), and produce().

std::string HcalSimpleAmplitudeZS::inputLabel_
private

Definition at line 27 of file HcalSimpleAmplitudeZS.h.

Referenced by HcalSimpleAmplitudeZS().

edm::EDGetTokenT<HBHEDigiCollection> HcalSimpleAmplitudeZS::tok_hbhe_
private

Definition at line 28 of file HcalSimpleAmplitudeZS.h.

Referenced by HcalSimpleAmplitudeZS(), and produce().

edm::EDGetTokenT<HBHEUpgradeDigiCollection> HcalSimpleAmplitudeZS::tok_hbheUpgrade_
private

Definition at line 31 of file HcalSimpleAmplitudeZS.h.

Referenced by HcalSimpleAmplitudeZS(), and produce().

edm::EDGetTokenT<HFDigiCollection> HcalSimpleAmplitudeZS::tok_hf_
private

Definition at line 30 of file HcalSimpleAmplitudeZS.h.

Referenced by HcalSimpleAmplitudeZS(), and produce().

edm::EDGetTokenT<QIE10DigiCollection> HcalSimpleAmplitudeZS::tok_hfQIE10_
private

Definition at line 33 of file HcalSimpleAmplitudeZS.h.

Referenced by HcalSimpleAmplitudeZS().

edm::EDGetTokenT<HFUpgradeDigiCollection> HcalSimpleAmplitudeZS::tok_hfUpgrade_
private

Definition at line 32 of file HcalSimpleAmplitudeZS.h.

Referenced by HcalSimpleAmplitudeZS(), and produce().

edm::EDGetTokenT<HODigiCollection> HcalSimpleAmplitudeZS::tok_ho_
private

Definition at line 29 of file HcalSimpleAmplitudeZS.h.

Referenced by HcalSimpleAmplitudeZS(), and produce().