CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Private Member Functions | Private Attributes
HcalDigisClient Class Reference

#include <Validation/HcalDigisClient/src/HcalDigisClient.cc>

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

Classes

struct  HistLim
 

Public Member Functions

 HcalDigisClient (const edm::ParameterSet &)
 
 ~HcalDigisClient () override
 
- 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 ()
 
 DQMEDHarvester (edm::ParameterSet const &iConfig)
 
virtual void dqmEndLuminosityBlock (DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &)
 
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 &&)=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
 
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)
 

Private Member Functions

void book1D (DQMStore::IBooker &ib, std::string name, const HistLim &limX)
 
void book1D (DQMStore::IBooker &ib, std::string name, int n, double min, double max)
 
void book2D (DQMStore::IBooker &ib, std::string name, const HistLim &limX, const HistLim &limY)
 
void bookPf (DQMStore::IBooker &ib, std::string name, const HistLim &limX, const HistLim &limY)
 
void bookPf (DQMStore::IBooker &ib, std::string name, const HistLim &limX, const HistLim &limY, const char *option)
 
void dqmEndJob (DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter) override
 
void fill1D (std::string name, double X, double weight=1)
 
void fill2D (std::string name, double X, double Y, double weight=1)
 
void fillPf (std::string name, double X, double Y)
 
int HcalDigisEndjob (const std::vector< MonitorElement * > &hcalMEs, std::string subdet_, DQMStore::IBooker &ib)
 
double integralMETH2D (MonitorElement *ME, int i0, int i1, int j0, int j1)
 
MonitorElementmonitor (std::string name)
 
virtual void runClient (DQMStore::IBooker &ib, DQMStore::IGetter &ig)
 
void scaleMETH2D (MonitorElement *ME, double s)
 
std::string str (int x)
 

Private Attributes

std::string dirName_
 
std::map< std::string, MonitorElement * > * msm_
 
std::string outputFile_
 

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

Description: [one line class summary]

Implementation: [Notes on implementation]

Definition at line 26 of file HcalDigisClient.h.

Constructor & Destructor Documentation

◆ HcalDigisClient()

HcalDigisClient::HcalDigisClient ( const edm::ParameterSet iConfig)
explicit

Definition at line 22 of file HcalDigisClient.cc.

22  {
23  outputFile_ = iConfig.getUntrackedParameter<std::string>("outputFile", "HcalDigisClient.root");
24  dirName_ = iConfig.getParameter<std::string>("DQMDirName");
25  msm_ = new std::map<std::string, MonitorElement*>();
26 }

References dirName_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), msm_, outputFile_, and AlCaHLTBitMon_QueryRunRegistry::string.

◆ ~HcalDigisClient()

HcalDigisClient::~HcalDigisClient ( )
override

Definition at line 28 of file HcalDigisClient.cc.

28 { delete msm_; }

References msm_.

Member Function Documentation

◆ book1D() [1/2]

void HcalDigisClient::book1D ( DQMStore::IBooker ib,
std::string  name,
const HistLim limX 
)
inlineprivate

Definition at line 55 of file HcalDigisClient.h.

55  {
56  if (!msm_->count(name))
57  (*msm_)[name] = ib.book1D(name.c_str(), name.c_str(), limX.n, limX.min, limX.max);
58  }

References cuy::ib, HcalDigisClient::HistLim::max, HcalDigisClient::HistLim::min, msm_, HcalDigisClient::HistLim::n, and Skims_PA_cff::name.

◆ book1D() [2/2]

void HcalDigisClient::book1D ( DQMStore::IBooker ib,
std::string  name,
int  n,
double  min,
double  max 
)
inlineprivate

Definition at line 50 of file HcalDigisClient.h.

50  {
51  if (!msm_->count(name))
52  (*msm_)[name] = ib.book1D(name.c_str(), name.c_str(), n, min, max);
53  }

References cuy::ib, SiStripPI::max, min(), msm_, dqmiodumpmetadata::n, and Skims_PA_cff::name.

Referenced by HcalDigisEndjob().

◆ book2D()

void HcalDigisClient::book2D ( DQMStore::IBooker ib,
std::string  name,
const HistLim limX,
const HistLim limY 
)
inlineprivate

Definition at line 62 of file HcalDigisClient.h.

62  {
63  if (!msm_->count(name))
64  (*msm_)[name] = ib.book2D(name.c_str(), name.c_str(), limX.n, limX.min, limX.max, limY.n, limY.min, limY.max);
65  }

