CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes
DQMCorrelationClient Class Reference

#include <DQMCorrelationClient.h>

Inheritance diagram for DQMCorrelationClient:
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

 DQMCorrelationClient (const edm::ParameterSet &ps)
 
 ~DQMCorrelationClient () override=default
 
- 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
 
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 fillMePSetDescription (edm::ParameterSetDescription &pset)
 
static void fillOutputMePSetDescription (edm::ParameterSetDescription &pset)
 
- 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 Member Functions

void beginJob () override
 
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 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 ()
 
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

TH1 * getTH1 (MonitorElement *me, bool profileX)
 
void setAxisTitle (MonitorElement *meX, MonitorElement *meY)
 

Static Private Member Functions

static MEPSet getHistoPSet (edm::ParameterSet pset)
 
static OutputMEPSet getOutputHistoPSet (edm::ParameterSet pset)
 

Private Attributes

MonitorElementcorrelation_
 
bool me1onX_
 
OutputMEPSet mepset_
 
MEPSet meXpset_
 
MEPSet meYpset_
 

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
 
- 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 36 of file DQMCorrelationClient.h.

Constructor & Destructor Documentation

◆ DQMCorrelationClient()

DQMCorrelationClient::DQMCorrelationClient ( const edm::ParameterSet ps)

Definition at line 8 of file DQMCorrelationClient.cc.

References correlation_.

9  : me1onX_(iConfig.getParameter<bool>("me1onX")),
10  meXpset_(me1onX_ ? getHistoPSet(iConfig.getParameter<edm::ParameterSet>("me1"))
11  : getHistoPSet(iConfig.getParameter<edm::ParameterSet>("me2"))),
12  meYpset_(me1onX_ ? getHistoPSet(iConfig.getParameter<edm::ParameterSet>("me2"))
13  : getHistoPSet(iConfig.getParameter<edm::ParameterSet>("me1"))),
14  mepset_(getOutputHistoPSet(iConfig.getParameter<edm::ParameterSet>("me"))) {
15  edm::LogInfo("DQMCorrelationClient") << "Constructor DQMCorrelationClient::DQMCorrelationClient " << std::endl;
16 
17  correlation_ = nullptr;
18 }
MonitorElement * correlation_
static OutputMEPSet getOutputHistoPSet(edm::ParameterSet pset)
static MEPSet getHistoPSet(edm::ParameterSet pset)
Log< level::Info, false > LogInfo

◆ ~DQMCorrelationClient()

DQMCorrelationClient::~DQMCorrelationClient ( )
overridedefault

Member Function Documentation

◆ beginJob()

void DQMCorrelationClient::beginJob ( void  )
overrideprotectedvirtual

Reimplemented from edm::one::EDProducerBase.

Definition at line 46 of file DQMCorrelationClient.cc.

46  {
47  edm::LogInfo("DQMCorrelationClient") << "DQMCorrelationClient::beginJob " << std::endl;
48 }
Log< level::Info, false > LogInfo

◆ dqmEndJob()

void DQMCorrelationClient::dqmEndJob ( DQMStore::IBooker ibooker_,
DQMStore::IGetter igetter_ 
)
overrideprotectedvirtual

Implements DQMEDHarvester.

Definition at line 95 of file DQMCorrelationClient.cc.

References dqm::implementation::IBooker::book2D(), correlation_, OutputMEPSet::doXaxis, OutputMEPSet::doYaxis, dqm::impl::MonitorElement::Fill(), MEPSet::folder, OutputMEPSet::folder, dqm::implementation::IGetter::get(), dqm::impl::MonitorElement::getNbinsY(), getTH1(), dqm::legacy::MonitorElement::getTH1(), mps_fire::i, mepset_, meXpset_, meYpset_, MEPSet::name, OutputMEPSet::name, OutputMEPSet::nbinsX, hlt_dqm_clientPB-live_cfg::nbinsX, OutputMEPSet::nbinsY, hlt_dqm_clientPB-live_cfg::nbinsY, MEPSet::profileX, setAxisTitle(), dqm::implementation::NavigatorBase::setCurrentFolder(), findQualityFiles::size, AlCaHLTBitMon_QueryRunRegistry::string, x, OutputMEPSet::xmaxX, hlt_dqm_clientPB-live_cfg::xmaxX, OutputMEPSet::xmaxY, hlt_dqm_clientPB-live_cfg::xmaxY, OutputMEPSet::xminX, hlt_dqm_clientPB-live_cfg::xminX, OutputMEPSet::xminY, hlt_dqm_clientPB-live_cfg::xminY, and y.

