CMS 3D CMS Logo

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

#include <MyEDProducts/HcalPlotter/src/HcalQLPlotAnal.cc>

Inheritance diagram for HcalQLPlotAnal:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

 HcalQLPlotAnal (const edm::ParameterSet &)
 
 ~HcalQLPlotAnal () override
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
SerialTaskQueueglobalLuminosityBlocksQueue ()
 
SerialTaskQueueglobalRunsQueue ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
 ~EDAnalyzer () override
 
- 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 &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
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
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void endJob () override
 

Private Attributes

HcalQLPlotAnalAlgosalgo_
 
double calibFC2GeV_
 
bool doCalib_
 
edm::InputTag hcalDigiLabel_
 
edm::EDGetTokenT< HcalCalibDigiCollectiontok_calib_
 
edm::EDGetTokenT< HBHEDigiCollectiontok_hbhe_
 
edm::EDGetTokenT< HBHERecHitCollectiontok_hbherec_
 
edm::EDGetTokenT< HFDigiCollectiontok_hf_
 
edm::EDGetTokenT< HFRecHitCollectiontok_hfrec_
 
edm::EDGetTokenT< HODigiCollectiontok_ho_
 
edm::EDGetTokenT< HORecHitCollectiontok_horec_
 
edm::EDGetTokenT< HcalTBTriggerDatatok_tb_
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
static bool wantsGlobalLuminosityBlocks ()
 
static bool wantsGlobalRuns ()
 
static bool wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

Detailed Description

Description: <one line="" class="" summary>="">

Implementation: <Notes on="" implementation>="">

Definition at line 40 of file HcalQLPlotAnal.cc.

Constructor & Destructor Documentation

◆ HcalQLPlotAnal()

HcalQLPlotAnal::HcalQLPlotAnal ( const edm::ParameterSet iConfig)
explicit

Definition at line 75 of file HcalQLPlotAnal.cc.

76  : hcalDigiLabel_(iConfig.getUntrackedParameter<edm::InputTag>("hcalDigiTag")),
77  doCalib_(iConfig.getUntrackedParameter<bool>("doCalib", false)),
78  calibFC2GeV_(iConfig.getUntrackedParameter<double>("calibFC2GeV", 0.2)) {
79  algo_ = new HcalQLPlotAnalAlgos(iConfig.getUntrackedParameter<std::string>("outputFilename").c_str(),
80  iConfig.getParameter<edm::ParameterSet>("HistoParameters"));
81 
82  tok_hbherec_ = consumes<HBHERecHitCollection>(iConfig.getUntrackedParameter<edm::InputTag>("hbheRHtag"));
83  tok_horec_ = consumes<HORecHitCollection>(iConfig.getUntrackedParameter<edm::InputTag>("hoRHtag"));
84  tok_hfrec_ = consumes<HFRecHitCollection>(iConfig.getUntrackedParameter<edm::InputTag>("hfRHtag"));
85  tok_hbhe_ = consumes<HBHEDigiCollection>(hcalDigiLabel_);
86  tok_ho_ = consumes<HODigiCollection>(hcalDigiLabel_);
87  tok_hf_ = consumes<HFDigiCollection>(hcalDigiLabel_);
88  tok_calib_ = consumes<HcalCalibDigiCollection>(hcalDigiLabel_);
89  tok_tb_ = consumes<HcalTBTriggerData>(iConfig.getUntrackedParameter<edm::InputTag>("hcalTrigTag"));
90 }

References algo_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), hcalDigiLabel_, AlCaHLTBitMon_QueryRunRegistry::string, tok_calib_, tok_hbhe_, tok_hbherec_, tok_hf_, tok_hfrec_, tok_ho_, tok_horec_, and tok_tb_.

◆ ~HcalQLPlotAnal()

HcalQLPlotAnal::~HcalQLPlotAnal ( )
override

Definition at line 92 of file HcalQLPlotAnal.cc.

92  {
93  // do anything here that needs to be done at destruction time
94  // (e.g. close files, deallocate resources etc.)
95 }

Member Function Documentation

◆ analyze()

void HcalQLPlotAnal::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Implements edm::EDAnalyzer.

Definition at line 102 of file HcalQLPlotAnal.cc.

