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::one::EDAnalyzer<> edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

 HcalQLPlotAnal (const edm::ParameterSet &)
 
 ~HcalQLPlotAnal () override=default
 
- Public Member Functions inherited from edm::one::EDAnalyzer<>
 EDAnalyzer ()=default
 
 EDAnalyzer (const EDAnalyzer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
const EDAnalyzeroperator= (const EDAnalyzer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDAnalyzerBase () 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 const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESResolverIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESResolverIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (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::array< std::vector< ModuleDescription const *> *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, 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
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProductResolverIndices 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::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
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)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
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)
 
void resetItemsToGetFrom (BranchType iType)
 

Detailed Description

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

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

Definition at line 39 of file HcalQLPlotAnal.cc.

Constructor & Destructor Documentation

◆ HcalQLPlotAnal()

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

Definition at line 74 of file HcalQLPlotAnal.cc.

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

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

◆ ~HcalQLPlotAnal()

HcalQLPlotAnal::~HcalQLPlotAnal ( )
overridedefault

Member Function Documentation

◆ analyze()

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

Implements edm::one::EDAnalyzerBase.

Definition at line 96 of file HcalQLPlotAnal.cc.

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.

96  {
97  // Step A/C: Get Inputs and process (repeatedly)
99  iEvent.getByToken(tok_tb_, trig);
100  if (!trig.isValid()) {
101  edm::LogError("HcalQLPlotAnal::analyze") << "No Trigger Data found, skip event";
102  return;
103  } else {
105  }
107  iEvent.getByToken(tok_hbhe_, hbhedg);
108  if (!hbhedg.isValid()) {
109  edm::LogWarning("HcalQLPlotAnal::analyze") << "One of HBHE Digis/RecHits not found";
110  } else {
111  algo_->processDigi(*hbhedg);
112  }
114  iEvent.getByToken(tok_hbherec_, hbherh);
115  if (!hbherh.isValid()) {
116  edm::LogWarning("HcalQLPlotAnal::analyze") << "One of HBHE Digis/RecHits not found";
117  } else {
118  algo_->processRH(*hbherh, *hbhedg);
119  }
120 
122  iEvent.getByToken(tok_ho_, hodg);
123  if (!hodg.isValid()) {
124  // can't find it!
125  edm::LogWarning("HcalQLPlotAnal::analyze") << "One of HO Digis/RecHits not found";
126  } else {
127  algo_->processDigi(*hodg);
128  }
130  iEvent.getByToken(tok_horec_, horh);
131  if (!horh.isValid()) {
132  // can't find it!
133  edm::LogWarning("HcalQLPlotAnal::analyze") << "One of HO Digis/RecHits not found";
134  } else {
135  algo_->processRH(*horh, *hodg);
136  }
137 
139  iEvent.getByToken(tok_hf_, hfdg);
140 
141  if (!hfdg.isValid()) {
142  // can't find it!
143  edm::LogWarning("HcalQLPlotAnal::analyze") << "One of HF Digis/RecHits not found";
144  } else {
145  algo_->processDigi(*hfdg);
146  }
147 
149  iEvent.getByToken(tok_hfrec_, hfrh);
150  if (!hfrh.isValid()) {
151  // can't find it!
152  edm::LogWarning("HcalQLPlotAnal::analyze") << "One of HF Digis/RecHits not found";
153  } else {
154  algo_->processRH(*hfrh, *hfdg);
155  }
156 
157  if (doCalib_) {
158  // No rechits as of yet...
160  iEvent.getByToken(tok_calib_, calibdg);
161  if (!calibdg.isValid()) {
162  edm::LogWarning("HcalQLPlotAnal::analyze") << "Hcal Calib Digis not found";
163  } else {
164  algo_->processDigi(*calibdg, calibFC2GeV_);
165  }
166  }
167 }
edm::EDGetTokenT< HcalCalibDigiCollection > tok_calib_
edm::EDGetTokenT< HBHERecHitCollection > tok_hbherec_
void processDigi(const HBHEDigiCollection &hbhedigic)
Log< level::Error, false > LogError
edm::EDGetTokenT< HBHEDigiCollection > tok_hbhe_
edm::EDGetTokenT< HFDigiCollection > tok_hf_
edm::EDGetTokenT< HORecHitCollection > tok_horec_
int iEvent
Definition: GenABIO.cc:224
void processRH(const HBHERecHitCollection &hbherhc, const HBHEDigiCollection &hbhedgc)
edm::EDGetTokenT< HcalTBTriggerData > tok_tb_
void SetEventType(const HcalTBTriggerData &trigd)
edm::EDGetTokenT< HFRecHitCollection > tok_hfrec_
edm::EDGetTokenT< HODigiCollection > tok_ho_
bool isValid() const
Definition: HandleBase.h:70
Log< level::Warning, false > LogWarning
HcalQLPlotAnalAlgos * algo_

◆ endJob()

void HcalQLPlotAnal::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 170 of file HcalQLPlotAnal.cc.

References algo_, and HcalQLPlotAnalAlgos::end().

170 { algo_->end(); }
HcalQLPlotAnalAlgos * algo_

Member Data Documentation

◆ algo_

HcalQLPlotAnalAlgos* HcalQLPlotAnal::algo_
private

Definition at line 60 of file HcalQLPlotAnal.cc.

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

◆ calibFC2GeV_

double HcalQLPlotAnal::calibFC2GeV_
private

Definition at line 59 of file HcalQLPlotAnal.cc.

Referenced by analyze().

◆ doCalib_

bool HcalQLPlotAnal::doCalib_
private

Definition at line 58 of file HcalQLPlotAnal.cc.

Referenced by analyze().

◆ hcalDigiLabel_

edm::InputTag HcalQLPlotAnal::hcalDigiLabel_
private

Definition at line 49 of file HcalQLPlotAnal.cc.

Referenced by HcalQLPlotAnal().

◆ tok_calib_

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

Definition at line 56 of file HcalQLPlotAnal.cc.

Referenced by analyze(), and HcalQLPlotAnal().

◆ tok_hbhe_

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

Definition at line 53 of file HcalQLPlotAnal.cc.

Referenced by analyze(), and HcalQLPlotAnal().

◆ tok_hbherec_

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

Definition at line 50 of file HcalQLPlotAnal.cc.

Referenced by analyze(), and HcalQLPlotAnal().

◆ tok_hf_

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

Definition at line 55 of file HcalQLPlotAnal.cc.

Referenced by analyze(), and HcalQLPlotAnal().

◆ tok_hfrec_

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

Definition at line 52 of file HcalQLPlotAnal.cc.

Referenced by analyze(), and HcalQLPlotAnal().

◆ tok_ho_

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

Definition at line 54 of file HcalQLPlotAnal.cc.

Referenced by analyze(), and HcalQLPlotAnal().

◆ tok_horec_

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

Definition at line 51 of file HcalQLPlotAnal.cc.

Referenced by analyze(), and HcalQLPlotAnal().

◆ tok_tb_

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

Definition at line 57 of file HcalQLPlotAnal.cc.

Referenced by analyze(), and HcalQLPlotAnal().