References cuy::ib, HcalDigisClient::HistLim::max, HcalDigisClient::HistLim::min, msm_, HcalDigisClient::HistLim::n, and Skims_PA_cff::name.

◆ bookPf() [1/2]

void HcalDigisClient::bookPf ( DQMStore::IBooker ib,
std::string  name,
const HistLim limX,
const HistLim limY 
)
inlineprivate

Definition at line 69 of file HcalDigisClient.h.

69  {
70  if (!msm_->count(name))
71  (*msm_)[name] =
72  ib.bookProfile(name.c_str(), name.c_str(), limX.n, limX.min, limX.max, limY.n, limY.min, limY.max);
73  }

References cuy::ib, HcalDigisClient::HistLim::max, HcalDigisClient::HistLim::min, msm_, HcalDigisClient::HistLim::n, and Skims_PA_cff::name.

◆ bookPf() [2/2]

void HcalDigisClient::bookPf ( DQMStore::IBooker ib,
std::string  name,
const HistLim limX,
const HistLim limY,
const char *  option 
)
inlineprivate

Definition at line 75 of file HcalDigisClient.h.

75  {
76  if (!msm_->count(name))
77  (*msm_)[name] =
78  ib.bookProfile(name.c_str(), name.c_str(), limX.n, limX.min, limX.max, limY.n, limY.min, limY.max, option);
79  }

References cuy::ib, HcalDigisClient::HistLim::max, HcalDigisClient::HistLim::min, msm_, HcalDigisClient::HistLim::n, Skims_PA_cff::name, and fileinputsource_cfi::option.

◆ dqmEndJob()

void HcalDigisClient::dqmEndJob ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter 
)
inlineoverrideprivatevirtual

Implements DQMEDHarvester.

Definition at line 33 of file HcalDigisClient.h.

33  {
34  igetter.setCurrentFolder(dirName_); // This sets the DQMStore (should apply to ibooker as well
35  runClient(ibooker, igetter);
36  }

References dirName_, runClient(), and dqm::implementation::NavigatorBase::setCurrentFolder().

◆ fill1D()

void HcalDigisClient::fill1D ( std::string  name,
double  X,
double  weight = 1 
)
inlineprivate

Definition at line 60 of file HcalDigisClient.h.

60 { msm_->find(name)->second->Fill(X, weight); }

References msm_, Skims_PA_cff::name, and X.

◆ fill2D()

void HcalDigisClient::fill2D ( std::string  name,
double  X,
double  Y,
double  weight = 1 
)
inlineprivate

Definition at line 67 of file HcalDigisClient.h.

67 { msm_->find(name)->second->Fill(X, Y, weight); }

References msm_, Skims_PA_cff::name, X, and BeamSpotPI::Y.

◆ fillPf()

void HcalDigisClient::fillPf ( std::string  name,
double  X,
double  Y 
)
inlineprivate

Definition at line 81 of file HcalDigisClient.h.

81 { msm_->find(name)->second->Fill(X, Y); }

References msm_, Skims_PA_cff::name, X, and BeamSpotPI::Y.

◆ HcalDigisEndjob()

int HcalDigisClient::HcalDigisEndjob ( const std::vector< MonitorElement * > &  hcalMEs,
std::string  subdet_,
DQMStore::IBooker ib 
)
private

Definition at line 56 of file HcalDigisClient.cc.