102  {
103  // Step A/C: Get Inputs and process (repeatedly)
105  iEvent.getByToken(tok_tb_, trig);
106  if (!trig.isValid()) {
107  edm::LogError("HcalQLPlotAnal::analyze") << "No Trigger Data found, skip event";
108  return;
109  } else {
111  }
113  iEvent.getByToken(tok_hbhe_, hbhedg);
114  if (!hbhedg.isValid()) {
115  edm::LogWarning("HcalQLPlotAnal::analyze") << "One of HBHE Digis/RecHits not found";
116  } else {
117  algo_->processDigi(*hbhedg);
118  }
120  iEvent.getByToken(tok_hbherec_, hbherh);
121  if (!hbherh.isValid()) {
122  edm::LogWarning("HcalQLPlotAnal::analyze") << "One of HBHE Digis/RecHits not found";
123  } else {
124  algo_->processRH(*hbherh, *hbhedg);
125  }
126 
128  iEvent.getByToken(tok_ho_, hodg);
129  if (!hodg.isValid()) {
130  // can't find it!
131  edm::LogWarning("HcalQLPlotAnal::analyze") << "One of HO Digis/RecHits not found";
132  } else {
133  algo_->processDigi(*hodg);
134  }
136  iEvent.getByToken(tok_horec_, horh);
137  if (!horh.isValid()) {
138  // can't find it!
139  edm::LogWarning("HcalQLPlotAnal::analyze") << "One of HO Digis/RecHits not found";
140  } else {
141  algo_->processRH(*horh, *hodg);
142  }
143 
145  iEvent.getByToken(tok_hf_, hfdg);
146 
147  if (!hfdg.isValid()) {
148  // can't find it!
149  edm::LogWarning("HcalQLPlotAnal::analyze") << "One of HF Digis/RecHits not found";
150  } else {
151  algo_->processDigi(*hfdg);
152  }
153 
155  iEvent.getByToken(tok_hfrec_, hfrh);
156  if (!hfrh.isValid()) {
157  // can't find it!
158  edm::LogWarning("HcalQLPlotAnal::analyze") << "One of HF Digis/RecHits not found";
159  } else {
160  algo_->processRH(*hfrh, *hfdg);
161  }
162 
163  if (doCalib_) {
164  // No rechits as of yet...
166  iEvent.getByToken(tok_calib_, calibdg);
167  if (!calibdg.isValid()) {
168  edm::LogWarning("HcalQLPlotAnal::analyze") << "Hcal Calib Digis not found";
169  } else {
170  algo_->processDigi(*calibdg, calibFC2GeV_);
171  }
172  }
173 }

References algo_, calibFC2GeV_, doCalib_, iEvent, edm::HandleBase::isValid(), HcalQLPlotAnalAlgos::processDigi(), HcalQLPlotAnalAlgos::processRH(), HcalQLPlotAnalAlgos::SetEventType(), tok_calib_, tok_hbhe_, tok_hbherec_, tok_hf_, tok_hfrec_, tok_ho_, tok_horec_, tok_tb_, and ClusterTask_cfi::trig.

◆ endJob()

void HcalQLPlotAnal::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 176 of file HcalQLPlotAnal.cc.

176 { algo_->end(); }

References algo_, and HcalQLPlotAnalAlgos::end().

Member Data Documentation

◆ algo_

HcalQLPlotAnalAlgos* HcalQLPlotAnal::algo_
private

Definition at line 61 of file HcalQLPlotAnal.cc.

Referenced by analyze(), endJob(), and HcalQLPlotAnal().

◆ calibFC2GeV_

double HcalQLPlotAnal::calibFC2GeV_
private

Definition at line 60 of file HcalQLPlotAnal.cc.

Referenced by analyze().

◆ doCalib_

bool HcalQLPlotAnal::doCalib_
private

Definition at line 59 of file HcalQLPlotAnal.cc.

Referenced by analyze().

◆ hcalDigiLabel_

edm::InputTag HcalQLPlotAnal::hcalDigiLabel_
private

Definition at line 50 of file HcalQLPlotAnal.cc.

Referenced by HcalQLPlotAnal().

◆ tok_calib_

edm::EDGetTokenT<HcalCalibDigiCollection> HcalQLPlotAnal::tok_calib_
private

Definition at line 57 of file HcalQLPlotAnal.cc.

Referenced by analyze(), and HcalQLPlotAnal().

◆ tok_hbhe_

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

Definition at line 54 of file HcalQLPlotAnal.cc.

Referenced by analyze(), and HcalQLPlotAnal().

◆ tok_hbherec_

edm::EDGetTokenT<HBHERecHitCollection> HcalQLPlotAnal::tok_hbherec_
private

