CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
HcalSimpleAmplitudeZS Class Reference

#include <HcalSimpleAmplitudeZS.h>

Inheritance diagram for HcalSimpleAmplitudeZS:
edm::stream::EDProducer<>

Public Member Functions

 HcalSimpleAmplitudeZS (const edm::ParameterSet &ps)
 
void produce (edm::Event &e, const edm::EventSetup &c) override
 
 ~HcalSimpleAmplitudeZS () override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
bool hasAbilityToProduceInLumis () const final
 
bool hasAbilityToProduceInRuns () const final
 

Private Attributes

std::unique_ptr< HcalZSAlgoEnergyhbhe_
 
std::unique_ptr< HcalZSAlgoEnergyhbheQIE11_
 
std::unique_ptr< HcalZSAlgoEnergyhf_
 
std::unique_ptr< HcalZSAlgoEnergyhfQIE10_
 
std::unique_ptr< HcalZSAlgoEnergyho_
 
std::string inputLabel_
 
edm::EDGetTokenT< HBHEDigiCollectiontok_hbhe_
 
edm::EDGetTokenT< QIE11DigiCollectiontok_hbheQIE11_
 
edm::EDGetTokenT< HFDigiCollectiontok_hf_
 
edm::EDGetTokenT< QIE10DigiCollectiontok_hfQIE10_
 
edm::EDGetTokenT< HODigiCollectiontok_ho_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 

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_, hbheQIE11_, hf_, hfQIE10_, ho_, inputLabel_, hcalDigis_cfi::markAndPass, tok_hbhe_, tok_hbheQIE11_, tok_hf_, tok_hfQIE10_, and tok_ho_.

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

Definition at line 65 of file HcalSimpleAmplitudeZS.cc.

65 {}

Member Function Documentation

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

Definition at line 67 of file HcalSimpleAmplitudeZS.cc.

References edm::EventSetup::get(), edm::Event::getByToken(), hbhe_, hbheQIE11_, hf_, hfQIE10_, ho_, eostools::move(), edm::Handle< T >::product(), edm::Event::put(), HcalDataFrameContainer< Digi >::samples(), edm::SortedCollection< T, SORT >::size(), edm::DataFrameContainer::size(), tok_hbhe_, tok_hbheQIE11_, tok_hf_, tok_hfQIE10_, and tok_ho_.

