CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
List of all members | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
L1TdeGEMTPGClient Class Reference

#include <L1TdeGEMTPGClient.h>

Inheritance diagram for L1TdeGEMTPGClient:
DQMEDHarvester edm::one::EDProducer< edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::EndProcessBlockProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns, edm::one::SharedResources, edm::Accumulator > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 L1TdeGEMTPGClient (const edm::ParameterSet &ps)
 Constructor. More...
 
 ~L1TdeGEMTPGClient () override
 Destructor. More...
 
- Public Member Functions inherited from DQMEDHarvester
void accumulate (edm::Event const &ev, edm::EventSetup const &es) final
 
void beginJob () override
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &) override
 
virtual void dqmAnalyze (DQMStore::IBooker &, DQMStore::IGetter &, edm::Event const &, edm::EventSetup const &)
 
 DQMEDHarvester ()
 
 DQMEDHarvester (edm::ParameterSet const &iConfig)
 
virtual void dqmEndRun (DQMStore::IBooker &, DQMStore::IGetter &, edm::Run const &, edm::EventSetup const &)
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
void endLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &es) final
 
void endProcessBlockProduce (edm::ProcessBlock &) final
 
void endRun (edm::Run const &, edm::EventSetup const &) override
 
void endRunProduce (edm::Run &run, edm::EventSetup const &es) final
 
 ~DQMEDHarvester () override=default
 
- Public Member Functions inherited from edm::one::EDProducer< edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::EndProcessBlockProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns, edm::one::SharedResources, edm::Accumulator >
 EDProducer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () 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
 
std::vector< bool > const & recordProvenanceList () 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)
 
TypeLabelList const & typeLabelList () const
 used by the fwk to register the list of products of this module More...
 
 ~ProducerBase () noexcept(false) 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
 
std::vector< ESProxyIndex > 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
 
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)
 

Protected Member Functions

void dqmEndJob (DQMStore::IBooker &, DQMStore::IGetter &) override
 
void dqmEndLuminosityBlock (DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &) override
 
- Protected Member Functions inherited from edm::ProducerBase
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 declare what type of product will make and with which optional label More...
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<BranchType B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<Transition B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
ProducesCollector producesCollector ()
 
- 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 = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
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<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
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)
 

Private Member Functions

void book (DQMStore::IBooker &ibooker)
 
void processHistograms (DQMStore::IGetter &)
 

Private Attributes

std::map< uint32_t, std::map< std::string, MonitorElement * > > chamberHistos_
 
std::vector< std::string > chambers_
 
std::vector< double > clusterMaxBin_
 
std::vector< double > clusterMinBin_
 
std::vector< unsigned > clusterNBin_
 
std::vector< std::string > clusterVars_
 
std::string monitorDir_
 

Additional Inherited Members

- Public Types inherited from DQMEDHarvester
typedef dqm::harvesting::DQMStore DQMStore
 
typedef dqm::harvesting::MonitorElement MonitorElement
 
- Public Types inherited from edm::one::EDProducerBase
typedef EDProducerBase 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::one::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Attributes inherited from DQMEDHarvester
DQMStoredqmstore_
 
edm::GetterOfProducts< DQMTokenjobmegetter_
 
edm::EDPutTokenT< DQMTokenjobToken_
 
edm::GetterOfProducts< DQMTokenlumimegetter_
 
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::GetterOfProducts< DQMTokenrunmegetter_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Definition at line 13 of file L1TdeGEMTPGClient.h.

Constructor & Destructor Documentation

◆ L1TdeGEMTPGClient()

L1TdeGEMTPGClient::L1TdeGEMTPGClient ( const edm::ParameterSet ps)

Constructor.

Definition at line 13 of file L1TdeGEMTPGClient.cc.