58  {
59  using namespace std;
60  string strtmp;
61 
62  MonitorElement* nevtot(nullptr);
63 
64  std::vector<MonitorElement*> ieta_iphi_occupancy_maps;
65  std::vector<std::string> depthID;
66 
67  // std::cout << " Number of histos " << hcalMEs.size() << std::endl;
68 
69  for (unsigned int ih = 0; ih < hcalMEs.size(); ih++) {
70  if (hcalMEs[ih]->getName() == "nevtot") {
71  nevtot = hcalMEs[ih];
72  continue;
73  }
74 
75  //We search the occupancy maps corresponding to this subdetector
76  if ((hcalMEs[ih]->getName().find("HcalDigiTask_ieta_iphi_occupancy_map_depth") != std::string::npos) &&
77  (hcalMEs[ih]->getName().find(subdet_) != std::string::npos)) {
78  ieta_iphi_occupancy_maps.push_back(hcalMEs[ih]);
79 
80  std::string start = "depth";
81  std::string end = "_H";
82 
83  int position = hcalMEs[ih]->getName().find(start) + start.length();
84  int length = hcalMEs[ih]->getName().find(end) - position;
85 
86  depthID.push_back(hcalMEs[ih]->getName().substr(position, length));
87 
88  continue;
89  }
90  }
91 
92  if (hcalMEs.empty()) {
93  edm::LogError("HcalDigisClient") << "No nevtot or maps histo found...";
94  return 0;
95  }
96  if (!nevtot) {
97  edm::LogError("HcalDigisClient") << "No nevtot histoo found...";
98  return 0;
99  }
100  if (ieta_iphi_occupancy_maps.empty()) {
101  edm::LogError("HcalDigisClient") << "No maps histos found...";
102  return 0;
103  }
104 
105  int ev = nevtot->getEntries();
106 
107  if (ev <= 0) {
108  edm::LogError("HcalDigisClient") << "normalization factor <= 0!";
109  return 0;
110  }
111 
112  float fev = (float)nevtot->getEntries();
113 
114  int depths = ieta_iphi_occupancy_maps.size();
115 
116  HistLim ietaLim(85, -42.5, 42.5);
117 
118  for (int depth = 1; depth <= depths; depth++) {
119  strtmp = "HcalDigiTask_occupancy_vs_ieta_depth" + str(depth) + "_" + subdet_;
120  book1D(ib, strtmp, ietaLim);
121  }
122 
123  std::vector<float> sumphi(depths, 0);
124  std::vector<float> sumphie(depths, 0);
125 
126  float phi_factor;
127  float cnorm;
128  float enorm;
129 
130  for (int depth = 1; depth <= depths; depth++) {
131  int nx = ieta_iphi_occupancy_maps[depth - 1]->getNbinsX();
132  int ny = ieta_iphi_occupancy_maps[depth - 1]->getNbinsY();
133 
134  for (int i = 1; i <= nx; i++) {
135  for (int j = 1; j <= ny; j++) {
136  // occupancies
137  cnorm = ieta_iphi_occupancy_maps[depth - 1]->getBinContent(i, j) / fev;
138  enorm = ieta_iphi_occupancy_maps[depth - 1]->getBinError(i, j) / fev;
139  ieta_iphi_occupancy_maps[depth - 1]->setBinContent(i, j, cnorm);
140  ieta_iphi_occupancy_maps[depth - 1]->setBinError(i, j, enorm);
141 
142  } //for loop over NbinsYU
143  } //for loop over NbinsX
144  } //for loop over the occupancy maps
145 
146  for (int i = 1; i <= 82; i++) {
147  int ieta = i - 42; // -41 -1, 0 40
148  if (ieta >= 0)
149  ieta += 1; // -41 -1, 1 41 - to make it detector-like
150 
151  if (ieta >= -20 && ieta <= 20) {
152  phi_factor = 72.;
153  } else {
154  if (ieta >= 40 || ieta <= -40)
155  phi_factor = 18.;
156  else
157  phi_factor = 36.;
158  }
159 
160  //zero the sumphi and sumphie vector at the start of each ieta ring
161  sumphi.assign(depths, 0);
162  sumphie.assign(depths, 0);
163 
164  for (int iphi = 1; iphi <= 72; iphi++) {
165  for (int depth = 1; depth <= depths; depth++) {
166  int binIeta = ieta_iphi_occupancy_maps[depth - 1]->getTH2F()->GetXaxis()->FindBin(ieta);
167  int binIphi = ieta_iphi_occupancy_maps[depth - 1]->getTH2F()->GetYaxis()->FindBin(iphi);
168 
169  float content = ieta_iphi_occupancy_maps[depth - 1]->getBinContent(binIeta, binIphi);
170  float econtent = ieta_iphi_occupancy_maps[depth - 1]->getBinError(binIeta, binIphi);
171 
172  sumphi[depth - 1] += content;
173  sumphie[depth - 1] += econtent * econtent;
174 
175  } //for loop over depths
176  } //for loop over phi
177 
178  //double deta = double(ieta);
179 
180  // occupancies vs ieta
181  for (int depth = 1; depth <= depths; depth++) {
182  strtmp = "HcalDigiTask_occupancy_vs_ieta_depth" + depthID[depth - 1] + "_" + subdet_;
183  MonitorElement* ME = msm_->find(strtmp)->second;
184  int ietabin = ME->getTH1F()->GetXaxis()->FindBin(float(ieta));
185 
186  if (sumphi[depth - 1] > 1.e-30) {
187  cnorm = sumphi[depth - 1] / phi_factor;
188  enorm = sqrt(sumphie[depth - 1]) / phi_factor;
189  ME->setBinContent(ietabin, cnorm);
190  ME->setBinError(ietabin, enorm);
191  }
192  }
193  } // end of i-loop
194 
195  return 1;
196 }

