CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
PSMonitor Class Reference
Inheritance diagram for PSMonitor:
DQMGlobalEDAnalyzer< Histograms > DQMGlobalEDAnalyzerBase< Histograms, Args... > edm::global::EDProducer< edm::RunCache< Histograms >, edm::EndRunProducer, edm::Accumulator, Args... > edm::global::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 PSMonitor (const edm::ParameterSet &)
 
 ~PSMonitor () override=default
 
- Public Member Functions inherited from DQMGlobalEDAnalyzer< Histograms >
virtual void dqmEndRun (edm::Run const &, edm::EventSetup const &, Histograms const &) const
 
void globalEndRunProduce (edm::Run &run, edm::EventSetup const &setup) const final
 
- Public Member Functions inherited from DQMGlobalEDAnalyzerBase< Histograms, Args... >
void accumulate (edm::StreamID id, edm::Event const &event, edm::EventSetup const &setup) const final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &, Histograms &) const
 
 DQMGlobalEDAnalyzerBase ()
 
std::shared_ptr< HistogramsglobalBeginRun (edm::Run const &run, edm::EventSetup const &setup) const final
 
void globalEndRun (edm::Run const &, edm::EventSetup const &) const final
 
- Public Member Functions inherited from edm::global::EDProducer< edm::RunCache< Histograms >, edm::EndRunProducer, edm::Accumulator, Args... >
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
EDProduceroperator= (const EDProducer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
bool wantsStreamLuminosityBlocks () const final
 
bool wantsStreamRuns () const final
 
- Public Member Functions inherited from edm::global::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
 
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)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
static void fillHistoPSetDescription (edm::ParameterSetDescription &pset, int value)
 
- Static Public Member Functions inherited from edm::global::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Protected Member Functions

void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &, Histograms &) const override
 
void dqmAnalyze (edm::Event const &event, edm::EventSetup const &setup, Histograms const &) const override
 
- Protected Member Functions inherited from DQMGlobalEDAnalyzerBase< Histograms, Args... >
uint64_t meId (edm::Run const &run) const
 
- 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 getHistoPSet (edm::ParameterSet &pset, MEbinning &mebinning)
 

Private Attributes

std::string folderName_
 
MEbinning ls_binning_
 
MEbinning ps_binning_
 
edm::EDGetTokenT< GlobalAlgBlkBxCollectionugtBXToken_
 

Additional Inherited Members

- Public Types inherited from DQMGlobalEDAnalyzerBase< Histograms, Args... >
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::global::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
 
- Protected Attributes inherited from DQMGlobalEDAnalyzerBase< Histograms, Args... >
DQMStoredqmstore_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Definition at line 39 of file PSMonitor.cc.

Constructor & Destructor Documentation

◆ PSMonitor()

PSMonitor::PSMonitor ( const edm::ParameterSet config)

Definition at line 65 of file PSMonitor.cc.

References getHistoPSet(), V0Monitor_cff::histoPSet, ls_binning_, V0Monitor_cfi::lsPSet, and ps_binning_.

66  : folderName_(config.getParameter<std::string>("folderName")),
67  ugtBXToken_(consumes<GlobalAlgBlkBxCollection>(config.getParameter<edm::InputTag>("ugtBXInputTag"))) {
68  edm::ParameterSet histoPSet = config.getParameter<edm::ParameterSet>("histoPSet");
69  edm::ParameterSet psColumnPSet = histoPSet.getParameter<edm::ParameterSet>("psColumnPSet");
70  edm::ParameterSet lsPSet = histoPSet.getParameter<edm::ParameterSet>("lsPSet");
71 
72  getHistoPSet(psColumnPSet, ps_binning_);
74 }
std::string folderName_
Definition: PSMonitor.cc:53
edm::EDGetTokenT< GlobalAlgBlkBxCollection > ugtBXToken_
Definition: PSMonitor.cc:55
Definition: config.py:1
void getHistoPSet(edm::ParameterSet &pset, MEbinning &mebinning)
Definition: PSMonitor.cc:76
MEbinning ps_binning_
Definition: PSMonitor.cc:57
MEbinning ls_binning_
Definition: PSMonitor.cc:58

◆ ~PSMonitor()

PSMonitor::~PSMonitor ( )
overridedefault

Member Function Documentation

◆ bookHistograms()

void PSMonitor::bookHistograms ( DQMStore::IBooker booker,
edm::Run const &  run,
edm::EventSetup const &  setup,
Histograms histograms 
) const
overrideprotectedvirtual

Implements DQMGlobalEDAnalyzerBase< Histograms, Args... >.

Definition at line 82 of file PSMonitor.cc.

References newFWLiteAna::bin, dqm::implementation::IBooker::book2D(), folderName_, edm::service::PrescaleService::getLvl1Labels(), edm::Service< T >::isAvailable(), MainPageGenerator::l, SummaryClient_cfi::labels, ls_binning_, hlt_dqm_clientPB-live_cfg::me, LaserClient_cfi::nbins, MEbinning::nbins, ps_binning_, dqm::implementation::NavigatorBase::setCurrentFolder(), AlCaHLTBitMon_QueryRunRegistry::string, TrackerOfflineValidation_Dqm_cff::xmax, MEbinning::xmax, TrackerOfflineValidation_Dqm_cff::xmin, and MEbinning::xmin.