67  {
68  // get conditions
70  eventSetup.get<HcalDbRecord>().get(conditions);
71 
72  {
73  hbhe_->prepare(&(*conditions));
75  e.getByToken(tok_hbhe_, digi);
76 
77  // create empty output
78  std::unique_ptr<HBHEDigiCollection> zs(new HBHEDigiCollection);
79  // run the algorithm
80  hbhe_->suppress(*(digi.product()), *zs);
81 
82  edm::LogInfo("HcalZeroSuppression") << "Suppression (HBHE) input " << digi->size() << " digis, output "
83  << zs->size() << " digis";
84 
85  // return result
86  e.put(std::move(zs));
87  hbhe_->done();
88  }
89  {
90  ho_->prepare(&(*conditions));
92  e.getByToken(tok_ho_, digi);
93 
94  // create empty output
95  std::unique_ptr<HODigiCollection> zs(new HODigiCollection);
96  // run the algorithm
97  ho_->suppress(*(digi.product()), *zs);
98 
99  edm::LogInfo("HcalZeroSuppression") << "Suppression (HO) input " << digi->size() << " digis, output " << zs->size()
100  << " digis";
101 
102  // return result
103  e.put(std::move(zs));
104  ho_->done();
105  }
106  {
107  hf_->prepare(&(*conditions));
109  e.getByToken(tok_hf_, digi);
110 
111  // create empty output
112  std::unique_ptr<HFDigiCollection> zs(new HFDigiCollection);
113  // run the algorithm
114  hf_->suppress(*(digi.product()), *zs);
115 
116  edm::LogInfo("HcalZeroSuppression") << "Suppression (HF) input " << digi->size() << " digis, output " << zs->size()
117  << " digis";
118 
119  // return result
120  e.put(std::move(zs));
121  hf_->done();
122  }
123  {
124  hfQIE10_->prepare(&(*conditions));
126  e.getByToken(tok_hfQIE10_, digi);
127 
128  // create empty output
129  std::unique_ptr<QIE10DigiCollection> zs(new QIE10DigiCollection(digi->samples()));
130  // run the algorithm
131  hfQIE10_->suppress(*(digi.product()), *zs);
132 
133  edm::LogInfo("HcalZeroSuppression") << "Suppression (HFQIE10) input " << digi->size() << " digis, output "
134  << zs->size() << " digis";
135 
136  // return result
137  e.put(std::move(zs), "HFQIE10DigiCollection");
138  hfQIE10_->done();
139  }
140  {
141  hbheQIE11_->prepare(&(*conditions));
143  e.getByToken(tok_hbheQIE11_, digi);
144 
145  // create empty output
146  std::unique_ptr<QIE11DigiCollection> zs(new QIE11DigiCollection(digi->samples()));
147  // run the algorithm
148  hbheQIE11_->suppress(*(digi.product()), *zs);
149 
150  edm::LogInfo("HcalZeroSuppression") << "Suppression (HBHEQIE11) input " << digi->size() << " digis, output "
151  << zs->size() << " digis";
152 
153  // return result
154  e.put(std::move(zs), "HBHEQIE11DigiCollection");
155  hbheQIE11_->done();
156  }
157 }
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:125
edm::EDGetTokenT< QIE11DigiCollection > tok_hbheQIE11_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:517
std::unique_ptr< HcalZSAlgoEnergy > hbheQIE11_
edm::EDGetTokenT< HFDigiCollection > tok_hf_
HcalDataFrameContainer< QIE10DataFrame > QIE10DigiCollection
edm::EDGetTokenT< QIE10DigiCollection > tok_hfQIE10_
std::unique_ptr< HcalZSAlgoEnergy > hf_
std::unique_ptr< HcalZSAlgoEnergy > hbhe_
HcalDataFrameContainer< QIE11DataFrame > QIE11DigiCollection
T const * product() const
Definition: Handle.h:74
edm::EDGetTokenT< HODigiCollection > tok_ho_
size_type size() const
std::unique_ptr< HcalZSAlgoEnergy > ho_
def move(src, dest)
Definition: eostools.py:511
std::unique_ptr< HcalZSAlgoEnergy > hfQIE10_
edm::EDGetTokenT< HBHEDigiCollection > tok_hbhe_

Member Data Documentation

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

Definition at line 27 of file HcalSimpleAmplitudeZS.h.

Referenced by HcalSimpleAmplitudeZS(), and produce().

std::unique_ptr<HcalZSAlgoEnergy> HcalSimpleAmplitudeZS::hbheQIE11_
private

Definition at line 27 of file HcalSimpleAmplitudeZS.h.

Referenced by HcalSimpleAmplitudeZS(), and produce().

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

Definition at line 27 of file HcalSimpleAmplitudeZS.h.

Referenced by HcalSimpleAmplitudeZS(), and produce().

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

Definition at line 27 of file HcalSimpleAmplitudeZS.h.

Referenced by HcalSimpleAmplitudeZS(), and produce().

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

Definition at line 27 of file HcalSimpleAmplitudeZS.h.

Referenced by HcalSimpleAmplitudeZS(), and produce().

std::string HcalSimpleAmplitudeZS::inputLabel_
private

Definition at line 28 of file HcalSimpleAmplitudeZS.h.

Referenced by HcalSimpleAmplitudeZS().

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

Definition at line 29 of file HcalSimpleAmplitudeZS.h.

Referenced by HcalSimpleAmplitudeZS(), and produce().

edm::EDGetTokenT<QIE11DigiCollection> HcalSimpleAmplitudeZS::tok_hbheQIE11_
private

Definition at line 33 of file HcalSimpleAmplitudeZS.h.

Referenced by HcalSimpleAmplitudeZS(), and produce().

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

Definition at line 31 of file HcalSimpleAmplitudeZS.h.

Referenced by HcalSimpleAmplitudeZS(), and produce().

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

Definition at line 32 of file HcalSimpleAmplitudeZS.h.

Referenced by HcalSimpleAmplitudeZS(), and produce().

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

Definition at line 30 of file HcalSimpleAmplitudeZS.h.

Referenced by HcalSimpleAmplitudeZS(), and produce().