Definition at line 51 of file HcalQLPlotAnal.cc.

Referenced by analyze(), and HcalQLPlotAnal().

◆ tok_hf_

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

Definition at line 56 of file HcalQLPlotAnal.cc.

Referenced by analyze(), and HcalQLPlotAnal().

◆ tok_hfrec_

edm::EDGetTokenT<HFRecHitCollection> HcalQLPlotAnal::tok_hfrec_
private

Definition at line 53 of file HcalQLPlotAnal.cc.

Referenced by analyze(), and HcalQLPlotAnal().

◆ tok_ho_

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

Definition at line 55 of file HcalQLPlotAnal.cc.

Referenced by analyze(), and HcalQLPlotAnal().

◆ tok_horec_

edm::EDGetTokenT<HORecHitCollection> HcalQLPlotAnal::tok_horec_
private

Definition at line 52 of file HcalQLPlotAnal.cc.

Referenced by analyze(), and HcalQLPlotAnal().

◆ tok_tb_

edm::EDGetTokenT<HcalTBTriggerData> HcalQLPlotAnal::tok_tb_
private

Definition at line 58 of file HcalQLPlotAnal.cc.

Referenced by analyze(), and HcalQLPlotAnal().

HcalQLPlotAnal::tok_tb_
edm::EDGetTokenT< HcalTBTriggerData > tok_tb_
Definition: HcalQLPlotAnal.cc:58
HcalQLPlotAnal::algo_
HcalQLPlotAnalAlgos * algo_
Definition: HcalQLPlotAnal.cc:61
HcalQLPlotAnal::tok_hf_
edm::EDGetTokenT< HFDigiCollection > tok_hf_
Definition: HcalQLPlotAnal.cc:56
HcalQLPlotAnal::tok_horec_
edm::EDGetTokenT< HORecHitCollection > tok_horec_
Definition: HcalQLPlotAnal.cc:52
HcalQLPlotAnalAlgos::processDigi
void processDigi(const HBHEDigiCollection &hbhedigic)
Definition: HcalQLPlotAnalAlgos.cc:151
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
HcalQLPlotAnalAlgos::SetEventType
void SetEventType(const HcalTBTriggerData &trigd)
Definition: HcalQLPlotAnalAlgos.cc:55
HcalQLPlotAnalAlgos::end
void end(void)
Definition: HcalQLPlotAnalAlgos.cc:53
edm::Handle
Definition: AssociativeIterator.h:50
HcalQLPlotAnal::hcalDigiLabel_
edm::InputTag hcalDigiLabel_
Definition: HcalQLPlotAnal.cc:50
HcalQLPlotAnal::tok_ho_
edm::EDGetTokenT< HODigiCollection > tok_ho_
Definition: HcalQLPlotAnal.cc:55
HcalQLPlotAnalAlgos
Definition: HcalQLPlotAnalAlgos.h:17
HcalQLPlotAnal::tok_hbhe_
edm::EDGetTokenT< HBHEDigiCollection > tok_hbhe_
Definition: HcalQLPlotAnal.cc:54
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::LogWarning
Definition: MessageLogger.h:141
edm::ParameterSet
Definition: ParameterSet.h:36
edm::LogError
Definition: MessageLogger.h:183
HcalQLPlotAnal::calibFC2GeV_
double calibFC2GeV_
Definition: HcalQLPlotAnal.cc:60
iEvent
int iEvent
Definition: GenABIO.cc:224
HcalQLPlotAnal::tok_hfrec_
edm::EDGetTokenT< HFRecHitCollection > tok_hfrec_
Definition: HcalQLPlotAnal.cc:53
ClusterTask_cfi.trig
trig
Definition: ClusterTask_cfi.py:336
HcalQLPlotAnal::tok_hbherec_
edm::EDGetTokenT< HBHERecHitCollection > tok_hbherec_
Definition: HcalQLPlotAnal.cc:51
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
HcalQLPlotAnal::tok_calib_
edm::EDGetTokenT< HcalCalibDigiCollection > tok_calib_
Definition: HcalQLPlotAnal.cc:57
HcalQLPlotAnal::doCalib_
bool doCalib_
Definition: HcalQLPlotAnal.cc:59
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
edm::InputTag
Definition: InputTag.h:15
HcalQLPlotAnalAlgos::processRH
void processRH(const HBHERecHitCollection &hbherhc, const HBHEDigiCollection &hbhedgc)
Definition: HcalQLPlotAnalAlgos.cc:73