Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Phase2-hgx93 Clean up all the validation classes and unused cfi(cfff) files #21734

Merged
merged 2 commits into from
Dec 19, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 1 addition & 3 deletions Validation/Configuration/python/hgcalSimValid_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@
from Validation.HGCalValidation.simhitValidation_cff import *
from Validation.HGCalValidation.digiValidation_cff import *
from Validation.HGCalValidation.rechitValidation_cff import *
from Validation.HGCalValidation.hgcGeometryValidation_cfi import *
from Validation.HGCalValidation.hgcalHitValidation_cfi import *

hgcalValidation = cms.Sequence(hgcGeomAnalysis
+ hgcalSimHitValidationEE
hgcalValidation = cms.Sequence(hgcalSimHitValidationEE
+ hgcalSimHitValidationHEF
+ hgcalSimHitValidationHEB
+ hgcalDigiValidationEE
Expand Down
5 changes: 0 additions & 5 deletions Validation/HGCalValidation/plugins/HGCGeometryValidation.cc
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,6 @@ HGCGeometryValidation::HGCGeometryValidation(const edm::ParameterSet &cfg) : hco
HGCGeometryValidation::~HGCGeometryValidation() { }

void HGCGeometryValidation::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
//The following says we do not know what parameters are allowed so do no validation
// Please change this to state exactly what you do use, even if it is no parameters
edm::ParameterSetDescription desc;
desc.setUnknown();
descriptions.addDefault(desc);
Expand Down Expand Up @@ -336,6 +334,3 @@ DEFINE_FWK_MODULE(HGCGeometryValidation);






48 changes: 35 additions & 13 deletions Validation/HGCalValidation/plugins/HGCalDigiClient.cc
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
#include "Validation/HGCalValidation/plugins/HGCalDigiClient.h"
#include <iostream>
#include <fstream>
#include <vector>
#include <unistd.h>

#include "FWCore/Framework/interface/Run.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/EventSetup.h"
#include "FWCore/Framework/interface/ESTransientHandle.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/ServiceRegistry/interface/Service.h"

#include "DQMServices/Core/interface/DQMEDHarvester.h"
#include "DQMServices/Core/interface/DQMStore.h"
#include "DQMServices/Core/interface/MonitorElement.h"
#include "DetectorDescription/Core/interface/DDCompactView.h"
Expand All @@ -12,13 +21,27 @@
#include "Geometry/Records/interface/HcalRecNumberingRecord.h"
#include "Geometry/Records/interface/IdealGeometryRecord.h"

HGCalDigiClient::HGCalDigiClient(const edm::ParameterSet& iConfig) {

nameDetector_ = iConfig.getParameter<std::string>("DetectorName");
verbosity_ = iConfig.getUntrackedParameter<int>("Verbosity",0);
}
class HGCalDigiClient : public DQMEDHarvester {

private:
std::string nameDetector_;
int verbosity_;
int layers_;

public:
explicit HGCalDigiClient(const edm::ParameterSet&);
~HGCalDigiClient() override { }

HGCalDigiClient::~HGCalDigiClient() { }
void beginRun(const edm::Run& run, const edm::EventSetup& c) override;
void dqmEndJob(DQMStore::IBooker &ib, DQMStore::IGetter &ig) override;
void runClient_(DQMStore::IBooker &ib, DQMStore::IGetter &ig);
int digisEndjob(const std::vector<MonitorElement*> &hcalMEs);
};

HGCalDigiClient::HGCalDigiClient(const edm::ParameterSet& iConfig) :
nameDetector_(iConfig.getParameter<std::string>("DetectorName")),
verbosity_(iConfig.getUntrackedParameter<int>("Verbosity",0)) { }

void HGCalDigiClient::beginRun(const edm::Run& run, const edm::EventSetup& iSetup) {

Expand All @@ -42,29 +65,28 @@ void HGCalDigiClient::dqmEndJob(DQMStore::IBooker &ib, DQMStore::IGetter &ig) {
void HGCalDigiClient::runClient_(DQMStore::IBooker &ib, DQMStore::IGetter &ig) {

ig.setCurrentFolder("/");
if (verbosity_) edm::LogInfo("HGCalValidation") << "\nrunClient";
if (verbosity_) edm::LogVerbatim("HGCalValidation") << "\nrunClient";
std::vector<MonitorElement*> hgcalMEs;
std::vector<std::string> fullDirPath = ig.getSubdirs();

for (unsigned int i=0; i<fullDirPath.size(); i++) {
if (verbosity_)
edm::LogInfo("HGCalValidation") << "\nfullPath: " << fullDirPath.at(i);
edm::LogVerbatim("HGCalValidation") << "\nfullPath: " << fullDirPath.at(i);
ig.setCurrentFolder(fullDirPath.at(i));
std::vector<std::string> fullSubDirPath = ig.getSubdirs();

for (unsigned int j=0; j<fullSubDirPath.size(); j++) {
if (verbosity_)
edm::LogInfo("HGCalValidation") << "fullSubPath: " << fullSubDirPath.at(j);
edm::LogVerbatim("HGCalValidation") << "fullSubPath: " << fullSubDirPath.at(j);
std::string nameDirectory = "HGCalDigiV/"+nameDetector_;
if (strcmp(fullSubDirPath.at(j).c_str(), nameDirectory.c_str()) == 0) {
hgcalMEs = ig.getContents(fullSubDirPath.at(j));
if (verbosity_)
edm::LogInfo("HGCalValidation") << "hgcalMES size : " << hgcalMEs.size();
edm::LogVerbatim("HGCalValidation") << "hgcalMES size : " << hgcalMEs.size();
if (!digisEndjob(hgcalMEs))
edm::LogInfo("HGCalValidation") << "\nError in DigisEndjob!";
edm::LogVerbatim("HGCalValidation") << "\nError in DigisEndjob!";
}
}

}
}

Expand All @@ -79,7 +101,7 @@ int HGCalDigiClient::digisEndjob(const std::vector<MonitorElement*>& hgcalMEs) {
std::vector<MonitorElement*> MeanDigiOccupancy_Minus_;
std::ostringstream name;
double nevent;
int nbinsx, nbinsy;
int nbinsx, nbinsy;

for (int ilayer = 0; ilayer < layers_; ilayer++ ){
//charge
Expand Down
48 changes: 0 additions & 48 deletions Validation/HGCalValidation/plugins/HGCalDigiClient.h

This file was deleted.