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<> edm::stream::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

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
 
- Public Member Functions inherited from edm::stream::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
virtual ~ProducerBase () noexcept(false)
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

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
 
- Public Types inherited from edm::stream::EDProducerBase
typedef EDProducerAdaptorBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex >>
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::stream::EDProducerBase
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_, 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:127
edm::EDGetTokenT< QIE11DigiCollection > tok_hbheQIE11_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:508
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().