95  {
96  std::string hname = "";
97 
98  //get available histograms
99  hname = meXpset_.folder + "/" + meXpset_.name;
100  MonitorElement* meX = igetter_.get(hname);
101  hname = meYpset_.folder + "/" + meYpset_.name;
102  MonitorElement* meY = igetter_.get(hname);
103 
104  if (!meX || !meY) {
105  edm::LogError("DQMCorrelationClient")
106  << "MEs not found! " << (!meX ? meXpset_.folder + "/" + meXpset_.name + " not found " : "")
107  << (!meY ? meYpset_.folder + "/" + meYpset_.name + " not found " : "") << std::endl;
108  return;
109  }
110 
111  // get range and binning for new MEs
112  int nbinsX = (mepset_.doXaxis ? mepset_.nbinsX : meX->getNbinsY());
113  double xminX = (mepset_.doXaxis ? mepset_.xminX : meX->getTH1()->GetYaxis()->GetXmin());
114  double xmaxX = (mepset_.doXaxis ? mepset_.xmaxX : meX->getTH1()->GetYaxis()->GetXmax());
115  int nbinsY = (mepset_.doYaxis ? mepset_.nbinsY : meY->getNbinsY());
116  double xminY = (mepset_.doYaxis ? mepset_.xminY : meY->getTH1()->GetYaxis()->GetXmin());
117  double xmaxY = (mepset_.doYaxis ? mepset_.xmaxY : meY->getTH1()->GetYaxis()->GetXmax());
118 
119  // create and cd into new folder
120  std::string currentFolder = mepset_.folder;
121  ibooker_.setCurrentFolder(currentFolder);
122 
123  //book new histogram
124  hname = mepset_.name;
125  correlation_ = ibooker_.book2D(hname, hname, nbinsX, xminX, xmaxX, nbinsY, xminY, xmaxY);
126  setAxisTitle(meX, meY);
127 
128  // handle mes
129  TH1* x = nullptr;
130  TH1* y = nullptr;
131  x = getTH1(meX, meXpset_.profileX);
132  y = getTH1(meY, meYpset_.profileX);
133 
134  size_t size = x->GetXaxis()->GetNbins();
135 
136  std::vector<double> xvalue;
137  std::vector<int> xbinvalue;
138  for (size_t ibin = 1; ibin <= size; ++ibin) {
139  // avoid to store points w/ no info
140  if (x->GetBinContent(ibin) == 0.)
141  continue;
142  xvalue.push_back(x->GetBinContent(ibin));
143  xbinvalue.push_back(x->GetXaxis()->GetBinCenter(ibin));
144  }
145 
146  for (size_t i = 0; i < xbinvalue.size(); ++i) {
147  int ybin = y->GetXaxis()->FindBin(xbinvalue[i]);
148  double yvalue = y->GetBinContent(ybin);
149  correlation_->Fill(xvalue[i], yvalue);
150  }
151 }
size
Write out results.
MonitorElement * correlation_
void setAxisTitle(MonitorElement *meX, MonitorElement *meY)
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:36
std::string folder
Log< level::Error, false > LogError
TH1 * getTH1(MonitorElement *me, bool profileX)
void Fill(long long x)
std::string folder
virtual int getNbinsY() const
get # of bins in Y-axis
std::string name
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:212
virtual MonitorElement * get(std::string const &fullpath) const
Definition: DQMStore.cc:690
virtual TH1 * getTH1() const