References book1D(), Skims_PA_cff::content, LEDCalibrationChannels::depth, HLT_FULL_cff::depths, MillePedeFileConverter_cfg::e, mps_fire::end, ev, spr::find(), dqmMemoryStats::float, dqm::impl::MonitorElement::getEntries(), getName(), mps_fire::i, cuy::ib, LEDCalibrationChannels::ieta, LEDCalibrationChannels::iphi, dqmiolumiharvest::j, msm_, position, mathSSE::sqrt(), str(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by runClient().

◆ integralMETH2D()

double HcalDigisClient::integralMETH2D ( MonitorElement ME,
int  i0,
int  i1,
int  j0,
int  j1 
)
private

Definition at line 211 of file HcalDigisClient.cc.

211  {
212  double sum(0);
213  for (int i = i0; i <= i1; i++) {
214  for (int j = j0; j <= j1; j++) {
215  sum += ME->getBinContent(i, j);
216  }
217  }
218 
219  return sum;
220 }

References mps_fire::i, testProducerWithPsetDescEmpty_cfi::i1, and dqmiolumiharvest::j.

◆ monitor()

HcalDigisClient::MonitorElement * HcalDigisClient::monitor ( std::string  name)
private

Definition at line 198 of file HcalDigisClient.cc.

198  {
199  if (!msm_->count(name))
200  return nullptr;
201  else
202  return msm_->find(name)->second;
203 }

References msm_, and Skims_PA_cff::name.

◆ runClient()

void HcalDigisClient::runClient ( DQMStore::IBooker ib,
DQMStore::IGetter ig 
)
privatevirtual

Definition at line 30 of file HcalDigisClient.cc.

30  {
32  std::vector<MonitorElement*> hcalMEs;
33  // Since out folders are fixed to three, we can just go over these three folders
34  // i.e., CaloTowersV/CaloTowersTask, HcalRecHitsV/HcalRecHitTask, NoiseRatesV/NoiseRatesTask.
35  std::vector<std::string> fullPathHLTFolders = ig.getSubdirs();
36  for (unsigned int i = 0; i < fullPathHLTFolders.size(); i++) {
37  ig.setCurrentFolder(fullPathHLTFolders[i]);
38  std::vector<std::string> fullSubPathHLTFolders = ig.getSubdirs();
39  for (unsigned int j = 0; j < fullSubPathHLTFolders.size(); j++) {
40  if (strcmp(fullSubPathHLTFolders[j].c_str(), "HcalDigisV/HcalDigiTask") == 0) {
41  hcalMEs = ig.getContents(fullSubPathHLTFolders[j]);
42  ig.setCurrentFolder("HcalDigisV/HcalDigiTask");
43  if (!HcalDigisEndjob(hcalMEs, "HB", ib))
44  edm::LogError("HcalDigisClient") << "Error in HcalDigisEndjob! HB";
45  if (!HcalDigisEndjob(hcalMEs, "HE", ib))
46  edm::LogError("HcalDigisClient") << "Error in HcalDigisEndjob! HE";
47  if (!HcalDigisEndjob(hcalMEs, "HO", ib))
48  edm::LogError("HcalDigisClient") << "Error in HcalDigisEndjob! HO";
49  if (!HcalDigisEndjob(hcalMEs, "HF", ib))
50  edm::LogError("HcalDigisClient") << "Error in HcalDigisEndjob! HF";
51  }
52  }
53  }
54 }

References dirName_, dqm::implementation::IGetter::getContents(), dqm::implementation::IGetter::getSubdirs(), HcalDigisEndjob(), mps_fire::i, cuy::ib, dqmiolumiharvest::j, and dqm::implementation::NavigatorBase::setCurrentFolder().

Referenced by dqmEndJob().

◆ scaleMETH2D()

void HcalDigisClient::scaleMETH2D ( MonitorElement ME,
double  s 
)
private

Definition at line 222 of file HcalDigisClient.cc.

222  {
223  int nx = ME->getNbinsX();
224  int ny = ME->getNbinsY();
225 
226  double content(0);
227  double error(0);
228  for (int i = 1; i <= nx; i++) {
229  for (int j = 1; j <= ny; j++) {
230  content = ME->getBinContent(i, j);
231  error = ME->getBinError(i, j);
232  content *= s;
233  error *= s;
234  ME->setBinContent(i, j, content);
235  ME->setBinError(i, j, error);
236  }
237  }
238 }

References Skims_PA_cff::content, relativeConstraints::error, mps_fire::i, dqmiolumiharvest::j, and alignCSCRings::s.

◆ str()

std::string HcalDigisClient::str ( int  x)
private

Definition at line 205 of file HcalDigisClient.cc.

205  {
206  std::stringstream out;
207  out << x;
208  return out.str();
209 }

References MillePedeFileConverter_cfg::out, and x.

Referenced by HcalDigisEndjob().

Member Data Documentation

◆ dirName_

std::string HcalDigisClient::dirName_
private

Definition at line 89 of file HcalDigisClient.h.

Referenced by dqmEndJob(), HcalDigisClient(), and runClient().

◆ msm_

std::map<std::string, MonitorElement *>* HcalDigisClient::msm_
private

◆ outputFile_

std::string HcalDigisClient::outputFile_
private

Definition at line 88 of file HcalDigisClient.h.

Referenced by HcalDigisClient().

mps_fire.i
i
Definition: mps_fire.py:428
start
Definition: start.py:1
dqm::implementation::IGetter::getContents
virtual std::vector< dqm::harvesting::MonitorElement * > getContents(std::string const &path) const
Definition: DQMStore.cc:593
dqmMemoryStats.float
float
Definition: dqmMemoryStats.py:127
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
X
#define X(str)
Definition: MuonsGrabber.cc:38
min
T min(T a, T b)
Definition: MathUtil.h:58
testProducerWithPsetDescEmpty_cfi.i1
i1
Definition: testProducerWithPsetDescEmpty_cfi.py:45
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
HcalDigisClient::msm_
std::map< std::string, MonitorElement * > * msm_
Definition: HcalDigisClient.h:87
dqm::implementation::IGetter::getSubdirs
virtual DQM_DEPRECATED std::vector< std::string > getSubdirs() const
Definition: DQMStore.cc:700
dqm::legacy::MonitorElement
Definition: MonitorElement.h:462
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
DDAxes::x
spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
relativeConstraints.error
error
Definition: relativeConstraints.py:53
fileinputsource_cfi.option
option
Definition: fileinputsource_cfi.py:94
HcalDigisClient::dirName_
std::string dirName_
Definition: HcalDigisClient.h:89
LEDCalibrationChannels.iphi
iphi
Definition: LEDCalibrationChannels.py:64
alignCSCRings.s
s
Definition: alignCSCRings.py:92
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
getName
TString getName(TString structure, int layer, TString geometry)
Definition: DMRtrends.cc:235
mps_fire.end
end
Definition: mps_fire.py:242
HcalDigisClient::HcalDigisEndjob
int HcalDigisEndjob(const std::vector< MonitorElement * > &hcalMEs, std::string subdet_, DQMStore::IBooker &ib)
Definition: HcalDigisClient.cc:56
LEDCalibrationChannels.depth
depth
Definition: LEDCalibrationChannels.py:65
LEDCalibrationChannels.ieta
ieta
Definition: LEDCalibrationChannels.py:63
Skims_PA_cff.content
content
Definition: Skims_PA_cff.py:19
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
position
static int position[264][3]
Definition: ReadPGInfo.cc:289
cuy.ib
ib
Definition: cuy.py:661
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
HLT_FULL_cff.depths
depths
Definition: HLT_FULL_cff.py:13426
std
Definition: JetResolutionObject.h:76
HcalDigisClient::runClient
virtual void runClient(DQMStore::IBooker &ib, DQMStore::IGetter &ig)
Definition: HcalDigisClient.cc:30
HcalDigisClient::book1D
void book1D(DQMStore::IBooker &ib, std::string name, int n, double min, double max)
Definition: HcalDigisClient.h:50
ev
bool ev
Definition: Hydjet2Hadronizer.cc:97
ME
Definition: ME.h:11
HcalDigisClient::outputFile_
std::string outputFile_
Definition: HcalDigisClient.h:88
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
BeamSpotPI::Y
Definition: BeamSpotPayloadInspectorHelper.h:32
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
HcalDigisClient::str
std::string str(int x)
Definition: HcalDigisClient.cc:205
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
weight
Definition: weight.py:1
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37