14  : monitorDir_(ps.getParameter<string>("monitorDir")),
15  chambers_(ps.getParameter<std::vector<std::string>>("chambers")),
16  // variables
17  clusterVars_(ps.getParameter<std::vector<std::string>>("clusterVars")),
18  // binning
19  clusterNBin_(ps.getParameter<std::vector<unsigned>>("clusterNBin")),
20  clusterMinBin_(ps.getParameter<std::vector<double>>("clusterMinBin")),
21  clusterMaxBin_(ps.getParameter<std::vector<double>>("clusterMaxBin")) {}

◆ ~L1TdeGEMTPGClient()

L1TdeGEMTPGClient::~L1TdeGEMTPGClient ( )
override

Destructor.

Definition at line 23 of file L1TdeGEMTPGClient.cc.

23 {}

Member Function Documentation

◆ book()

void L1TdeGEMTPGClient::book ( DQMStore::IBooker ibooker)
private

Definition at line 39 of file L1TdeGEMTPGClient.cc.

39  {
40  iBooker.setCurrentFolder(monitorDir_);
41 
42  // chamber type
43  for (unsigned iType = 0; iType < chambers_.size(); iType++) {
44  // cluster variable
45  for (unsigned iVar = 0; iVar < clusterVars_.size(); iVar++) {
46  const std::string key("cluster_" + clusterVars_[iVar] + "_diff");
47  const std::string histName(key + "_" + chambers_[iType]);
48  const std::string histTitle(chambers_[iType] + " Cluster " + clusterVars_[iVar] + " (Emul - Data)");
49  if (chamberHistos_[iType][key] == nullptr)
50  chamberHistos_[iType][key] =
51  iBooker.book1D(histName, histTitle, clusterNBin_[iVar], clusterMinBin_[iVar], clusterMaxBin_[iVar]);
52  else
53  chamberHistos_[iType][key]->Reset();
54  }
55  }
56 }

References dqm::implementation::IBooker::book1D(), chamberHistos_, chambers_, clusterMaxBin_, clusterMinBin_, clusterNBin_, clusterVars_, B2GTnPMonitor_cfi::histTitle, crabWrapper::key, monitorDir_, dqm::implementation::NavigatorBase::setCurrentFolder(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by dqmEndJob(), and dqmEndLuminosityBlock().

◆ dqmEndJob()

void L1TdeGEMTPGClient::dqmEndJob ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter 
)
overrideprotectedvirtual

Implements DQMEDHarvester.

Definition at line 34 of file L1TdeGEMTPGClient.cc.

34  {
35  book(ibooker);
36  processHistograms(igetter);
37 }

References book(), and processHistograms().

◆ dqmEndLuminosityBlock()

void L1TdeGEMTPGClient::dqmEndLuminosityBlock ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter,
edm::LuminosityBlock const &  lumiSeg,
edm::EventSetup const &  c 
)
overrideprotectedvirtual

Reimplemented from DQMEDHarvester.

Definition at line 25 of file L1TdeGEMTPGClient.cc.

28  {
29  book(ibooker);
30  processHistograms(igetter);
31 }

References book(), and processHistograms().

◆ processHistograms()

void L1TdeGEMTPGClient::processHistograms ( DQMStore::IGetter igetter)
private

Definition at line 58 of file L1TdeGEMTPGClient.cc.

58  {
59  MonitorElement *dataMon;
60  MonitorElement *emulMon;
61 
62  // chamber type
63  for (unsigned iType = 0; iType < chambers_.size(); iType++) {
64  // cluster variable
65  for (unsigned iVar = 0; iVar < clusterVars_.size(); iVar++) {
66  const std::string key("cluster_" + clusterVars_[iVar]);
67  const std::string histData(key + "_data_" + chambers_[iType]);
68  const std::string histEmul(key + "_emul_" + chambers_[iType]);
69 
70  dataMon = igetter.get(monitorDir_ + "/" + histData);
71  emulMon = igetter.get(monitorDir_ + "/" + histEmul);
72 
73  TH1F *hDiff = chamberHistos_[iType][key + "_diff"]->getTH1F();
74 
75  if (dataMon && emulMon) {
76  TH1F *dataHist = dataMon->getTH1F();
77  TH1F *emulHist = emulMon->getTH1F();
78  hDiff->Add(emulHist, dataHist, 1, -1);
79  }
80  }
81  }
82 }

