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< 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
< 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_, hfUpgrade_, ho_, inputLabel_, HLT_FULL_cff::InputTag, tok_hbhe_, tok_hbheUpgrade_, tok_hf_, 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 
27  const edm::ParameterSet& psHBHE=conf.getParameter<edm::ParameterSet>("hbhe");
28  bool markAndPass=psHBHE.getParameter<bool>("markAndPass");
29  hbhe_=std::auto_ptr<HcalZSAlgoEnergy>(new HcalZSAlgoEnergy(markAndPass,
30  psHBHE.getParameter<int>("level"),
31  psHBHE.getParameter<int>("firstSample"),
32  psHBHE.getParameter<int>("samplesToAdd"),
33  psHBHE.getParameter<bool>("twoSided")));
34  produces<HBHEDigiCollection>();
35  hbheUpgrade_=std::auto_ptr<HcalZSAlgoEnergy>(new HcalZSAlgoEnergy(markAndPass,
36  psHBHE.getParameter<int>("level"),
37  psHBHE.getParameter<int>("firstSample"),
38  psHBHE.getParameter<int>("samplesToAdd"),
39  psHBHE.getParameter<bool>("twoSided")));
40  produces<HBHEUpgradeDigiCollection>("HBHEUpgradeDigiCollection");
41 
42  const edm::ParameterSet& psHO=conf.getParameter<edm::ParameterSet>("ho");
43  markAndPass=psHO.getParameter<bool>("markAndPass");
44  ho_=std::auto_ptr<HcalZSAlgoEnergy>(new HcalZSAlgoEnergy(markAndPass,
45  psHO.getParameter<int>("level"),
46  psHO.getParameter<int>("firstSample"),
47  psHO.getParameter<int>("samplesToAdd"),
48  psHO.getParameter<bool>("twoSided")));
49  produces<HODigiCollection>();
50 
51  const edm::ParameterSet& psHF=conf.getParameter<edm::ParameterSet>("hf");
52  markAndPass=psHF.getParameter<bool>("markAndPass");
53  hf_=std::auto_ptr<HcalZSAlgoEnergy>(new HcalZSAlgoEnergy(markAndPass,
54  psHF.getParameter<int>("level"),
55  psHF.getParameter<int>("firstSample"),
56  psHF.getParameter<int>("samplesToAdd"),
57  psHF.getParameter<bool>("twoSided")));
58  produces<HFDigiCollection>();
59  hfUpgrade_=std::auto_ptr<HcalZSAlgoEnergy>(new HcalZSAlgoEnergy(markAndPass,
60  psHF.getParameter<int>("level"),
61  psHF.getParameter<int>("firstSample"),
62  psHF.getParameter<int>("samplesToAdd"),
63  psHF.getParameter<bool>("twoSided")));
64  produces<HFUpgradeDigiCollection>("HFUpgradeDigiCollection");
65 
66 }
T getParameter(std::string const &) const
edm::EDGetTokenT< HFDigiCollection > tok_hf_
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 68 of file HcalSimpleAmplitudeZS.cc.

68  {
69 }

Member Function Documentation

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

Implements edm::EDProducer.

Definition at line 71 of file HcalSimpleAmplitudeZS.cc.

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

72 {
73  // get conditions
75  eventSetup.get<HcalDbRecord>().get(conditions);
76 
77 
78  {
79  hbhe_->prepare(&(*conditions));
81  e.getByToken(tok_hbhe_,digi);
82 
83  // create empty output
84  std::auto_ptr<HBHEDigiCollection> zs(new HBHEDigiCollection);
85  // run the algorithm
86  hbhe_->suppress(*(digi.product()),*zs);
87 
88  edm::LogInfo("HcalZeroSuppression") << "Suppression (HBHE) input " << digi->size() << " digis, output " << zs->size() << " digis";
89 
90  // return result
91  e.put(zs);
92  hbhe_->done();
93  }
94  {
95  ho_->prepare(&(*conditions));
97  e.getByToken(tok_ho_,digi);
98 
99  // create empty output
100  std::auto_ptr<HODigiCollection> zs(new HODigiCollection);
101  // run the algorithm
102  ho_->suppress(*(digi.product()),*zs);
103 
104  edm::LogInfo("HcalZeroSuppression") << "Suppression (HO) input " << digi->size() << " digis, output " << zs->size() << " digis";
105 
106  // return result
107  e.put(zs);
108  ho_->done();
109  }
110  {
111  hf_->prepare(&(*conditions));
113  e.getByToken(tok_hf_,digi);
114 
115  // create empty output
116  std::auto_ptr<HFDigiCollection> zs(new HFDigiCollection);
117  // run the algorithm
118  hf_->suppress(*(digi.product()),*zs);
119 
120  edm::LogInfo("HcalZeroSuppression") << "Suppression (HF) input " << digi->size() << " digis, output " << zs->size() << " digis";
121 
122  // return result
123  e.put(zs);
124  hf_->done();
125  }
126  {
127  hbheUpgrade_->prepare(&(*conditions));
130 
131  // create empty output
132  std::auto_ptr<HBHEUpgradeDigiCollection> zs(new HBHEUpgradeDigiCollection);
133  // run the algorithm
134  hbheUpgrade_->suppress(*(digi.product()),*zs);
135 
136  edm::LogInfo("HcalZeroSuppression") << "Suppression (HBHEUpgrade) input " << digi->size() << " digis, output " << zs->size() << " digis";
137 
138  // return result
139  e.put(zs,"HBHEUpgradeDigiCollection");
140  hbheUpgrade_->done();
141  }
142  {
143  hfUpgrade_->prepare(&(*conditions));
145  e.getByToken(tok_hfUpgrade_,digi);
146 
147  // create empty output
148  std::auto_ptr<HFUpgradeDigiCollection> zs(new HFUpgradeDigiCollection);
149  // run the algorithm
150  hfUpgrade_->suppress(*(digi.product()),*zs);
151 
152  edm::LogInfo("HcalZeroSuppression") << "Suppression (HFUpgrade) input " << digi->size() << " digis, output " << zs->size() << " digis";
153 
154  // return result
155  e.put(zs, "HFUpgradeDigiCollection");
156  hfUpgrade_->done();
157  }
158 
159 }
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::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<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().