CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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< T > 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 (edm::ParameterSet const &iConfig)
 
 DQMEDHarvester ()
 
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< T >
 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
 
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)
 

Private Member Functions

void book1D (DQMStore::IBooker &ib, std::string name, int n, double min, double max)
 
void book1D (DQMStore::IBooker &ib, std::string name, const HistLim &limX)
 
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
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)
 
- 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 ( const edm::ParameterSet iConfig)
explicit

Definition at line 22 of file HcalDigisClient.cc.

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

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 }
T getUntrackedParameter(std::string const &, T const &) const
std::map< std::string, MonitorElement * > * msm_
std::string dirName_
std::string outputFile_
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
HcalDigisClient::~HcalDigisClient ( )
override

Definition at line 28 of file HcalDigisClient.cc.

References msm_.

28 { delete msm_; }
std::map< std::string, MonitorElement * > * msm_

Member Function Documentation

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

Definition at line 50 of file HcalDigisClient.h.

References dqm::implementation::IBooker::book1D(), SiStripPI::max, SiStripPI::min, msm_, dqmiodumpmetadata::n, and mergeVDriftHistosByStation::name.

Referenced by HcalDigisEndjob().

50  {
51  if (!msm_->count(name))
52  (*msm_)[name] = ib.book1D(name.c_str(), name.c_str(), n, min, max);
53  }
std::map< std::string, MonitorElement * > * msm_
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
void HcalDigisClient::book1D ( DQMStore::IBooker ib,
std::string  name,
const HistLim limX 
)
inlineprivate

Definition at line 55 of file HcalDigisClient.h.

References dqm::implementation::IBooker::book1D(), HcalDigisClient::HistLim::max, HcalDigisClient::HistLim::min, msm_, HcalDigisClient::HistLim::n, and mergeVDriftHistosByStation::name.

55  {
56  if (!msm_->count(name))
57  (*msm_)[name] = ib.book1D(name.c_str(), name.c_str(), limX.n, limX.min, limX.max);
58  }
std::map< std::string, MonitorElement * > * msm_
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
void HcalDigisClient::book2D ( DQMStore::IBooker ib,
std::string  name,
const HistLim limX,
const HistLim limY 
)
inlineprivate

Definition at line 62 of file HcalDigisClient.h.

References dqm::implementation::IBooker::book2D(), HcalDigisClient::HistLim::max, HcalDigisClient::HistLim::min, msm_, HcalDigisClient::HistLim::n, and mergeVDriftHistosByStation::name.

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  }
std::map< std::string, MonitorElement * > * msm_
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
void HcalDigisClient::bookPf ( DQMStore::IBooker ib,
std::string  name,
const HistLim limX,
const HistLim limY 
)
inlineprivate

Definition at line 69 of file HcalDigisClient.h.

References dqm::implementation::IBooker::bookProfile(), HcalDigisClient::HistLim::max, HcalDigisClient::HistLim::min, msm_, HcalDigisClient::HistLim::n, and mergeVDriftHistosByStation::name.

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  }
std::map< std::string, MonitorElement * > * msm_
MonitorElement * bookProfile(TString const &name, TString const &title, int nchX, double lowX, double highX, int, double lowY, double highY, char const *option="s", FUNC onbooking=NOOP())
Definition: DQMStore.h:322
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.

References dqm::implementation::IBooker::bookProfile(), HcalDigisClient::HistLim::max, HcalDigisClient::HistLim::min, msm_, HcalDigisClient::HistLim::n, and mergeVDriftHistosByStation::name.

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  }
std::map< std::string, MonitorElement * > * msm_
MonitorElement * bookProfile(TString const &name, TString const &title, int nchX, double lowX, double highX, int, double lowY, double highY, char const *option="s", FUNC onbooking=NOOP())
Definition: DQMStore.h:322
void HcalDigisClient::dqmEndJob ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter 
)
inlineoverrideprivatevirtual

Implements DQMEDHarvester.

Definition at line 33 of file HcalDigisClient.h.

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

33  {
34  igetter.setCurrentFolder(dirName_); // This sets the DQMStore (should apply to ibooker as well
35  runClient(ibooker, igetter);
36  }
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
std::string dirName_
virtual void runClient(DQMStore::IBooker &ib, DQMStore::IGetter &ig)
void HcalDigisClient::fill1D ( std::string  name,
double  X,
double  weight = 1 
)
inlineprivate

Definition at line 60 of file HcalDigisClient.h.

References msm_, and histoStyle::weight.

60 { msm_->find(name)->second->Fill(X, weight); }
std::map< std::string, MonitorElement * > * msm_
#define X(str)
Definition: MuonsGrabber.cc:38
int weight
Definition: histoStyle.py:51
void HcalDigisClient::fill2D ( std::string  name,
double  X,
double  Y,
double  weight = 1 
)
inlineprivate

Definition at line 67 of file HcalDigisClient.h.