85  {
86  std::string histname, histtitle;
87 
88  std::string currentFolder = folderName_;
89  booker.setCurrentFolder(currentFolder);
90 
91  int nbins;
92  double xmin, xmax;
93  std::vector<std::string> labels;
95  if (prescaleService.isAvailable() and not prescaleService->getLvl1Labels().empty()) {
96  labels = prescaleService->getLvl1Labels();
97  nbins = labels.size();
98  xmin = 0.;
99  xmax = double(labels.size());
100  } else {
104  labels.resize(nbins, "");
105  }
106 
107  histname = "psColumnIndexVsLS";
108  histtitle = "PS column index vs LS";
109  auto me =
110  booker.book2D(histname, histtitle, ls_binning_.nbins, ls_binning_.xmin, ls_binning_.xmax, nbins, xmin, xmax);
111  me->setAxisTitle("LS", 1);
112  me->setAxisTitle("PS column index", 2);
113  histograms.psColumnIndexVsLS = me;
114 
115  int bin = 1;
116  for (auto const& l : labels) {
117  histograms.psColumnIndexVsLS->setBinLabel(bin, l, 2);
118  bin++;
119  }
120 }
std::string folderName_
Definition: PSMonitor.cc:53
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:36
MEbinning ps_binning_
Definition: PSMonitor.cc:57
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:221
const VString_t & getLvl1Labels() const
bool isAvailable() const
Definition: Service.h:40
MEbinning ls_binning_
Definition: PSMonitor.cc:58

◆ dqmAnalyze()

void PSMonitor::dqmAnalyze ( edm::Event const &  event,
edm::EventSetup const &  setup,
Histograms const &  histograms 
) const
overrideprotectedvirtual

Implements DQMGlobalEDAnalyzerBase< Histograms, Args... >.

Definition at line 122 of file PSMonitor.cc.

References BXVector< T >::at(), BXVector< T >::isEmpty(), edm::HandleBase::isValid(), eostools::ls(), HLT_2024v14_cff::psColumn, and ugtBXToken_.

122  {
123  int ls = event.id().luminosityBlock();
124  int psColumn = -1;
125 
127  event.getByToken(ugtBXToken_, ugtBXhandle);
128  if (ugtBXhandle.isValid() and not ugtBXhandle->isEmpty(0)) {
129  psColumn = ugtBXhandle->at(0, 0).getPreScColumn();
130  }
131  histograms.psColumnIndexVsLS->Fill(ls, psColumn);
132 }
edm::EDGetTokenT< GlobalAlgBlkBxCollection > ugtBXToken_
Definition: PSMonitor.cc:55
bool isEmpty(int bx) const
const T & at(int bx, unsigned i) const
def ls(path, rec=False)
Definition: eostools.py:349
bool isValid() const
Definition: HandleBase.h:70

◆ fillDescriptions()

void PSMonitor::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 138 of file PSMonitor.cc.

References edm::ConfigurationDescriptions::add(), submitPVResolutionJobs::desc, fillHistoPSetDescription(), V0Monitor_cff::histoPSet, ProducerED_cfi::InputTag, V0Monitor_cfi::lsPSet, and AlCaHLTBitMon_QueryRunRegistry::string.

138  {
140  desc.add<edm::InputTag>("ugtBXInputTag", edm::InputTag("hltGtStage2Digis"));
141  desc.add<std::string>("folderName", "HLT/PSMonitoring");
142 
144 
145  edm::ParameterSetDescription psColumnPSet;
146  fillHistoPSetDescription(psColumnPSet, 8);
147  histoPSet.add("psColumnPSet", psColumnPSet);
148 
151  histoPSet.add("lsPSet", lsPSet);
152 
153  desc.add("histoPSet", histoPSet);
154 
155  descriptions.add("psMonitoring", desc);
156 }
void add(std::string const &label, ParameterSetDescription const &psetDescription)
static void fillHistoPSetDescription(edm::ParameterSetDescription &pset, int value)
Definition: PSMonitor.cc:134

◆ fillHistoPSetDescription()

void PSMonitor::fillHistoPSetDescription ( edm::ParameterSetDescription pset,
int  value 
)
static

Definition at line 134 of file PSMonitor.cc.

References muonDTDigis_cfi::pset, and relativeConstraints::value.

Referenced by fillDescriptions().

134  {
135  pset.add<int>("nbins", value);
136 }

◆ getHistoPSet()

void PSMonitor::getHistoPSet ( edm::ParameterSet pset,
MEbinning mebinning 
)
private

Definition at line 76 of file PSMonitor.cc.

References MEbinning::nbins, muonDTDigis_cfi::pset, MEbinning::xmax, and MEbinning::xmin.

Referenced by PSMonitor().

76  {
77  mebinning.nbins = pset.getParameter<int32_t>("nbins");
78  mebinning.xmin = 0.;
79  mebinning.xmax = double(pset.getParameter<int32_t>("nbins"));
80 }

Member Data Documentation

◆ folderName_

std::string PSMonitor::folderName_
private

Definition at line 53 of file PSMonitor.cc.

Referenced by bookHistograms().

◆ ls_binning_

MEbinning PSMonitor::ls_binning_
private

Definition at line 58 of file PSMonitor.cc.

Referenced by bookHistograms(), and PSMonitor().

◆ ps_binning_

MEbinning PSMonitor::ps_binning_
private

Definition at line 57 of file PSMonitor.cc.

Referenced by bookHistograms(), and PSMonitor().

◆ ugtBXToken_

edm::EDGetTokenT<GlobalAlgBlkBxCollection> PSMonitor::ugtBXToken_
private

Definition at line 55 of file PSMonitor.cc.

Referenced by dqmAnalyze().