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 &&)=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)
 

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

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 }

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

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

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 {
101  nbins = ps_binning_.nbins;
102  xmin = ps_binning_.xmin;
103  xmax = ps_binning_.xmax;
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 }

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

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

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 }

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

◆ fillDescriptions()

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

Definition at line 138 of file PSMonitor.cc.

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<edm::ParameterSetDescription>("psColumnPSet", psColumnPSet);
148 
152 
153  desc.add<edm::ParameterSetDescription>("histoPSet", histoPSet);
154 
155  descriptions.add("psMonitoring", desc);
156 }

References edm::ConfigurationDescriptions::add(), submitPVResolutionJobs::desc, fillHistoPSetDescription(), LumiMonitor_cff::histoPSet, HLT_FULL_cff::InputTag, LumiMonitor_cff::lsPSet, and AlCaHLTBitMon_QueryRunRegistry::string.

◆ fillHistoPSetDescription()

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

Definition at line 134 of file PSMonitor.cc.

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

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

Referenced by fillDescriptions().

◆ getHistoPSet()

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

Definition at line 76 of file PSMonitor.cc.

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

References muonDTDigis_cfi::pset.

Referenced by PSMonitor().

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().

SummaryClient_cfi.labels
labels
Definition: SummaryClient_cfi.py:61
eostools.ls
def ls(path, rec=False)
Definition: eostools.py:349
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89281
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
BXVector::isEmpty
bool isEmpty(int bx) const
edm::Handle
Definition: AssociativeIterator.h:50
edm::Service::isAvailable
bool isAvailable() const
Definition: Service.h:40
PSMonitor::getHistoPSet
void getHistoPSet(edm::ParameterSet &pset, MEbinning &mebinning)
Definition: PSMonitor.cc:76
config
Definition: config.py:1
LumiMonitor_cff.lsPSet
lsPSet
Definition: LumiMonitor_cff.py:33
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
LaserClient_cfi.nbins
nbins
Definition: LaserClient_cfi.py:51
PSMonitor::ls_binning_
MEbinning ls_binning_
Definition: PSMonitor.cc:58
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet
Definition: ParameterSet.h:47
HLT_Fake2_cff.psColumn
psColumn
Definition: HLT_Fake2_cff.py:185
edm::service::PrescaleService::getLvl1Labels
const VString_t & getLvl1Labels() const
Definition: PrescaleService.h:39
BXVector::at
const T & at(int bx, unsigned i) const
edm::Service
Definition: Service.h:30
LumiMonitor_cff.histoPSet
histoPSet
Definition: LumiMonitor_cff.py:12
histograms
Definition: histograms.py:1
PSMonitor::fillHistoPSetDescription
static void fillHistoPSetDescription(edm::ParameterSetDescription &pset, int value)
Definition: PSMonitor.cc:134
cmsLHEtoEOSManager.l
l
Definition: cmsLHEtoEOSManager.py:204
newFWLiteAna.bin
bin
Definition: newFWLiteAna.py:161
PSMonitor::folderName_
std::string folderName_
Definition: PSMonitor.cc:53
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
PSMonitor::ps_binning_
MEbinning ps_binning_
Definition: PSMonitor.cc:57
TrackerOfflineValidation_Dqm_cff.xmax
xmax
Definition: TrackerOfflineValidation_Dqm_cff.py:11
relativeConstraints.value
value
Definition: relativeConstraints.py:53
dqm::implementation::IBooker::book2D
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:177
TrackerOfflineValidation_Dqm_cff.xmin
xmin
Definition: TrackerOfflineValidation_Dqm_cff.py:10
hlt_dqm_clientPB-live_cfg.me
me
Definition: hlt_dqm_clientPB-live_cfg.py:61
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
edm::InputTag
Definition: InputTag.h:15
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
PSMonitor::ugtBXToken_
edm::EDGetTokenT< GlobalAlgBlkBxCollection > ugtBXToken_
Definition: PSMonitor.cc:55