CMS 3D CMS Logo

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 (edm::ParameterSet const &iConfig)
 
 DQMEDHarvester ()
 
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
 
 EDProducer (const EDProducer &)=delete
 
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
 
const EDProduceroperator= (const EDProducer &)=delete
 
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 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)
 

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<Transition Tr = Transition::Event>
auto produces (std::string instanceName) noexcept
 declare what type of product will make and with which optional label More...
 
template<Transition B>
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)
 
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 ()
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
template<Transition Tr = Transition::Event>
auto produces () noexcept
 
ProducesCollector producesCollector ()
 
- 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)
 

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
template<typename T >
using BranchAliasSetterT = ProductRegistryHelper::BranchAliasSetterT< T >
 
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 12 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")) {}
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
std::string monitorDir_
std::vector< std::string > clusterVars_
std::vector< unsigned > clusterNBin_
std::vector< double > clusterMaxBin_
std::vector< std::string > chambers_
std::vector< double > clusterMinBin_

◆ ~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.

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

Referenced by dqmEndJob(), and dqmEndLuminosityBlock().

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 }
std::map< uint32_t, std::map< std::string, MonitorElement * > > chamberHistos_
std::string monitorDir_
std::vector< std::string > clusterVars_
std::vector< unsigned > clusterNBin_
std::vector< double > clusterMaxBin_
std::vector< std::string > chambers_
std::vector< double > clusterMinBin_
key
prepare the HTCondor submission files and eventually submit them

◆ dqmEndJob()

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

Implements DQMEDHarvester.

Definition at line 34 of file L1TdeGEMTPGClient.cc.

References book(), and processHistograms().

34  {
35  book(ibooker);
36  processHistograms(igetter);
37 }
void book(DQMStore::IBooker &ibooker)
void processHistograms(DQMStore::IGetter &)

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

References book(), and processHistograms().

28  {
29  book(ibooker);
30  processHistograms(igetter);
31 }
void book(DQMStore::IBooker &ibooker)
void processHistograms(DQMStore::IGetter &)

◆ processHistograms()

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

Definition at line 58 of file L1TdeGEMTPGClient.cc.

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

Referenced by dqmEndJob(), and dqmEndLuminosityBlock().

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 }
std::map< uint32_t, std::map< std::string, MonitorElement * > > chamberHistos_
std::string monitorDir_
std::vector< std::string > clusterVars_
std::vector< std::string > chambers_
key
prepare the HTCondor submission files and eventually submit them
virtual TH1F * getTH1F() const
virtual MonitorElement * get(std::string const &fullpath) const
Definition: DQMStore.cc:712

Member Data Documentation

◆ chamberHistos_

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

Definition at line 42 of file L1TdeGEMTPGClient.h.

Referenced by book(), and processHistograms().

◆ chambers_

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

Definition at line 33 of file L1TdeGEMTPGClient.h.

Referenced by book(), and processHistograms().

◆ clusterMaxBin_

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

Definition at line 38 of file L1TdeGEMTPGClient.h.

Referenced by book().

◆ clusterMinBin_

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

Definition at line 37 of file L1TdeGEMTPGClient.h.

Referenced by book().

◆ clusterNBin_

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

Definition at line 36 of file L1TdeGEMTPGClient.h.

Referenced by book().

◆ clusterVars_

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

Definition at line 35 of file L1TdeGEMTPGClient.h.

Referenced by book(), and processHistograms().

◆ monitorDir_

std::string L1TdeGEMTPGClient::monitorDir_
private

Definition at line 31 of file L1TdeGEMTPGClient.h.

Referenced by book(), and processHistograms().