32 : subDirectory_(iConfig.getParameter<
std::
string>(
"DirectoryName")) {}
39 std::vector<MonitorElement*> hgcalMEs;
40 std::vector<std::string> fullDirPath = ig.
getSubdirs();
42 for (
unsigned int i = 0;
i < fullDirPath.size();
i++) {
44 edm::LogVerbatim(
"HGCalValid") <<
"HGCalGeometry::fullPath: " << fullDirPath.at(
i);
47 std::vector<std::string> fullSubDirPath = ig.
getSubdirs();
49 for (
unsigned int j = 0;
j < fullSubDirPath.size();
j++) {
51 edm::LogVerbatim(
"HGCalValid") <<
"HGCalGeometry:: fullSubPath: " << fullSubDirPath.at(
j);
53 if (strcmp(fullSubDirPath.at(
j).c_str(),
subDirectory_.c_str()) == 0) {
56 edm::LogVerbatim(
"HGCalValid") <<
"HGCalGeometry:: hgcalMES size : " << hgcalMEs.size();
67 std::string hist1[4] = {
"TotEdepStep",
"dX",
"dY",
"dZ"};
78 std::vector<MonitorElement*> hist1_;
79 std::vector<MonitorElement*> hist2_;
82 for (
unsigned int idet = 0; idet < 3; ++idet) {
84 for (
unsigned int kh = 0; kh < 4; ++kh) {
85 sprintf(
name,
"%s%s", dets[idet].c_str(), hist1[kh].c_str());
86 for (
unsigned int ih = 0; ih < hgcalMEs.size(); ih++) {
87 if (strcmp(hgcalMEs[ih]->
getName().c_str(),
name) == 0) {
88 hist1_.push_back(hgcalMEs[ih]);
89 double nevent = hist1_.back()->getEntries();
90 int nbinsx = hist1_.back()->getNbinsX();
92 double binValue = hist1_.back()->getBinContent(
i) /
nevent;
93 hist1_.back()->setBinContent(
i, binValue);
98 for (
unsigned int kh = 0; kh < 10; ++kh) {
99 sprintf(
name,
"%s%s", dets[idet].c_str(), hist2[kh].c_str());
100 for (
unsigned int ih = 0; ih < hgcalMEs.size(); ih++) {
101 if (strcmp(hgcalMEs[ih]->
getName().c_str(),
name) == 0) {
102 hist2_.push_back(hgcalMEs[ih]);
103 double nevent = hist2_.back()->getEntries();
104 int nbinsx = hist2_.back()->getNbinsX();
105 int nbinsy = hist2_.back()->getNbinsY();
108 double binValue = hist2_.back()->getBinContent(
i,
j) /
nevent;
109 hist2_.back()->setBinContent(
i,
j, binValue);
Log< level::Info, true > LogVerbatim
void dqmEndJob(DQMStore::IBooker &ib, DQMStore::IGetter &ig) override
virtual void setCurrentFolder(std::string const &fullpath)
~HGCalGeometryClient() override=default
HGCalGeometryClient(const edm::ParameterSet &)
int geometryEndjob(const std::vector< MonitorElement *> &hcalMEs)
#define DEFINE_FWK_MODULE(type)
void beginRun(const edm::Run &run, const edm::EventSetup &c) override
std::string getName(const G4String &)
Log< level::Warning, false > LogWarning
const std::string subDirectory_
virtual std::vector< dqm::harvesting::MonitorElement * > getContents(std::string const &path) const
virtual DQM_DEPRECATED std::vector< std::string > getSubdirs() const