◆ dqmEndLuminosityBlock()

void DQMCorrelationClient::dqmEndLuminosityBlock ( DQMStore::IBooker ibooker_,
DQMStore::IGetter igetter_,
edm::LuminosityBlock const &  iLumi,
edm::EventSetup const &  iSetup 
)
overrideprotectedvirtual

Reimplemented from DQMEDHarvester.

Definition at line 156 of file DQMCorrelationClient.cc.

159  {
160  edm::LogInfo("DQMCorrelationClient") << "DQMCorrelationClient::endLumi " << std::endl;
161 }
Log< level::Info, false > LogInfo

◆ fillDescriptions()

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

Definition at line 183 of file DQMCorrelationClient.cc.

References edm::ConfigurationDescriptions::add(), submitPVResolutionJobs::desc, fillMePSetDescription(), and fillOutputMePSetDescription().

183  {
185  desc.add<bool>("me1onX", true);
186 
189  desc.add<edm::ParameterSetDescription>("me", mePSet);
190 
192  fillMePSetDescription(me1PSet);
193  desc.add<edm::ParameterSetDescription>("me1", me1PSet);
194 
196  fillMePSetDescription(me2PSet);
197  desc.add<edm::ParameterSetDescription>("me2", me2PSet);
198 
199  descriptions.add("dqmCorrelationClient", desc);
200 }
static void fillMePSetDescription(edm::ParameterSetDescription &pset)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
static void fillOutputMePSetDescription(edm::ParameterSetDescription &pset)

◆ fillMePSetDescription()

void DQMCorrelationClient::fillMePSetDescription ( edm::ParameterSetDescription pset)
static

Definition at line 163 of file DQMCorrelationClient.cc.

References muonDTDigis_cfi::pset, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by fillDescriptions().

163  {
164  pset.add<std::string>("folder", "");
165  pset.add<std::string>("name", "");
166  pset.add<bool>("profileX", true);
167 }

◆ fillOutputMePSetDescription()

void DQMCorrelationClient::fillOutputMePSetDescription ( edm::ParameterSetDescription pset)
static

Definition at line 169 of file DQMCorrelationClient.cc.

References muonDTDigis_cfi::pset, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by fillDescriptions().

169  {
170  // fillMePSetDescription(pset);
171  pset.add<std::string>("folder");
172  pset.add<std::string>("name");
173  pset.add<bool>("doXaxis", true);
174  pset.add<int>("nbinsX", 2500);
175  pset.add<double>("xminX", 0.);
176  pset.add<double>("xmaxX", 2500.);
177  pset.add<bool>("doYaxis", true);
178  pset.add<int>("nbinsY", 2500);
179  pset.add<double>("xminY", 0.);
180  pset.add<double>("xmaxY", 2500.);
181 }

◆ getHistoPSet()

MEPSet DQMCorrelationClient::getHistoPSet ( edm::ParameterSet  pset)
staticprivate

Definition at line 20 of file DQMCorrelationClient.cc.

References muonDTDigis_cfi::pset, and AlCaHLTBitMon_QueryRunRegistry::string.

20  {
21  return MEPSet{
22  pset.getParameter<std::string>("name"),
23  pset.getParameter<std::string>("folder"),
24  pset.getParameter<bool>("profileX"),
25  };
26 }

◆ getOutputHistoPSet()

OutputMEPSet DQMCorrelationClient::getOutputHistoPSet ( edm::ParameterSet  pset)
staticprivate

Definition at line 28 of file DQMCorrelationClient.cc.

References muonDTDigis_cfi::pset, and AlCaHLTBitMon_QueryRunRegistry::string.

