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_.

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_hfQIE10_ = consumes<QIE10DigiCollection>(edm::InputTag(inputLabel_, "HFQIE10DigiCollection"));
25  tok_hbheQIE11_ = consumes<QIE11DigiCollection>(edm::InputTag(inputLabel_, "HBHEQIE11DigiCollection"));
26 
27  const edm::ParameterSet& psHBHE=conf.getParameter<edm::ParameterSet>("hbhe");
28  bool markAndPass=psHBHE.getParameter<bool>("markAndPass");
29  hbhe_=std::unique_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  hbheQIE11_=std::unique_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<QIE11DigiCollection>("HBHEQIE11DigiCollection");
41 
42  const edm::ParameterSet& psHO=conf.getParameter<edm::ParameterSet>("ho");
43  markAndPass=psHO.getParameter<bool>("markAndPass");
44  ho_=std::unique_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::unique_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  hfQIE10_=std::unique_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<QIE10DigiCollection>("HFQIE10DigiCollection");
65 }
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 67 of file HcalSimpleAmplitudeZS.cc.

67  {
68 }

Member Function Documentation

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

Definition at line 70 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_.

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

Member Data Documentation

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

Definition at line 26 of file HcalSimpleAmplitudeZS.h.

Referenced by HcalSimpleAmplitudeZS(), and produce().

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

Definition at line 26 of file HcalSimpleAmplitudeZS.h.

Referenced by HcalSimpleAmplitudeZS(), and produce().

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

Definition at line 26 of file HcalSimpleAmplitudeZS.h.

Referenced by HcalSimpleAmplitudeZS(), and produce().

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

Definition at line 26 of file HcalSimpleAmplitudeZS.h.

Referenced by HcalSimpleAmplitudeZS(), and produce().

std::unique_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<QIE11DigiCollection> HcalSimpleAmplitudeZS::tok_hbheQIE11_
private

Definition at line 32 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 31 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().