CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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< T > 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 &, Histogramsconst &) 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< T >
 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
 
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)
 
 ~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
 
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
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, 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::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
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< B > consumes (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 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<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
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...
 
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
< GlobalAlgBlkBxCollection
ugtBXToken_
 

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 ( const edm::ParameterSet config)

Definition at line 65 of file PSMonitor.cc.

References getHistoPSet(), edm::ParameterSet::getParameter(), ls_binning_, DQMOffline_LumiMontiroring_cff::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");
71 
72  getHistoPSet(psColumnPSet, ps_binning_);
73  getHistoPSet(lsPSet, ls_binning_);
74 }
std::string folderName_
Definition: PSMonitor.cc:53
edm::EDGetTokenT< GlobalAlgBlkBxCollection > ugtBXToken_
Definition: PSMonitor.cc:55
void getHistoPSet(edm::ParameterSet &pset, MEbinning &mebinning)
Definition: PSMonitor.cc:76
MEbinning ps_binning_
Definition: PSMonitor.cc:57
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
MEbinning ls_binning_
Definition: PSMonitor.cc:58
PSMonitor::~PSMonitor ( )
overridedefault

Member Function Documentation

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(), cmsLHEtoEOSManager::l, HLT_FULL_cff::labels, ls_binning_, hlt_dqm_clientPB-live_cfg::me, hlt_dqm_clientPB-live_cfg::nbins, ps_binning_, dqm::implementation::NavigatorBase::setCurrentFolder(), AlCaHLTBitMon_QueryRunRegistry::string, hlt_dqm_clientPB-live_cfg::xmax, and hlt_dqm_clientPB-live_cfg::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 {
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 }
std::string folderName_
Definition: PSMonitor.cc:53
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
MEbinning ps_binning_
Definition: PSMonitor.cc:57
bool isAvailable() const
Definition: Service.h:40
const VString_t & getLvl1Labels() const
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
MEbinning ls_binning_
Definition: PSMonitor.cc:58
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 edm::HandleBase::isValid(), eostools::ls(), HLT_Fake2_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
def ls
Definition: eostools.py:349
bool isValid() const
Definition: HandleBase.h:70
void PSMonitor::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 138 of file PSMonitor.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), submitPVResolutionJobs::desc, fillHistoPSetDescription(), HLT_FULL_cff::InputTag, DQMOffline_LumiMontiroring_cff::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<edm::ParameterSetDescription>("psColumnPSet", psColumnPSet);
148 
150  fillHistoPSetDescription(lsPSet, 2500);
151  histoPSet.add<edm::ParameterSetDescription>("lsPSet", lsPSet);
152 
153  desc.add<edm::ParameterSetDescription>("histoPSet", histoPSet);
154 
155  descriptions.add("psMonitoring", desc);
156 }
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
static void fillHistoPSetDescription(edm::ParameterSetDescription &pset, int value)
Definition: PSMonitor.cc:134
void PSMonitor::fillHistoPSetDescription ( edm::ParameterSetDescription pset,
int  value 
)
static

Definition at line 134 of file PSMonitor.cc.

References edm::ParameterSetDescription::add(), and relativeConstraints::value.

Referenced by fillDescriptions().

134  {
135  pset.add<int>("nbins", value);
136 }
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void PSMonitor::getHistoPSet ( edm::ParameterSet pset,
MEbinning mebinning 
)
private

Definition at line 76 of file PSMonitor.cc.

References edm::ParameterSet::getParameter().

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 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303

Member Data Documentation

std::string PSMonitor::folderName_
private

Definition at line 53 of file PSMonitor.cc.

Referenced by bookHistograms().

MEbinning PSMonitor::ls_binning_
private

Definition at line 58 of file PSMonitor.cc.

Referenced by bookHistograms(), and PSMonitor().

MEbinning PSMonitor::ps_binning_
private

Definition at line 57 of file PSMonitor.cc.

Referenced by bookHistograms(), and PSMonitor().

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

Definition at line 55 of file PSMonitor.cc.

Referenced by dqmAnalyze().