28  {
29  return OutputMEPSet{
30  pset.getParameter<std::string>("name"),
31  pset.getParameter<std::string>("folder"),
32  pset.getParameter<bool>("doXaxis"),
33  pset.getParameter<int>("nbinsX"),
34  pset.getParameter<double>("xminX"),
35  pset.getParameter<double>("xmaxX"),
36  pset.getParameter<bool>("doYaxis"),
37  pset.getParameter<int>("nbinsY"),
38  pset.getParameter<double>("xminY"),
39  pset.getParameter<double>("xmaxY"),
40  };
41 }

◆ getTH1()

TH1 * DQMCorrelationClient::getTH1 ( MonitorElement me,
bool  profileX = true 
)
private

Definition at line 50 of file DQMCorrelationClient.cc.

References CalibrationSummaryClient_cfi::kind, hlt_dqm_clientPB-live_cfg::me, hlt_dqm_clientPB-live_cfg::profileX, MonitorElementData::TH2D, MonitorElementData::TH2F, MonitorElementData::TH2S, and MonitorElementData::TPROFILE.

Referenced by dqmEndJob().

50  {
51  TH1* th1 = nullptr;
52 
53  MonitorElement::Kind kind = me->kind();
54  switch (kind) {
56  th1 = (profileX ? me->getTH2D()->ProfileX() : me->getTH2D()->ProfileY());
57  break;
59  th1 = (profileX ? me->getTH2F()->ProfileX() : me->getTH2F()->ProfileY());
60  break;
62  th1 = (profileX ? me->getTH2S()->ProfileX() : me->getTH2S()->ProfileY());
63  break;
65  th1 = me->getTH1();
66  break;
67  default:
68  break;
69  }
70 
71  return th1;
72 }

◆ setAxisTitle()

void DQMCorrelationClient::setAxisTitle ( MonitorElement meX,
MonitorElement meY 
)
private

Definition at line 73 of file DQMCorrelationClient.cc.

References correlation_, OutputMEPSet::doXaxis, OutputMEPSet::doYaxis, dqm::legacy::MonitorElement::getTH1(), mps_fire::i, mepset_, and dqm::impl::MonitorElement::setAxisTitle().

Referenced by dqmEndJob().

73  {
74  if (correlation_ == nullptr)
75  return;
76  correlation_->setAxisTitle(meX->getTH1()->GetYaxis()->GetTitle(), 1);
77  correlation_->setAxisTitle(meY->getTH1()->GetYaxis()->GetTitle(), 2);
78 
79  if (!mepset_.doXaxis) {
80  TAxis* axis = (meX->getTH1()->GetYaxis());
81  for (int i = 1; i <= axis->GetNbins(); ++i)
82  correlation_->getTH1()->GetXaxis()->SetBinLabel(i, axis->GetBinLabel(i));
83  }
84 
85  if (!mepset_.doYaxis) {
86  TAxis* axis = (meY->getTH1()->GetYaxis());
87  for (int i = 1; i <= axis->GetNbins(); ++i)
88  correlation_->getTH1()->GetYaxis()->SetBinLabel(i, axis->GetBinLabel(i));
89  }
90 }
MonitorElement * correlation_
virtual TH1 * getTH1() const
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)

Member Data Documentation

◆ correlation_

MonitorElement* DQMCorrelationClient::correlation_
private

Definition at line 65 of file DQMCorrelationClient.h.

Referenced by DQMCorrelationClient(), dqmEndJob(), and setAxisTitle().

◆ me1onX_

bool DQMCorrelationClient::me1onX_
private

Definition at line 62 of file DQMCorrelationClient.h.

◆ mepset_

OutputMEPSet DQMCorrelationClient::mepset_
private

Definition at line 69 of file DQMCorrelationClient.h.

Referenced by dqmEndJob(), and setAxisTitle().

◆ meXpset_

MEPSet DQMCorrelationClient::meXpset_
private

Definition at line 67 of file DQMCorrelationClient.h.

Referenced by dqmEndJob().

◆ meYpset_

MEPSet DQMCorrelationClient::meYpset_
private

Definition at line 68 of file DQMCorrelationClient.h.

Referenced by dqmEndJob().