References chamberHistos_, chambers_, clusterVars_, dqm::implementation::IGetter::get(), dqm::legacy::MonitorElement::getTH1F(), crabWrapper::key, monitorDir_, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by dqmEndJob(), and dqmEndLuminosityBlock().

Member Data Documentation

◆ chamberHistos_

std::map<uint32_t, std::map<std::string, MonitorElement *> > L1TdeGEMTPGClient::chamberHistos_
private

Definition at line 43 of file L1TdeGEMTPGClient.h.

Referenced by book(), and processHistograms().

◆ chambers_

std::vector<std::string> L1TdeGEMTPGClient::chambers_
private

Definition at line 34 of file L1TdeGEMTPGClient.h.

Referenced by book(), and processHistograms().

◆ clusterMaxBin_

std::vector<double> L1TdeGEMTPGClient::clusterMaxBin_
private

Definition at line 39 of file L1TdeGEMTPGClient.h.

Referenced by book().

◆ clusterMinBin_

std::vector<double> L1TdeGEMTPGClient::clusterMinBin_
private

Definition at line 38 of file L1TdeGEMTPGClient.h.

Referenced by book().

◆ clusterNBin_

std::vector<unsigned> L1TdeGEMTPGClient::clusterNBin_
private

Definition at line 37 of file L1TdeGEMTPGClient.h.

Referenced by book().

◆ clusterVars_

std::vector<std::string> L1TdeGEMTPGClient::clusterVars_
private

Definition at line 36 of file L1TdeGEMTPGClient.h.

Referenced by book(), and processHistograms().

◆ monitorDir_

std::string L1TdeGEMTPGClient::monitorDir_
private

Definition at line 32 of file L1TdeGEMTPGClient.h.

Referenced by book(), and processHistograms().

L1TdeGEMTPGClient::clusterNBin_
std::vector< unsigned > clusterNBin_
Definition: L1TdeGEMTPGClient.h:37
L1TdeGEMTPGClient::chamberHistos_
std::map< uint32_t, std::map< std::string, MonitorElement * > > chamberHistos_
Definition: L1TdeGEMTPGClient.h:43
dqm::legacy::MonitorElement
Definition: MonitorElement.h:462
L1TdeGEMTPGClient::clusterMaxBin_
std::vector< double > clusterMaxBin_
Definition: L1TdeGEMTPGClient.h:39
L1TdeGEMTPGClient::monitorDir_
std::string monitorDir_
Definition: L1TdeGEMTPGClient.h:32
L1TdeGEMTPGClient::clusterVars_
std::vector< std::string > clusterVars_
Definition: L1TdeGEMTPGClient.h:36
dqm::legacy::MonitorElement::getTH1F
virtual TH1F * getTH1F() const
Definition: MonitorElement.h:479
L1TdeGEMTPGClient::chambers_
std::vector< std::string > chambers_
Definition: L1TdeGEMTPGClient.h:34
L1TdeGEMTPGClient::book
void book(DQMStore::IBooker &ibooker)
Definition: L1TdeGEMTPGClient.cc:39
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
L1TdeGEMTPGClient::clusterMinBin_
std::vector< double > clusterMinBin_
Definition: L1TdeGEMTPGClient.h:38
B2GTnPMonitor_cfi.histTitle
histTitle
Definition: B2GTnPMonitor_cfi.py:112
L1TdeGEMTPGClient::processHistograms
void processHistograms(DQMStore::IGetter &)
Definition: L1TdeGEMTPGClient.cc:58
dqm::implementation::IGetter::get
virtual MonitorElement * get(std::string const &fullpath) const
Definition: DQMStore.cc:651
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
crabWrapper.key
key
Definition: crabWrapper.py:19