References msm_, and histoStyle::weight.

67 { msm_->find(name)->second->Fill(X, Y, weight); }
std::map< std::string, MonitorElement * > * msm_
#define X(str)
Definition: MuonsGrabber.cc:38
int weight
Definition: histoStyle.py:51
void HcalDigisClient::fillPf ( std::string  name,
double  X,
double  Y 
)
inlineprivate

Definition at line 81 of file HcalDigisClient.h.

References msm_.

81 { msm_->find(name)->second->Fill(X, Y); }
std::map< std::string, MonitorElement * > * msm_
#define X(str)
Definition: MuonsGrabber.cc:38
int HcalDigisClient::HcalDigisEndjob ( const std::vector< MonitorElement * > &  hcalMEs,
std::string  subdet_,
DQMStore::IBooker ib 
)
private

Definition at line 56 of file HcalDigisClient.cc.

References book1D(), ws_sso_content_reader::content, HLT_FULL_cff::depth, alignCSCRings::e, dataset::end, makeMEIFBenchmarkPlots::ev, spr::find(), dqm::impl::MonitorElement::getEntries(), getName(), dqm::legacy::MonitorElement::getTH1F(), mps_fire::i, dqmiolumiharvest::j, msm_, position, dqm::impl::MonitorElement::setBinContent(), dqm::impl::MonitorElement::setBinError(), mathSSE::sqrt(), command_line::start, str(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by runClient().

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 }
std::map< std::string, MonitorElement * > * msm_
virtual TH1F * getTH1F() const
Log< level::Error, false > LogError
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
Definition: ME.h:11
T sqrt(T t)
Definition: SSEVec.h:19
std::string str(int x)
void book1D(DQMStore::IBooker &ib, std::string name, int n, double min, double max)
TString getName(TString structure, int layer, TString geometry)
Definition: DMRtrends.cc:236
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
static int position[264][3]
Definition: ReadPGInfo.cc:289
string end
Definition: dataset.py:937
virtual void setBinError(int binx, double error)
set uncertainty on content of bin (1-D)
double HcalDigisClient::integralMETH2D ( MonitorElement ME,
int  i0,
int  i1,
int  j0,
int  j1 
)
private

Definition at line 211 of file HcalDigisClient.cc.

References dqm::impl::MonitorElement::getBinContent(), mps_fire::i, and dqmiolumiharvest::j.

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 }
virtual double getBinContent(int binx) const
get content of bin (1-D)
HcalDigisClient::MonitorElement * HcalDigisClient::monitor ( std::string  name)
private

Definition at line 198 of file HcalDigisClient.cc.

References msm_.

198  {
199  if (!msm_->count(name))
200  return nullptr;
201  else
202  return msm_->find(name)->second;
203 }
std::map< std::string, MonitorElement * > * msm_
void HcalDigisClient::runClient ( DQMStore::IBooker ib,
DQMStore::IGetter ig 
)
privatevirtual

Definition at line 30 of file HcalDigisClient.cc.

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

Referenced by dqmEndJob().

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 }
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
virtual DQM_DEPRECATED std::vector< std::string > getSubdirs() const
Definition: DQMStore.cc:700
std::string dirName_
virtual std::vector< dqm::harvesting::MonitorElement * > getContents(std::string const &path) const
Definition: DQMStore.cc:593
Log< level::Error, false > LogError
int HcalDigisEndjob(const std::vector< MonitorElement * > &hcalMEs, std::string subdet_, DQMStore::IBooker &ib)
void HcalDigisClient::scaleMETH2D ( MonitorElement ME,
double  s 
)
private

Definition at line 222 of file HcalDigisClient.cc.

References ws_sso_content_reader::content, relativeConstraints::error, dqm::impl::MonitorElement::getBinContent(), dqm::impl::MonitorElement::getBinError(), dqm::impl::MonitorElement::getNbinsX(), dqm::impl::MonitorElement::getNbinsY(), mps_fire::i, dqmiolumiharvest::j, alignCSCRings::s, dqm::impl::MonitorElement::setBinContent(), and dqm::impl::MonitorElement::setBinError().

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 }
virtual int getNbinsY() const
get # of bins in Y-axis
virtual double getBinError(int binx) const
get uncertainty on content of bin (1-D) - See TH1::GetBinError for details
virtual int getNbinsX() const
get # of bins in X-axis
virtual double getBinContent(int binx) const
get content of bin (1-D)
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
virtual void setBinError(int binx, double error)
set uncertainty on content of bin (1-D)
std::string HcalDigisClient::str ( int  x)
private

Definition at line 205 of file HcalDigisClient.cc.

References submitPVResolutionJobs::out, and x.

Referenced by HcalDigisEndjob().

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

Member Data Documentation

std::string HcalDigisClient::dirName_
private

Definition at line 89 of file HcalDigisClient.h.

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

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

Definition at line 88 of file HcalDigisClient.h.

Referenced by HcalDigisClient().