diff --git a/Alignment/OfflineValidation/plugins/TrackerOfflineValidationSummary.cc b/Alignment/OfflineValidation/plugins/TrackerOfflineValidationSummary.cc index c3b1474dd2201..3de109aaa0a13 100644 --- a/Alignment/OfflineValidation/plugins/TrackerOfflineValidationSummary.cc +++ b/Alignment/OfflineValidation/plugins/TrackerOfflineValidationSummary.cc @@ -477,24 +477,6 @@ void TrackerOfflineValidationSummary::fillTree(TTree& tree, treeMem.histNameNormY = h->GetName(); } - // Delete module level hists if set in cfg - const bool removeModuleLevelHists(parSet_.getParameter("removeModuleLevelHists")); - if (removeModuleLevelHists) { - dbe_->setCurrentFolder(""); - if (it->second.ResHisto) - dbe_->removeElement(histDir + "/" + it->second.ResHisto->GetName()); - if (it->second.NormResHisto) - dbe_->removeElement(histDir + "/" + it->second.NormResHisto->GetName()); - if (it->second.ResXprimeHisto) - dbe_->removeElement(histDir + "/" + it->second.ResXprimeHisto->GetName()); - if (it->second.NormResXprimeHisto) - dbe_->removeElement(histDir + "/" + it->second.NormResXprimeHisto->GetName()); - if (it->second.ResYprimeHisto) - dbe_->removeElement(histDir + "/" + it->second.ResYprimeHisto->GetName()); - if (it->second.NormResYprimeHisto) - dbe_->removeElement(histDir + "/" + it->second.NormResYprimeHisto->GetName()); - } - tree.Fill(); } } diff --git a/Alignment/OfflineValidation/python/TkAlAllInOneTool/offlineValidationTemplates.py b/Alignment/OfflineValidation/python/TkAlAllInOneTool/offlineValidationTemplates.py index 02e19a2c6e993..ef0d80bae26a0 100644 --- a/Alignment/OfflineValidation/python/TkAlAllInOneTool/offlineValidationTemplates.py +++ b/Alignment/OfflineValidation/python/TkAlAllInOneTool/offlineValidationTemplates.py @@ -64,7 +64,6 @@ ###################################################################### ###################################################################### offlineDqmFileOutputTemplate = """ -process.TrackerOfflineValidationSummary.oO[offlineValidationMode]Oo..removeModuleLevelHists = .oO[offlineModuleLevelHistsTransient]Oo. process.DqmSaverTkAl.workflow = '.oO[workflow]Oo.' process.DqmSaverTkAl.dirName = '.oO[workdir]Oo./.' process.DqmSaverTkAl.forceRunNumber = .oO[firstRunNumber]Oo. diff --git a/Alignment/OfflineValidation/python/TrackerOfflineValidationSummary_cfi.py b/Alignment/OfflineValidation/python/TrackerOfflineValidationSummary_cfi.py index 39257f6656935..3bef79a9d3bda 100644 --- a/Alignment/OfflineValidation/python/TrackerOfflineValidationSummary_cfi.py +++ b/Alignment/OfflineValidation/python/TrackerOfflineValidationSummary_cfi.py @@ -4,7 +4,6 @@ moduleDirectoryInOutput = cms.string("Alignment/Tracker"), # has to be the same as in TrackerOfflineValidation_Dqm_cff useFit = cms.bool(False), stripYDmrs = cms.bool(False), # should be the same as for stripYResiduals in TrackerOfflineValidation_Dqm_cff - removeModuleLevelHists = cms.bool(False), # Remove module level hists after extracting the necessary information minEntriesPerModuleForDmr = cms.uint32(100), # DMR (distribution of median of residuals per module) of X coordinate (Strip) diff --git a/Alignment/OfflineValidation/python/TrackerOfflineValidation_Dqm_cff.py b/Alignment/OfflineValidation/python/TrackerOfflineValidation_Dqm_cff.py index 65e0f996cb8d3..efaf42ec2e027 100644 --- a/Alignment/OfflineValidation/python/TrackerOfflineValidation_Dqm_cff.py +++ b/Alignment/OfflineValidation/python/TrackerOfflineValidation_Dqm_cff.py @@ -32,14 +32,13 @@ TrackerOfflineValidationDqm = TrackerOfflineValidationBinned.clone( useInDqmMode = True, moduleDirectoryInOutput = "Alignment/Tracker", - Tracks = 'TrackRefitterForOfflineValidation', + Tracks = 'TrackRefitterForOfflineValidation' ) ## ## TrackerOfflineValidationSummary ## TrackerOfflineValidationSummaryDqm = TrackerOfflineValidationSummaryBinned.clone( - removeModuleLevelHists = True, minEntriesPerModuleForDmr = 100 ) diff --git a/Alignment/OfflineValidation/test/dqmOfflinevalidator_cfg.py b/Alignment/OfflineValidation/test/dqmOfflinevalidator_cfg.py index 6f3f1ea4b1556..1b7d05c3384db 100644 --- a/Alignment/OfflineValidation/test/dqmOfflinevalidator_cfg.py +++ b/Alignment/OfflineValidation/test/dqmOfflinevalidator_cfg.py @@ -175,7 +175,6 @@ #process.TrackerOfflineValidationDqm.Tracks = 'TrackRefitterP5' #process.TrackerOfflineValidationDqm.trajectoryInput = 'TrackRefitterP5' # Harvesting -#process.TrackerOfflineValidationSummaryDqm.removeModuleLevelHists = False process.TrackerOfflineValidationSummaryDqm.minEntriesPerModuleForDmr = 1 # to allow tests with few statistics # Output File process.DqmSaverTkAl.workflow = "/Cosmics/TkAl09-335patch1_CRAFT09_R_V4_TestFile_CRAFT09reprocessing_WithoutCuts_R000109011_R000109624_ValSkim-v1/ALCARECO" diff --git a/Calibration/EcalCalibAlgos/python/ALCARECOPromptCalibProdEcalPedestals_cff.py b/Calibration/EcalCalibAlgos/python/ALCARECOPromptCalibProdEcalPedestals_cff.py index a55da6ec2ce08..8155cc9fe7175 100644 --- a/Calibration/EcalCalibAlgos/python/ALCARECOPromptCalibProdEcalPedestals_cff.py +++ b/Calibration/EcalCalibAlgos/python/ALCARECOPromptCalibProdEcalPedestals_cff.py @@ -27,7 +27,6 @@ # 2 provide more detailed output Frequency=cms.untracked.int32(50), MEPathToSave=cms.untracked.string('AlCaReco/EcalPedestalsPCL'), - deleteAfterCopy=cms.untracked.bool(True) ) ALCALRECOEcalTCDSDigis = cms.EDProducer('TcdsRawToDigi') diff --git a/Calibration/TkAlCaRecoProducers/python/ALCARECOPromptCalibProdSiStripGainsAAG_cff.py b/Calibration/TkAlCaRecoProducers/python/ALCARECOPromptCalibProdSiStripGainsAAG_cff.py index d5b77e2f77176..191c7acee4697 100644 --- a/Calibration/TkAlCaRecoProducers/python/ALCARECOPromptCalibProdSiStripGainsAAG_cff.py +++ b/Calibration/TkAlCaRecoProducers/python/ALCARECOPromptCalibProdSiStripGainsAAG_cff.py @@ -98,7 +98,6 @@ # 2 provide more detailed output Frequency = cms.untracked.int32(50), MEPathToSave = cms.untracked.string('AlCaReco/SiStripGainsAAG'), - deleteAfterCopy = cms.untracked.bool(True) ) # The actual sequence diff --git a/Calibration/TkAlCaRecoProducers/python/ALCARECOPromptCalibProdSiStripGains_cff.py b/Calibration/TkAlCaRecoProducers/python/ALCARECOPromptCalibProdSiStripGains_cff.py index 2dc06ed7bfadc..5f39af2ae57ee 100644 --- a/Calibration/TkAlCaRecoProducers/python/ALCARECOPromptCalibProdSiStripGains_cff.py +++ b/Calibration/TkAlCaRecoProducers/python/ALCARECOPromptCalibProdSiStripGains_cff.py @@ -99,7 +99,6 @@ # 2 provide more detailed output Frequency = cms.untracked.int32(50), MEPathToSave = cms.untracked.string('AlCaReco/SiStripGains'), - deleteAfterCopy = cms.untracked.bool(True) ) # The actual sequence diff --git a/Calibration/TkAlCaRecoProducers/python/ALCARECOSiStripPCLHistos_cff.py b/Calibration/TkAlCaRecoProducers/python/ALCARECOSiStripPCLHistos_cff.py index b2593ba1acae8..c6f48688bc5ac 100644 --- a/Calibration/TkAlCaRecoProducers/python/ALCARECOSiStripPCLHistos_cff.py +++ b/Calibration/TkAlCaRecoProducers/python/ALCARECOSiStripPCLHistos_cff.py @@ -9,7 +9,6 @@ # 2 provide more detailed output Frequency = cms.untracked.int32(50), MEPathToSave = cms.untracked.string('AlCaReco/SiStrip'), - deleteAfterCopy = cms.untracked.bool(False) ) seqALCARECOSiStripPCLHistos = cms.Sequence(MEtoEDMConvertSiStrip) diff --git a/Calibration/TkAlCaRecoProducers/test/convertSiStripRootDQMFileToEDM_cfg.py b/Calibration/TkAlCaRecoProducers/test/convertSiStripRootDQMFileToEDM_cfg.py index 05bdcf7e341ee..52779cf0542de 100644 --- a/Calibration/TkAlCaRecoProducers/test/convertSiStripRootDQMFileToEDM_cfg.py +++ b/Calibration/TkAlCaRecoProducers/test/convertSiStripRootDQMFileToEDM_cfg.py @@ -46,7 +46,6 @@ ) process.MEtoEDMConvertSiStrip = cms.EDProducer("MEtoEDMConverter", - deleteAfterCopy = cms.untracked.bool(False), Verbosity = cms.untracked.int32(0), Frequency = cms.untracked.int32(50), Name = cms.untracked.string('MEtoEDMConverter'), diff --git a/DQM/BeamMonitor/plugins/AlcaBeamMonitorClient.cc b/DQM/BeamMonitor/plugins/AlcaBeamMonitorClient.cc index 6769fac35cea2..11161d0fa5605 100644 --- a/DQM/BeamMonitor/plugins/AlcaBeamMonitorClient.cc +++ b/DQM/BeamMonitor/plugins/AlcaBeamMonitorClient.cc @@ -63,29 +63,7 @@ AlcaBeamMonitorClient::~AlcaBeamMonitorClient() {} void AlcaBeamMonitorClient::beginJob() {} //---------------------------------------------------------------------------------------------------------------------- -void AlcaBeamMonitorClient::beginRun(const edm::Run& r, const EventSetup& context) { - for (HistosContainer::iterator itM = histosMap_.begin(); itM != histosMap_.end(); itM++) { - for (map >::iterator itMM = itM->second.begin(); itMM != itM->second.end(); - itMM++) { - if (itMM->first != "run") { - for (map::iterator itMMM = itMM->second.begin(); itMMM != itMM->second.end(); - itMMM++) { - if (itMMM->second != nullptr) { - if (itMM->first == "lumi") { - dbe_->removeElement(monitorName_ + "Debug", itMMM->second->getName()); - } else if (itMM->first == "validation") { - dbe_->removeElement(monitorName_ + "Validation", itMMM->second->getName()); - } else { - LogInfo("AlcaBeamMonitorClient") << "Unrecognized category " << itMM->first; - // assert(0); - } - itMMM->second = nullptr; - } - } - } - } - } -} +void AlcaBeamMonitorClient::beginRun(const edm::Run& r, const EventSetup& context) {} //---------------------------------------------------------------------------------------------------------------------- diff --git a/DQM/BeamMonitor/plugins/BeamMonitorBx.cc b/DQM/BeamMonitor/plugins/BeamMonitorBx.cc index 06a7f62c80e0c..2bb7c79e0b777 100644 --- a/DQM/BeamMonitor/plugins/BeamMonitorBx.cc +++ b/DQM/BeamMonitor/plugins/BeamMonitorBx.cc @@ -197,10 +197,6 @@ void BeamMonitorBx::BookTables(int nBx, map& vMap, string suffix tmpName += "_"; tmpName += suffix_; } - if (dbe_->get(monitorName_ + "FitBx/" + tmpName)) { - edm::LogInfo("BX|BeamMonitorBx") << "Rebinning " << tmpName << endl; - dbe_->removeElement(tmpName); - } hs[tmpName] = dbe_->book2D(tmpName, varName->second, 3, 0, 3, nBx, 0, nBx); hs[tmpName]->setBinLabel(1, "bx", 1); diff --git a/DQM/EcalCommon/interface/MESet.h b/DQM/EcalCommon/interface/MESet.h index 98f6a19452b76..5bd8ae16983e7 100644 --- a/DQM/EcalCommon/interface/MESet.h +++ b/DQM/EcalCommon/interface/MESet.h @@ -97,8 +97,6 @@ namespace ecaldqm { virtual bool isVariableBinning() const { return false; } virtual MonitorElement const *getME(unsigned _iME) const { return (_iME < mes_.size() ? mes_[_iME] : nullptr); } virtual MonitorElement *getME(unsigned _iME) { return (_iME < mes_.size() ? mes_[_iME] : nullptr); } - virtual void softReset(); - virtual void recoverStats(); std::string formPath(PathReplacements const &) const; diff --git a/DQM/EcalCommon/interface/MESetDet2D.h b/DQM/EcalCommon/interface/MESetDet2D.h index b8116b93a81ec..63ba73e52d1a2 100644 --- a/DQM/EcalCommon/interface/MESetDet2D.h +++ b/DQM/EcalCommon/interface/MESetDet2D.h @@ -62,8 +62,6 @@ namespace ecaldqm { void reset(double = 0., double = 0., double = 0.) override; - void softReset() override; - protected: void fill_(unsigned, int, double) override; void fill_(unsigned, int, double, double) override; diff --git a/DQM/EcalCommon/src/MESet.cc b/DQM/EcalCommon/src/MESet.cc index 27c01fce34192..9f4c4b199d7c3 100644 --- a/DQM/EcalCommon/src/MESet.cc +++ b/DQM/EcalCommon/src/MESet.cc @@ -243,26 +243,6 @@ namespace ecaldqm { return false; } - void MESet::softReset() { - if (!active_) - return; - - DQMStore &store(*edm::Service()); - - for (unsigned iME(0); iME < mes_.size(); ++iME) - store.softReset(mes_[iME]); - } - - void MESet::recoverStats() { - if (!active_) - return; - - DQMStore &store(*edm::Service()); - - for (unsigned iME(0); iME < mes_.size(); ++iME) - store.disableSoftReset(mes_[iME]); - } - void MESet::fill_(unsigned _iME, int _bin, double _w) { if (kind_ == MonitorElement::Kind::REAL) return; diff --git a/DQM/EcalCommon/src/MESetDet2D.cc b/DQM/EcalCommon/src/MESetDet2D.cc index d2a1a0ae109ea..0acdc2bcfa9c8 100644 --- a/DQM/EcalCommon/src/MESetDet2D.cc +++ b/DQM/EcalCommon/src/MESetDet2D.cc @@ -518,12 +518,6 @@ namespace ecaldqm { } } - void MESetDet2D::softReset() { - MESet::softReset(); - if (!batchMode_ && kind_ == MonitorElement::Kind::TPROFILE2D) - resetAll(0., 0., -1.); - } - void MESetDet2D::fill_(unsigned _iME, int _bin, double _w) { if (kind_ == MonitorElement::Kind::TPROFILE2D) { MonitorElement *me(mes_.at(_iME)); diff --git a/DQM/EcalMonitorDbModule/src/MonitorElementsDb.cc b/DQM/EcalMonitorDbModule/src/MonitorElementsDb.cc index 177bd15a1505c..681341b044707 100644 --- a/DQM/EcalMonitorDbModule/src/MonitorElementsDb.cc +++ b/DQM/EcalMonitorDbModule/src/MonitorElementsDb.cc @@ -99,13 +99,7 @@ MonitorElementsDb::~MonitorElementsDb() { delete parser_; } void MonitorElementsDb::beginJob(void) { ievt_ = 0; } -void MonitorElementsDb::endJob(void) { - std::cout << "MonitorElementsDb: analyzed " << ievt_ << " events" << std::endl; - for (unsigned int i = 0; i < MEs_.size(); i++) { - if (MEs_[i] != nullptr) - dqmStore_->removeElement(MEs_[i]->getName()); - } -} +void MonitorElementsDb::endJob(void) { std::cout << "MonitorElementsDb: analyzed " << ievt_ << " events" << std::endl; } void MonitorElementsDb::analyze(const edm::Event &e, const edm::EventSetup &c, coral::ISessionProxy *session) { ievt_++; diff --git a/DQM/EcalMonitorTasks/interface/DQWorkerTask.h b/DQM/EcalMonitorTasks/interface/DQWorkerTask.h index c1df059a97d47..17eeb697205e5 100644 --- a/DQM/EcalMonitorTasks/interface/DQWorkerTask.h +++ b/DQM/EcalMonitorTasks/interface/DQWorkerTask.h @@ -91,13 +91,8 @@ namespace ecaldqm { // Returns true if the module runs on the collection virtual bool analyze(void const*, Collections) { return false; } - void softReset(); - void recoverStats(); - protected: void setME(edm::ParameterSet const&) final; - - std::set resettable_; }; } // namespace ecaldqm #endif diff --git a/DQM/EcalMonitorTasks/plugins/EcalDQMonitorTask.cc b/DQM/EcalMonitorTasks/plugins/EcalDQMonitorTask.cc index e17b98a9dee54..839a7f3afd6c8 100644 --- a/DQM/EcalMonitorTasks/plugins/EcalDQMonitorTask.cc +++ b/DQM/EcalMonitorTasks/plugins/EcalDQMonitorTask.cc @@ -114,10 +114,6 @@ void EcalDQMonitorTask::dqmBeginRun(edm::Run const& _run, edm::EventSetup const& } void EcalDQMonitorTask::dqmEndRun(edm::Run const& _run, edm::EventSetup const& _es) { - if (lastResetTime_ != 0) - executeOnWorkers_([](ecaldqm::DQWorker* worker) { static_cast(worker)->recoverStats(); }, - "recoverStats"); - ecaldqmEndRun(_run, _es); executeOnWorkers_([](ecaldqm::DQWorker* worker) { worker->releaseMEs(); }, "releaseMEs", "releasing histograms"); @@ -133,9 +129,7 @@ void EcalDQMonitorTask::dqmEndLuminosityBlock(edm::LuminosityBlock const& _lumi, if (lastResetTime_ != 0 && (time(nullptr) - lastResetTime_) / 3600. > resetInterval_) { if (verbosity_ > 0) edm::LogInfo("EcalDQM") << moduleName_ << ": Soft-resetting the histograms"; - executeOnWorkers_([](ecaldqm::DQWorker* worker) { static_cast(worker)->softReset(); }, - "softReset"); - + // TODO: soft-reset is no longer supported. lastResetTime_ = time(nullptr); } } diff --git a/DQM/EcalMonitorTasks/src/DQWorkerTask.cc b/DQM/EcalMonitorTasks/src/DQWorkerTask.cc index a3aad60900c4e..34026cb76fdfd 100644 --- a/DQM/EcalMonitorTasks/src/DQWorkerTask.cc +++ b/DQM/EcalMonitorTasks/src/DQWorkerTask.cc @@ -5,7 +5,7 @@ #include "FWCore/ParameterSet/interface/ParameterSetDescription.h" namespace ecaldqm { - DQWorkerTask::DQWorkerTask() : DQWorker(), resettable_() {} + DQWorkerTask::DQWorkerTask() : DQWorker() {} /*static*/ void DQWorkerTask::fillDescriptions(edm::ParameterSetDescription& _desc) { DQWorker::fillDescriptions(_desc); } @@ -16,27 +16,9 @@ namespace ecaldqm { for (MESetCollection::iterator mItr(MEs_.begin()); mItr != MEs_.end(); ++mItr) { if (willConvertToEDM_) mItr->second->setBatchMode(); - - // TEMPORARY MEASURE - softReset does not accept variable bin size as of September 2012 - // isVariableBinning is true for 1. MESetEcal or MESetNonObject with any custom binning or 2. MESetTrend - // In principle it is sufficient to protect the MESetTrends from being reset - if (mItr->second->getBinType() != ecaldqm::binning::kTrend && !mItr->second->isVariableBinning() && - mItr->second->getKind() != MonitorElement::Kind::REAL) - resettable_.insert(mItr->first); } } - void DQWorkerTask::softReset() { - std::for_each( - resettable_.begin(), resettable_.end(), [this](std::string const& name) { this->MEs_.at(name).softReset(); }); - } - - void DQWorkerTask::recoverStats() { - std::for_each(resettable_.begin(), resettable_.end(), [this](std::string const& name) { - this->MEs_.at(name).recoverStats(); - }); - } - void DependencySet::formSequenceFragment_(Dependency const& _d, std::vector& _sequence, std::vector::iterator _maxPos) const { diff --git a/DQM/EcalPreshowerMonitorClient/python/EcalPreshowerLocalMonitorClient_cfi.py b/DQM/EcalPreshowerMonitorClient/python/EcalPreshowerLocalMonitorClient_cfi.py index 71c1c11388f2b..947308ced4ed2 100644 --- a/DQM/EcalPreshowerMonitorClient/python/EcalPreshowerLocalMonitorClient_cfi.py +++ b/DQM/EcalPreshowerMonitorClient/python/EcalPreshowerLocalMonitorClient_cfi.py @@ -3,7 +3,6 @@ ecalPreshowerLocalMonitorClient = DQMEDHarvester('EcalPreshowerMonitorClient', LookupTable = cms.untracked.FileInPath('EventFilter/ESDigiToRaw/data/ES_lookup_table.dat'), - enableCleanup = cms.untracked.bool(False), enabledClients = cms.untracked.vstring('Pedestal'), prefixME = cms.untracked.string('EcalPreshower'), prescaleFactor = cms.untracked.int32(1), diff --git a/DQM/EcalPreshowerMonitorModule/interface/ESDaqInfoTask.h b/DQM/EcalPreshowerMonitorModule/interface/ESDaqInfoTask.h index b4a17baa03835..e0eaa38e4853b 100644 --- a/DQM/EcalPreshowerMonitorModule/interface/ESDaqInfoTask.h +++ b/DQM/EcalPreshowerMonitorModule/interface/ESDaqInfoTask.h @@ -35,16 +35,11 @@ class ESDaqInfoTask : public edm::EDAnalyzer { /// Reset void reset(void); - /// Cleanup - void cleanup(void); - private: DQMStore* dqmStore_; std::string prefixME_; - bool enableCleanup_; - bool mergeRuns_; MonitorElement* meESDaqFraction_; diff --git a/DQM/EcalPreshowerMonitorModule/interface/ESDataCertificationTask.h b/DQM/EcalPreshowerMonitorModule/interface/ESDataCertificationTask.h index fac18366f86ec..aea99eadbd248 100644 --- a/DQM/EcalPreshowerMonitorModule/interface/ESDataCertificationTask.h +++ b/DQM/EcalPreshowerMonitorModule/interface/ESDataCertificationTask.h @@ -20,15 +20,12 @@ class ESDataCertificationTask : public edm::EDAnalyzer { void endJob(void) override; void beginLuminosityBlock(const edm::LuminosityBlock& lumiBlock, const edm::EventSetup& iSetup) override; void reset(void); - void cleanup(void); private: DQMStore* dqmStore_; std::string prefixME_; - bool enableCleanup_; - bool mergeRuns_; MonitorElement* meESDataCertificationSummary_; diff --git a/DQM/EcalPreshowerMonitorModule/interface/ESDcsInfoTask.h b/DQM/EcalPreshowerMonitorModule/interface/ESDcsInfoTask.h index 095bbeefa7043..f98245911500a 100644 --- a/DQM/EcalPreshowerMonitorModule/interface/ESDcsInfoTask.h +++ b/DQM/EcalPreshowerMonitorModule/interface/ESDcsInfoTask.h @@ -35,16 +35,11 @@ class ESDcsInfoTask : public edm::EDAnalyzer { /// Reset void reset(void); - /// Cleanup - void cleanup(void); - private: DQMStore* dqmStore_; std::string prefixME_; - bool enableCleanup_; - bool mergeRuns_; edm::EDGetTokenT dcsStatustoken_; diff --git a/DQM/EcalPreshowerMonitorModule/python/ESDaqInfoTask_cfi.py b/DQM/EcalPreshowerMonitorModule/python/ESDaqInfoTask_cfi.py index 86fc3ceca7e6c..a221ac94e8869 100644 --- a/DQM/EcalPreshowerMonitorModule/python/ESDaqInfoTask_cfi.py +++ b/DQM/EcalPreshowerMonitorModule/python/ESDaqInfoTask_cfi.py @@ -3,7 +3,6 @@ ecalPreshowerDaqInfoTask = cms.EDAnalyzer("ESDaqInfoTask", esMapping = cms.PSet(LookupTable = cms.FileInPath("EventFilter/ESDigiToRaw/data/ES_lookup_table.dat")), prefixME = cms.untracked.string('EcalPreshower'), - enableCleanup = cms.untracked.bool(False), mergeRuns = cms.untracked.bool(False), ESFedRangeMin = cms.untracked.int32(520), ESFedRangeMax = cms.untracked.int32(575) diff --git a/DQM/EcalPreshowerMonitorModule/python/ESDataCertificationTask_cfi.py b/DQM/EcalPreshowerMonitorModule/python/ESDataCertificationTask_cfi.py index 7f9c9204bcb2e..a05c0fedbec71 100644 --- a/DQM/EcalPreshowerMonitorModule/python/ESDataCertificationTask_cfi.py +++ b/DQM/EcalPreshowerMonitorModule/python/ESDataCertificationTask_cfi.py @@ -2,6 +2,5 @@ ecalPreshowerDataCertificationTask = cms.EDAnalyzer("ESDataCertificationTask", prefixME = cms.untracked.string('EcalPreshower'), - enableCleanup = cms.untracked.bool(False), mergeRuns = cms.untracked.bool(False) ) diff --git a/DQM/EcalPreshowerMonitorModule/python/ESDcsInfoTask_cfi.py b/DQM/EcalPreshowerMonitorModule/python/ESDcsInfoTask_cfi.py index 47ec56fbf262c..e17938804fa1a 100644 --- a/DQM/EcalPreshowerMonitorModule/python/ESDcsInfoTask_cfi.py +++ b/DQM/EcalPreshowerMonitorModule/python/ESDcsInfoTask_cfi.py @@ -2,7 +2,6 @@ ecalPreshowerDcsInfoTask = cms.EDAnalyzer("ESDcsInfoTask", prefixME = cms.untracked.string('EcalPreshower'), - enableCleanup = cms.untracked.bool(False), mergeRuns = cms.untracked.bool(False), DcsStatusLabel = cms.InputTag("scalersRawToDigi") ) diff --git a/DQM/EcalPreshowerMonitorModule/src/ESDaqInfoTask.cc b/DQM/EcalPreshowerMonitorModule/src/ESDaqInfoTask.cc index 4e5ba9015d211..93fdda2b2de21 100644 --- a/DQM/EcalPreshowerMonitorModule/src/ESDaqInfoTask.cc +++ b/DQM/EcalPreshowerMonitorModule/src/ESDaqInfoTask.cc @@ -31,8 +31,6 @@ ESDaqInfoTask::ESDaqInfoTask(const ParameterSet& ps) { prefixME_ = ps.getUntrackedParameter("prefixME", ""); - enableCleanup_ = ps.getUntrackedParameter("enableCleanup", false); - mergeRuns_ = ps.getUntrackedParameter("mergeRuns", false); ESFedRangeMin_ = ps.getUntrackedParameter("ESFedRangeMin", 520); @@ -99,10 +97,7 @@ void ESDaqInfoTask::beginJob(void) { } } -void ESDaqInfoTask::endJob(void) { - if (enableCleanup_) - this->cleanup(); -} +void ESDaqInfoTask::endJob(void) {} void ESDaqInfoTask::beginLuminosityBlock(const edm::LuminosityBlock& lumiBlock, const edm::EventSetup& iSetup) { this->reset(); @@ -183,28 +178,6 @@ void ESDaqInfoTask::reset(void) { meESDaqError_->Reset(); } -void ESDaqInfoTask::cleanup(void) { - if (dqmStore_) { - dqmStore_->setCurrentFolder(prefixME_ + "/EventInfo"); - - if (meESDaqFraction_) - dqmStore_->removeElement(meESDaqFraction_->getName()); - - if (meESDaqActiveMap_) - dqmStore_->removeElement(meESDaqActiveMap_->getName()); - - if (meESDaqError_) - dqmStore_->removeElement(meESDaqError_->getName()); - - dqmStore_->setCurrentFolder(prefixME_ + "/EventInfo/DAQContents"); - - for (int i = 0; i < 56; i++) { - if (meESDaqActive_[i]) - dqmStore_->removeElement(meESDaqActive_[i]->getName()); - } - } -} - void ESDaqInfoTask::analyze(const Event& e, const EventSetup& c) {} DEFINE_FWK_MODULE(ESDaqInfoTask); diff --git a/DQM/EcalPreshowerMonitorModule/src/ESDataCertificationTask.cc b/DQM/EcalPreshowerMonitorModule/src/ESDataCertificationTask.cc index 80bd903d115d9..dc4048e1af51e 100644 --- a/DQM/EcalPreshowerMonitorModule/src/ESDataCertificationTask.cc +++ b/DQM/EcalPreshowerMonitorModule/src/ESDataCertificationTask.cc @@ -27,8 +27,6 @@ ESDataCertificationTask::ESDataCertificationTask(const ParameterSet& ps) { prefixME_ = ps.getUntrackedParameter("prefixME", ""); - enableCleanup_ = ps.getUntrackedParameter("enableCleanup", false); - mergeRuns_ = ps.getUntrackedParameter("mergeRuns", false); meESDataCertificationSummary_ = nullptr; @@ -54,10 +52,7 @@ void ESDataCertificationTask::beginJob(void) { } } -void ESDataCertificationTask::endJob(void) { - if (enableCleanup_) - this->cleanup(); -} +void ESDataCertificationTask::endJob(void) {} void ESDataCertificationTask::beginLuminosityBlock(const edm::LuminosityBlock& lumiBlock, const edm::EventSetup& iSetup) { @@ -72,18 +67,6 @@ void ESDataCertificationTask::reset(void) { meESDataCertificationSummaryMap_->Reset(); } -void ESDataCertificationTask::cleanup(void) { - if (dqmStore_) { - dqmStore_->setCurrentFolder(prefixME_ + "/EventInfo"); - - if (meESDataCertificationSummary_) - dqmStore_->removeElement(meESDataCertificationSummary_->getName()); - - if (meESDataCertificationSummaryMap_) - dqmStore_->removeElement(meESDataCertificationSummaryMap_->getName()); - } -} - void ESDataCertificationTask::analyze(const Event& e, const EventSetup& c) {} DEFINE_FWK_MODULE(ESDataCertificationTask); diff --git a/DQM/EcalPreshowerMonitorModule/src/ESDcsInfoTask.cc b/DQM/EcalPreshowerMonitorModule/src/ESDcsInfoTask.cc index 50d8eb5b47bdc..09dd5d37dbf29 100644 --- a/DQM/EcalPreshowerMonitorModule/src/ESDcsInfoTask.cc +++ b/DQM/EcalPreshowerMonitorModule/src/ESDcsInfoTask.cc @@ -21,8 +21,6 @@ ESDcsInfoTask::ESDcsInfoTask(const ParameterSet& ps) { prefixME_ = ps.getUntrackedParameter("prefixME", ""); - enableCleanup_ = ps.getUntrackedParameter("enableCleanup", false); - mergeRuns_ = ps.getUntrackedParameter("mergeRuns", false); dcsStatustoken_ = consumes(ps.getParameter("DcsStatusLabel")); @@ -49,10 +47,7 @@ void ESDcsInfoTask::beginJob(void) { } } -void ESDcsInfoTask::endJob(void) { - if (enableCleanup_) - this->cleanup(); -} +void ESDcsInfoTask::endJob(void) {} void ESDcsInfoTask::beginLuminosityBlock(const edm::LuminosityBlock& lumiBlock, const edm::EventSetup& iSetup) { this->reset(); @@ -70,18 +65,6 @@ void ESDcsInfoTask::reset(void) { meESDcsActiveMap_->Reset(); } -void ESDcsInfoTask::cleanup(void) { - if (dqmStore_) { - dqmStore_->setCurrentFolder(prefixME_ + "/EventInfo"); - - if (meESDcsFraction_) - dqmStore_->removeElement(meESDcsFraction_->getName()); - - if (meESDcsActiveMap_) - dqmStore_->removeElement(meESDcsActiveMap_->getName()); - } -} - void ESDcsInfoTask::analyze(const Event& e, const EventSetup& c) { ievt_++; diff --git a/DQM/EcalPreshowerMonitorModule/src/ESIntegrityTask.cc b/DQM/EcalPreshowerMonitorModule/src/ESIntegrityTask.cc index 8de522a67aa8c..50731164c6154 100644 --- a/DQM/EcalPreshowerMonitorModule/src/ESIntegrityTask.cc +++ b/DQM/EcalPreshowerMonitorModule/src/ESIntegrityTask.cc @@ -62,9 +62,25 @@ ESIntegrityTask::ESIntegrityTask(const ParameterSet& ps) { ievt_ = 0; } -void ESIntegrityTask::dqmEndRun(const Run& r, const EventSetup& c) {} +void ESIntegrityTask::dqmEndRun(const Run& r, const EventSetup& c) { + // In case of Lumi based analysis Disable SoftReset from Integrity histogram to get full statistics + // TODO: no longer possible, clone histo beforehand if full statisticcs at end of run are required. +} -void ESIntegrityTask::dqmBeginLuminosityBlock(const edm::LuminosityBlock& lumi, const edm::EventSetup& c) {} +void ESIntegrityTask::dqmBeginLuminosityBlock(const edm::LuminosityBlock& lumi, const edm::EventSetup& c) { + LogInfo("ESIntegrityTask") << "analyzed " << ievt_ << " events"; + // In case of Lumi based analysis SoftReset the Integrity histogram + if (doLumiAnalysis_) { + for (int i = 0; i < 2; ++i) { + for (int j = 0; j < 2; ++j) { + if (meDIErrors_[i][j]) { + meDIErrors_[i][j]->Reset(); + } + } + } + ievt_ = 0; + } +} void ESIntegrityTask::dqmEndLuminosityBlock(const edm::LuminosityBlock& lumi, const edm::EventSetup& c) { if (doLumiAnalysis_) diff --git a/DQM/HLTEvF/plugins/FourVectorHLT.cc b/DQM/HLTEvF/plugins/FourVectorHLT.cc index 632321c267a56..f72152962379f 100644 --- a/DQM/HLTEvF/plugins/FourVectorHLT.cc +++ b/DQM/HLTEvF/plugins/FourVectorHLT.cc @@ -161,11 +161,6 @@ void FourVectorHLT::beginJob() { DQMStore* dbe = nullptr; dbe = Service().operator->(); - if (dbe) { - dbe->setCurrentFolder(dirname_); - dbe->rmdir(dirname_); - } - if (dbe) { dbe->setCurrentFolder(dirname_); diff --git a/DQM/HLXMonitor/interface/HLXMonitor.h b/DQM/HLXMonitor/interface/HLXMonitor.h index df82af20069b9..c8f579df69097 100644 --- a/DQM/HLXMonitor/interface/HLXMonitor.h +++ b/DQM/HLXMonitor/interface/HLXMonitor.h @@ -65,8 +65,6 @@ class HLXMonitor : public DQMEDAnalyzer { void FillReportSummary(); void FillEventInfo(const LUMI_SECTION &, const edm::Event &e); - void ResetAll(); - void EndRun(); double getUTCtime(timeval *a, timeval *b = nullptr); @@ -235,8 +233,6 @@ class HLXMonitor : public DQMEDAnalyzer { unsigned int set2BetweenIndex; unsigned int set2AboveIndex; - bool ResetAtNewRun; - std::string eventInfoFolderHLX_; std::string eventInfoFolder_; std::string subSystemName_; diff --git a/DQM/HLXMonitor/python/hlx_dqm_sourceclient_cfi.py b/DQM/HLXMonitor/python/hlx_dqm_sourceclient_cfi.py index e5c8412d757b9..74467e1a6dbc5 100644 --- a/DQM/HLXMonitor/python/hlx_dqm_sourceclient_cfi.py +++ b/DQM/HLXMonitor/python/hlx_dqm_sourceclient_cfi.py @@ -10,7 +10,6 @@ outputFile = cms.untracked.string('DQM_V0001'), # 2 random data - NewRun_Reset = cms.untracked.bool(True), PrimaryHLXDAQIP = cms.untracked.string('vmepcs2f17-18'), SecondaryHLXDAQIP = cms.untracked.string('vmepcs2f17-19'), subSystemName = cms.untracked.string('HLX'), diff --git a/DQM/HLXMonitor/python/hlx_dqm_sourceclient_test_cfi.py b/DQM/HLXMonitor/python/hlx_dqm_sourceclient_test_cfi.py index b466531d09d0c..1354c255a5e3e 100644 --- a/DQM/HLXMonitor/python/hlx_dqm_sourceclient_test_cfi.py +++ b/DQM/HLXMonitor/python/hlx_dqm_sourceclient_test_cfi.py @@ -11,7 +11,6 @@ outputFile = cms.untracked.string('DQM'), # 2 random data - NewRun_Reset = cms.untracked.bool(True), HLXDAQIP = cms.untracked.string('lxplus247'), subSystemName = cms.untracked.string('HLX'), XMIN = cms.untracked.double(100.0), diff --git a/DQM/HLXMonitor/python/hlx_dqm_sourceclient_vme22_cfi.py b/DQM/HLXMonitor/python/hlx_dqm_sourceclient_vme22_cfi.py index 12e1a0a639918..e49c13547071f 100644 --- a/DQM/HLXMonitor/python/hlx_dqm_sourceclient_vme22_cfi.py +++ b/DQM/HLXMonitor/python/hlx_dqm_sourceclient_vme22_cfi.py @@ -8,7 +8,6 @@ outputFile = cms.untracked.string('DQM_V0001'), # 2 random data - NewRun_Reset = cms.untracked.bool(True), PrimaryHLXDAQIP = cms.untracked.string('vmepcs2f17-18'), SecondaryHLXDAQIP = cms.untracked.string('vmepcs2f17-19'), subSystemName = cms.untracked.string('HLX'), diff --git a/DQM/HLXMonitor/src/HLXMonitor.cc b/DQM/HLXMonitor/src/HLXMonitor.cc index 98fdac72abc80..eb1179a652d56 100644 --- a/DQM/HLXMonitor/src/HLXMonitor.cc +++ b/DQM/HLXMonitor/src/HLXMonitor.cc @@ -34,7 +34,6 @@ HLXMonitor::HLXMonitor(const edm::ParameterSet &iConfig) { reconnTime = iConfig.getUntrackedParameter("ReconnectionTime", 5); DistribIP1 = iConfig.getUntrackedParameter("PrimaryHLXDAQIP", "vmepcs2f17-18"); DistribIP2 = iConfig.getUntrackedParameter("SecondaryHLXDAQIP", "vmepcs2f17-19"); - ResetAtNewRun = iConfig.getUntrackedParameter("NewRun_Reset", true); eventInfoFolderHLX_ = iConfig.getUntrackedParameter("eventInfoFolderHLX", "EventInfoHLX"); eventInfoFolder_ = iConfig.getUntrackedParameter("eventInfoFolder", "EventInfo"); @@ -908,8 +907,6 @@ void HLXMonitor::EndRun() { totalNibbles_[iHLX] = 0; std::cout << "** Here in end run **" << std::endl; - if (ResetAtNewRun) - ResetAll(); runNumber_ = 0; currentRunEnded_ = true; sectionInstantSumEt = 0; @@ -1070,10 +1067,6 @@ void HLXMonitor::FillHistograms(const LUMI_SECTION §ion) { sectionInstantErrSumOcc2 += section.lumiSummary.InstantOccLumiErr[1] * section.lumiSummary.InstantOccLumiErr[1]; ++sectionInstantNorm; - LumiInstantEtSum->softReset(); - LumiInstantOccSet1->softReset(); - LumiInstantOccSet2->softReset(); - for (int iHLX = 0; iHLX < (int)NUM_HLX; ++iHLX) { unsigned int utotal1 = 0; unsigned int utotal2 = 0; @@ -1461,103 +1454,6 @@ void HLXMonitor::FillReportSummary() { reportSummary_->Fill(overall); } -void HLXMonitor::ResetAll() { - for (unsigned int iHLX = 0; iHLX < NUM_HLX; ++iHLX) { - Set1Below[iHLX]->softReset(); - Set1Between[iHLX]->softReset(); - Set1Above[iHLX]->softReset(); - Set2Below[iHLX]->softReset(); - Set2Between[iHLX]->softReset(); - Set2Above[iHLX]->softReset(); - ETSum[iHLX]->softReset(); - } - - HFCompareEtSum->softReset(); - HFCompareOccBelowSet1->softReset(); - HFCompareOccBetweenSet1->softReset(); - HFCompareOccAboveSet1->softReset(); - HFCompareOccBelowSet2->softReset(); - HFCompareOccBetweenSet2->softReset(); - HFCompareOccAboveSet2->softReset(); - - AvgEtSum->softReset(); - AvgOccBelowSet1->softReset(); - AvgOccBetweenSet1->softReset(); - AvgOccAboveSet1->softReset(); - AvgOccBelowSet2->softReset(); - AvgOccBetweenSet2->softReset(); - AvgOccAboveSet2->softReset(); - - // Luminosity Monitoring - LumiAvgEtSum->softReset(); - LumiAvgOccSet1->softReset(); - LumiAvgOccSet2->softReset(); - LumiInstantEtSum->softReset(); - LumiInstantOccSet1->softReset(); - LumiInstantOccSet2->softReset(); - LumiIntegratedEtSum->softReset(); - LumiIntegratedOccSet1->softReset(); - LumiIntegratedOccSet2->softReset(); - - // Sanity Check for Occupancy - SumAllOccSet1->softReset(); - SumAllOccSet2->softReset(); - MissingDQMDataCheck->softReset(); - - MaxInstLumiBX1->softReset(); - MaxInstLumiBX2->softReset(); - MaxInstLumiBX3->softReset(); - MaxInstLumiBX4->softReset(); - - MaxInstLumiBXNum1->softReset(); - MaxInstLumiBXNum2->softReset(); - MaxInstLumiBXNum3->softReset(); - MaxInstLumiBXNum4->softReset(); - - // History - lumiSectionCount = 0; - previousSection = 0; - HistAvgEtSumHFP->softReset(); - HistAvgEtSumHFM->softReset(); - - HistAvgOccBelowSet1HFP->softReset(); - HistAvgOccBelowSet1HFM->softReset(); - HistAvgOccBetweenSet1HFP->softReset(); - HistAvgOccBetweenSet1HFM->softReset(); - HistAvgOccAboveSet1HFP->softReset(); - HistAvgOccAboveSet1HFM->softReset(); - - HistAvgOccBelowSet2HFP->softReset(); - HistAvgOccBelowSet2HFM->softReset(); - HistAvgOccBetweenSet2HFP->softReset(); - HistAvgOccBetweenSet2HFM->softReset(); - HistAvgOccAboveSet2HFP->softReset(); - HistAvgOccAboveSet2HFM->softReset(); - - HistAvgLumiEtSum->softReset(); - HistAvgLumiOccSet1->softReset(); - HistAvgLumiOccSet2->softReset(); - HistInstantLumiEtSum->softReset(); - HistInstantLumiOccSet1->softReset(); - HistInstantLumiOccSet2->softReset(); - HistInstantLumiEtSumError->softReset(); - HistInstantLumiOccSet1Error->softReset(); - HistInstantLumiOccSet2Error->softReset(); - HistIntegratedLumiEtSum->softReset(); - HistIntegratedLumiOccSet1->softReset(); - HistIntegratedLumiOccSet2->softReset(); - - RecentInstantLumiEtSum->softReset(); - RecentInstantLumiOccSet1->softReset(); - RecentInstantLumiOccSet2->softReset(); - RecentIntegratedLumiEtSum->softReset(); - RecentIntegratedLumiOccSet1->softReset(); - RecentIntegratedLumiOccSet2->softReset(); - - BXvsTimeAvgEtSumHFP->softReset(); - BXvsTimeAvgEtSumHFM->softReset(); -} - double HLXMonitor::getUTCtime(timeval *a, timeval *b) { double deltaT = (*a).tv_sec * 1000.0 + (*a).tv_usec / 1000.0; if (b != nullptr) diff --git a/DQM/HLXMonitor/test/hlx_dqm_sourceclient_cfi.py b/DQM/HLXMonitor/test/hlx_dqm_sourceclient_cfi.py index 6c381a146c35f..0b348607d7d19 100644 --- a/DQM/HLXMonitor/test/hlx_dqm_sourceclient_cfi.py +++ b/DQM/HLXMonitor/test/hlx_dqm_sourceclient_cfi.py @@ -11,7 +11,6 @@ outputFile = cms.untracked.string('DQM'), # 2 random data - NewRun_Reset = cms.untracked.bool(True), HLXDAQIP = cms.untracked.string('vmepcs2f17-19'), subSystemName = cms.untracked.string('HLX'), XMIN = cms.untracked.double(100.0), diff --git a/DQM/L1TMonitorClient/src/L1EmulatorErrorFlagClient.cc b/DQM/L1TMonitorClient/src/L1EmulatorErrorFlagClient.cc index 7815a30029907..3c9e8264b4df2 100644 --- a/DQM/L1TMonitorClient/src/L1EmulatorErrorFlagClient.cc +++ b/DQM/L1TMonitorClient/src/L1EmulatorErrorFlagClient.cc @@ -72,10 +72,6 @@ void L1EmulatorErrorFlagClient::initialize() { void L1EmulatorErrorFlagClient::dqmEndJob(DQMStore::IBooker& ibooker, DQMStore::IGetter& igetter) { ibooker.setCurrentFolder("L1TEMU/EventInfo"); - if ((m_meSummaryErrorFlagMap = igetter.get("L1TEMU/EventInfo/summaryErrorFlagMap"))) { - igetter.removeElement(m_meSummaryErrorFlagMap->getName()); - } - // define a histogram m_meSummaryErrorFlagMap = ibooker.book1D("L1SummaryErrorFlagMap", "L1SummaryErrorFlagMap", m_nrL1Systems, 1, m_nrL1Systems + 1); diff --git a/DQM/L1TMonitorClient/src/L1TEMTFEventInfoClient.cc b/DQM/L1TMonitorClient/src/L1TEMTFEventInfoClient.cc index f48a8aa6b2f82..1246be3ddabeb 100644 --- a/DQM/L1TMonitorClient/src/L1TEMTFEventInfoClient.cc +++ b/DQM/L1TMonitorClient/src/L1TEMTFEventInfoClient.cc @@ -435,15 +435,6 @@ void L1TEMTFEventInfoClient::book(DQMStore::IBooker& ibooker, DQMStore::IGetter& if (m_verbose) std::cout << "Ran ibooker.setCurrentFolder(dirEventInfo;" << std::endl; - // remove m_meReportSummary if it exists - if ((m_meReportSummary = igetter.get(dirEventInfo + "/reportSummary"))) { - if (m_verbose) - std::cout << "Removing m_meReportSummary" << std::endl; - igetter.removeElement(m_meReportSummary->getName()); - if (m_verbose) - std::cout << "Ran igetter.removeElement(m_meReportSummary->getName());" << std::endl; - } - // ...and book it again m_meReportSummary = ibooker.bookFloat("reportSummary"); if (m_verbose) @@ -593,11 +584,6 @@ void L1TEMTFEventInfoClient::book(DQMStore::IBooker& ibooker, DQMStore::IGetter& if (m_verbose) std::cout << "Ran ibooker.setCurrentFolder(dirEventInfo);" << std::endl; - // Should this be a "==" ? - AWB 03.12.16 - if ((m_meReportSummaryMap = igetter.get(dirEventInfo + "/reportSummaryMap"))) { - igetter.removeElement(m_meReportSummaryMap->getName()); - } - // define a histogram with two bins on X and maximum of m_nrTrackObjects, m_nrHitObjects on Y int nBinsY = std::max(m_nrTrackObjects, m_nrHitObjects); int nBinsYStrip = std::max(m_nrNoisyStrip, m_nrDeadStrip); diff --git a/DQM/L1TMonitorClient/src/L1TEventInfoClient.cc b/DQM/L1TMonitorClient/src/L1TEventInfoClient.cc index aaa0be730d617..48406490e4c7b 100644 --- a/DQM/L1TMonitorClient/src/L1TEventInfoClient.cc +++ b/DQM/L1TMonitorClient/src/L1TEventInfoClient.cc @@ -299,11 +299,6 @@ void L1TEventInfoClient::book(DQMStore::IBooker& ibooker, DQMStore::IGetter& ige ibooker.setCurrentFolder(dirEventInfo); - // remove m_meReportSummary if it exists - if ((m_meReportSummary = igetter.get(dirEventInfo + "/reportSummary"))) { - igetter.removeElement(m_meReportSummary->getName()); - } - // ...and book it again m_meReportSummary = ibooker.bookFloat("reportSummary"); @@ -362,10 +357,6 @@ void L1TEventInfoClient::book(DQMStore::IBooker& ibooker, DQMStore::IGetter& ige ibooker.setCurrentFolder(dirEventInfo); - if ((m_meReportSummaryMap = igetter.get(dirEventInfo + "/reportSummaryMap"))) { - igetter.removeElement(m_meReportSummaryMap->getName()); - } - // define a histogram with two bins on X and maximum of m_nrL1Systems, m_nrL1Objects on Y int nBinsY = std::max(m_nrL1Systems, m_nrL1Objects); diff --git a/DQM/Physics/test/PFJet_topDQM_production_cfg.py b/DQM/Physics/test/PFJet_topDQM_production_cfg.py index dc1fb2c95c8a8..e750e0a8ab0b4 100644 --- a/DQM/Physics/test/PFJet_topDQM_production_cfg.py +++ b/DQM/Physics/test/PFJet_topDQM_production_cfg.py @@ -125,7 +125,6 @@ process.MessageLogger.cerr.FwkReport.reportEvery = 1 -process.MEtoEDMConverter.deleteAfterCopy = cms.untracked.bool(False) ## line added to avoid crash when changing run number ## path definitions diff --git a/DQM/Physics/test/topDQM_production_PU_cfg.py b/DQM/Physics/test/topDQM_production_PU_cfg.py index c427437855e0f..fc985b3a71598 100644 --- a/DQM/Physics/test/topDQM_production_PU_cfg.py +++ b/DQM/Physics/test/topDQM_production_PU_cfg.py @@ -103,7 +103,6 @@ #process.MessageLogger.categories.append('TopDiLeptonOfflineDQM') #process.MessageLogger.cerr.TopDiLeptonOfflineDQM = cms.untracked.PSet(limit = cms.untracked.int32(1)) process.MessageLogger.cerr.FwkReport.reportEvery = 1000 -process.MEtoEDMConverter.deleteAfterCopy = cms.untracked.bool(False) ## line added to avoid crash when changing run number ## path definitions @@ -214,7 +213,6 @@ process.MessageLogger.categories.append('TopDiLeptonOfflineDQM') process.MessageLogger.cerr.TopDiLeptonOfflineDQM = cms.untracked.PSet(limit = cms.untracked.int32(1)) -process.MEtoEDMConverter.deleteAfterCopy = cms.untracked.bool(False) ## line added to avoid crash when changing run number ## path definitions diff --git a/DQM/Physics/test/topDQM_production_cfg.py b/DQM/Physics/test/topDQM_production_cfg.py index 9eddc3c4641e7..337f0a7930121 100644 --- a/DQM/Physics/test/topDQM_production_cfg.py +++ b/DQM/Physics/test/topDQM_production_cfg.py @@ -93,7 +93,6 @@ process.MessageLogger.categories.append('SingleTopTChannelLeptonDQM' ) process.MessageLogger.cerr.SingleTopTChannelLeptonDQM = cms.untracked.PSet(limit = cms.untracked.int32(1)) process.MessageLogger.cerr.FwkReport.reportEvery = 100 -process.MEtoEDMConverter.deleteAfterCopy = cms.untracked.bool(False) ## line added to avoid crash when changing run number process.load("DQM.Physics.topSingleLeptonDQM_cfi") diff --git a/DQM/Physics/test/topDQM_production_miniAOD.py b/DQM/Physics/test/topDQM_production_miniAOD.py index 8ee8119e47fa0..4350dcb3840e3 100644 --- a/DQM/Physics/test/topDQM_production_miniAOD.py +++ b/DQM/Physics/test/topDQM_production_miniAOD.py @@ -88,7 +88,6 @@ process.MessageLogger.categories.append('SingleTopTChannelLeptonDQM' ) process.MessageLogger.cerr.SingleTopTChannelLeptonDQM = cms.untracked.PSet(limit = cms.untracked.int32(1)) process.MessageLogger.cerr.FwkReport.reportEvery = 100 -process.MEtoEDMConverter.deleteAfterCopy = cms.untracked.bool(False) ## line added to avoid crash when changing run number process.load("DQM.Physics.topSingleLeptonDQM_miniAOD_cfi") diff --git a/DQM/SiStripCommissioningClients/src/CommissioningHistograms.cc b/DQM/SiStripCommissioningClients/src/CommissioningHistograms.cc index 95d3a7c047638..18729eef67638 100644 --- a/DQM/SiStripCommissioningClients/src/CommissioningHistograms.cc +++ b/DQM/SiStripCommissioningClients/src/CommissioningHistograms.cc @@ -603,44 +603,7 @@ void CommissioningHistograms::createSummaryHisto(const sistrip::Monitorable& mon // ----------------------------------------------------------------------------- /** */ void CommissioningHistograms::remove(std::string pattern) { - if (!bei_) { - edm::LogError(mlDqmClient_) << "[CommissioningHistograms::" << __func__ << "]" - << " NULL pointer to DQMStore!"; - return; - } - - LogTrace(mlDqmClient_) << "[CommissioningHistograms::" << __func__ << "]" - << " Removing histograms..."; - - if (!pattern.empty()) { - if (bei_->dirExists(pattern)) { - bei_->rmdir(pattern); - } - - LogTrace(mlDqmClient_) << "[CommissioningHistograms::" << __func__ << "]" - << " Removing directories (and MonitorElements" - << " therein) that match the pattern \"" << pattern << "\""; - - } else { - bei_->cd(); - bei_->removeContents(); - - if (bei_->dirExists("Collector")) { - bei_->rmdir("Collector"); - } - if (bei_->dirExists("EvF")) { - bei_->rmdir("EvF"); - } - if (bei_->dirExists("SiStrip")) { - bei_->rmdir("SiStrip"); - } - - LogTrace(mlDqmClient_) << "[CommissioningHistograms::" << __func__ << "]" - << " Removing \"DQM source\" directories (and MonitorElements therein)"; - } - - LogTrace(mlDqmClient_) << "[CommissioningHistograms::" << __func__ << "]" - << " Removed histograms!"; + // TODO: remove no longer supported in DQMStore. } // ----------------------------------------------------------------------------- @@ -704,12 +667,7 @@ TH1* CommissioningHistograms::histogram(const sistrip::Monitorable& mon, // Construct histogram name std::string name = SummaryGenerator::name(task_, mon, pres, view, directory); - // Check if summary plot already exists and remove MonitorElement* me = bei_->get(bei_->pwd() + "/" + name); - if (me) { - bei_->removeElement(name); - me = nullptr; - } // Create summary plot float high = static_cast(xbins); diff --git a/DQM/SiStripCommissioningSources/src/SiStripCommissioningSource.cc b/DQM/SiStripCommissioningSources/src/SiStripCommissioningSource.cc index 20ea5ae5986eb..1cc0fb56e79fb 100644 --- a/DQM/SiStripCommissioningSources/src/SiStripCommissioningSource.cc +++ b/DQM/SiStripCommissioningSources/src/SiStripCommissioningSource.cc @@ -1076,12 +1076,7 @@ void SiStripCommissioningSource::clearTasks() { // ---------------------------------------------------------------------------- // void SiStripCommissioningSource::remove() { - dqm()->cd(); - dqm()->removeContents(); - - if (dqm()->dirExists(sistrip::root_)) { - dqm()->rmdir(sistrip::root_); - } + // TODO: remove no longer supported in DQMStore. } // ----------------------------------------------------------------------------- diff --git a/DQM/TrackingMonitor/interface/TrackAnalyzer.h b/DQM/TrackingMonitor/interface/TrackAnalyzer.h index ac8d7fc521c8f..78347770d83de 100644 --- a/DQM/TrackingMonitor/interface/TrackAnalyzer.h +++ b/DQM/TrackingMonitor/interface/TrackAnalyzer.h @@ -39,9 +39,7 @@ class TrackAnalyzer { void analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup, const reco::Track& track); - void doSoftReset(DQMStore* dqmStore_); void doReset(); - void undoSoftReset(DQMStore* dqmStore_); void setLumiFlag(); // Compute and locally store the number of Good vertices found // in the event. This information is used as X-axis value in diff --git a/DQM/TrackingMonitor/src/TrackAnalyzer.cc b/DQM/TrackingMonitor/src/TrackAnalyzer.cc index 6b2318f95dadb..bd8584b5499d0 100644 --- a/DQM/TrackingMonitor/src/TrackAnalyzer.cc +++ b/DQM/TrackingMonitor/src/TrackAnalyzer.cc @@ -2444,14 +2444,6 @@ void TrackAnalyzer::setLumiFlag() { NumberOfRecHitsPerTrack_lumiFlag->setLumiFlag(); } // -// -- Apply SoftReset -// -void TrackAnalyzer::doSoftReset(DQMStore* dqmStore_) { - TkParameterMEs tkmes; - dqmStore_->softReset(Chi2oNDF); - dqmStore_->softReset(NumberOfRecHitsPerTrack); -} -// // -- Apply Reset // void TrackAnalyzer::doReset() { @@ -2461,11 +2453,3 @@ void TrackAnalyzer::doReset() { if (NumberOfRecHitsPerTrack_lumiFlag) NumberOfRecHitsPerTrack_lumiFlag->Reset(); } -// -// -- Remove SoftReset -// -void TrackAnalyzer::undoSoftReset(DQMStore* dqmStore_) { - TkParameterMEs tkmes; - dqmStore_->disableSoftReset(Chi2oNDF); - dqmStore_->disableSoftReset(NumberOfRecHitsPerTrack); -} diff --git a/DQMOffline/EGamma/plugins/PhotonOfflineClient.cc b/DQMOffline/EGamma/plugins/PhotonOfflineClient.cc index a006cae8abf37..94f998665a53e 100644 --- a/DQMOffline/EGamma/plugins/PhotonOfflineClient.cc +++ b/DQMOffline/EGamma/plugins/PhotonOfflineClient.cc @@ -91,10 +91,6 @@ void PhotonOfflineClient::runClient(DQMStore::IBooker& iBooker, DQMStore::IGette histo_index_invMass_ = iGetter.get("Egamma/" + analyzerName_ + "/numberOfHistogramsInInvMassFolder")->getIntValue(); iGetter.setCurrentFolder("Egamma/" + analyzerName_ + "/"); - iGetter.removeElement("numberOfHistogramsInPhotonsFolder"); - iGetter.removeElement("numberOfHistogramsInConversionsFolder"); - iGetter.removeElement("numberOfHistogramsInEfficiencyFolder"); - iGetter.removeElement("numberOfHistogramsInInvMassFolder"); string AllPath = "Egamma/" + analyzerName_ + "/AllPhotons/"; string IsoPath = "Egamma/" + analyzerName_ + "/GoodCandidatePhotons/"; @@ -296,20 +292,6 @@ void PhotonOfflineClient::runClient(DQMStore::IBooker& iBooker, DQMStore::IGette iGetter.setCurrentFolder(EffPath); - iGetter.removeElement("phoEtaPreHLT"); - iGetter.removeElement("phoEtPreHLT"); - iGetter.removeElement("phoEtaPostHLT"); - iGetter.removeElement("phoEtPostHLT"); - iGetter.removeElement("phoEtaLoose"); - iGetter.removeElement("phoEtaTight"); - iGetter.removeElement("phoEtLoose"); - iGetter.removeElement("phoEtTight"); - iGetter.removeElement("phoEtaVertex"); - iGetter.removeElement("convEtaLoose"); - iGetter.removeElement("convEtaTight"); - iGetter.removeElement("convEtLoose"); - iGetter.removeElement("convEtTight"); - for (uint type = 0; type != types_.size(); ++type) { for (int cut = 0; cut != numberOfSteps_; ++cut) { currentFolder_.str(""); @@ -365,10 +347,6 @@ void PhotonOfflineClient::runClient(DQMStore::IBooker& iBooker, DQMStore::IGette dividePlots(dividend, numerator, denominator); iGetter.setCurrentFolder(currentFolder_.str() + "Conversions/"); - iGetter.removeElement("phoConvEtaForEfficiency"); - iGetter.removeElement("phoConvPhiForEfficiencyAllEcal"); - iGetter.removeElement("phoConvPhiForEfficiencyBarrel"); - iGetter.removeElement("phoConvPhiForEfficiencyEndcaps"); } } diff --git a/DQMOffline/EGamma/src/ElectronDqmHarvesterBase.cc b/DQMOffline/EGamma/src/ElectronDqmHarvesterBase.cc index 3d26b66a7fd64..474b5b2f37ddb 100644 --- a/DQMOffline/EGamma/src/ElectronDqmHarvesterBase.cc +++ b/DQMOffline/EGamma/src/ElectronDqmHarvesterBase.cc @@ -132,11 +132,7 @@ ElectronDqmHarvesterBase::MonitorElement *ElectronDqmHarvesterBase::get(DQMStore } void ElectronDqmHarvesterBase::remove(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, const std::string &name) { - const std::string *fullName = find(iGetter, name); - if (fullName) { - iBooker.setCurrentFolder(inputInternalPath_); - iGetter.removeElement(*fullName); - } + // TODO: remove no longer supported in DQMStore. } ElectronDqmHarvesterBase::MonitorElement *ElectronDqmHarvesterBase::bookH1andDivide(DQMStore::IBooker &iBooker, diff --git a/DQMOffline/PFTau/plugins/PFClient.cc b/DQMOffline/PFTau/plugins/PFClient.cc index 7e1df683d1037..701569afe3d21 100644 --- a/DQMOffline/PFTau/plugins/PFClient.cc +++ b/DQMOffline/PFTau/plugins/PFClient.cc @@ -162,8 +162,6 @@ void PFClient::createResolutionPlots(DQMStore::IBooker &ibooker, me_mean->setBinContent(ix, mean); me_sigma->setBinContent(ix, sigma); } - if (me_slice) - igetter.removeElement(me_slice->getName()); //? delete[] xbins; } } diff --git a/DQMOffline/PFTau/plugins/PFClient_JetRes.cc b/DQMOffline/PFTau/plugins/PFClient_JetRes.cc index 8c8762500c0e8..1216113f0e504 100644 --- a/DQMOffline/PFTau/plugins/PFClient_JetRes.cc +++ b/DQMOffline/PFTau/plugins/PFClient_JetRes.cc @@ -167,7 +167,6 @@ void PFClient_JetRes::createResolutionPlots(DQMStore::IBooker &ibooker, me_mean->setBinContent(ix, mean); me_sigma->setBinContent(ix, sigma); } - // if (me_slice) igetter.removeElement(me_slice->getName()); delete[] xbins; } } diff --git a/DQMOffline/Trigger/plugins/DQMOfflineHLTEventInfoClient.cc b/DQMOffline/Trigger/plugins/DQMOfflineHLTEventInfoClient.cc index 5fe9789cfbc88..292727590bd97 100644 --- a/DQMOffline/Trigger/plugins/DQMOfflineHLTEventInfoClient.cc +++ b/DQMOffline/Trigger/plugins/DQMOfflineHLTEventInfoClient.cc @@ -124,25 +124,12 @@ void DQMOfflineHLTEventInfoClient::beginJob() { dbe_->setCurrentFolder("HLT/EventInfo"); - // reportSummary - reportSummary_ = dbe_->get("HLT/EventInfo/reportSummary"); - - if (reportSummary_) { - dbe_->removeElement(reportSummary_->getName()); - } - reportSummary_ = dbe_->bookFloat("reportSummary"); //initialize reportSummary to 1 if (reportSummary_) reportSummary_->Fill(1); // CertificationSummary - CertificationSummary_ = dbe_->get("HLT/EventInfo/CertificationSummary"); - - if (CertificationSummary_) { - dbe_->removeElement(CertificationSummary_->getName()); - } - CertificationSummary_ = dbe_->bookFloat("CertificationSummary"); //initialize CertificationSummary to 1 if (CertificationSummary_) @@ -157,11 +144,6 @@ void DQMOfflineHLTEventInfoClient::beginJob() { // reportSummaryMap dbe_->setCurrentFolder("HLT/EventInfo"); - reportSummaryMap_ = dbe_->get("HLT/EventInfo/reportSummaryMap"); - if (reportSummaryMap_) { - dbe_->removeElement(reportSummaryMap_->getName()); - } - reportSummaryMap_ = dbe_->book2D("reportSummaryMap", "reportSummaryMap", 1, 1, 2, 6, 1, 7); reportSummaryMap_->setAxisTitle("", 1); reportSummaryMap_->setAxisTitle("", 2); @@ -173,11 +155,6 @@ void DQMOfflineHLTEventInfoClient::beginJob() { reportSummaryMap_->setBinLabel(6, "Tau", 2); reportSummaryMap_->setBinLabel(1, " ", 1); - CertificationSummaryMap_ = dbe_->get("HLT/EventInfo/CertificationSummaryMap"); - if (CertificationSummaryMap_) { - dbe_->removeElement(CertificationSummaryMap_->getName()); - } - CertificationSummaryMap_ = dbe_->book2D("CertificationSummaryMap", "CertificationSummaryMap", 1, 1, 2, 6, 1, 7); CertificationSummaryMap_->setAxisTitle("", 1); CertificationSummaryMap_->setAxisTitle("", 2); diff --git a/DQMServices/ClientConfig/interface/DQMGenericClient.h b/DQMServices/ClientConfig/interface/DQMGenericClient.h index 1e6e602c197be..ed49787e21aa0 100644 --- a/DQMServices/ClientConfig/interface/DQMGenericClient.h +++ b/DQMServices/ClientConfig/interface/DQMGenericClient.h @@ -135,8 +135,6 @@ class DQMGenericClient : public DQMEDHarvester { void makeAllPlots(DQMStore::IBooker&, DQMStore::IGetter&); - void removeMEIfBooked(const std::string& meName, DQMStore::IGetter& igetter); - #if ROOT_VERSION_CODE >= ROOT_VERSION(5, 27, 0) #else diff --git a/DQMServices/ClientConfig/plugins/DQMGenericClient.cc b/DQMServices/ClientConfig/plugins/DQMGenericClient.cc index f1cfc48d112e1..eb9879e8f9d41 100644 --- a/DQMServices/ClientConfig/plugins/DQMGenericClient.cc +++ b/DQMServices/ClientConfig/plugins/DQMGenericClient.cc @@ -552,7 +552,6 @@ void DQMGenericClient::computeEfficiency(DQMStore::IBooker& ibooker, efficHist->SetBinEntries(i, 1); efficHist->SetBinError(i, std::hypot(effVal, errVal)); } - removeMEIfBooked(newEfficMEName, igetter); ibooker.bookProfile(newEfficMEName, efficHist); delete efficHist; } @@ -572,13 +571,10 @@ void DQMGenericClient::computeEfficiency(DQMStore::IBooker& ibooker, TString histClassName = myHistClass->GetName(); if (histClassName == "TH1F") { - removeMEIfBooked(newEfficMEName, igetter); efficME = ibooker.book1D(newEfficMEName, (TH1F*)efficHist); } else if (histClassName == "TH2F") { - removeMEIfBooked(newEfficMEName, igetter); efficME = ibooker.book2D(newEfficMEName, (TH2F*)efficHist); } else if (histClassName == "TH3F") { - removeMEIfBooked(newEfficMEName, igetter); efficME = ibooker.book3D(newEfficMEName, (TH3F*)efficHist); } @@ -699,8 +695,6 @@ void DQMGenericClient::computeResolution(DQMStore::IBooker& ibooker, float* lowedgesfloats = new float[nBin + 1]; ME* meanME; ME* sigmaME; - removeMEIfBooked(newPrefix + "_Mean", igetter); - removeMEIfBooked(newPrefix + "_Sigme", igetter); if (hSrc->GetXaxis()->GetXbins()->GetSize()) { for (int j = 0; j < nBin + 1; ++j) lowedgesfloats[j] = (float)hSrc->GetXaxis()->GetXbins()->GetAt(j); @@ -774,7 +768,6 @@ void DQMGenericClient::computeProfile(DQMStore::IBooker& ibooker, std::unique_ptr profile(hSrc->ProfileX()); // We own the pointer profile->SetTitle(profileMETitle.c_str()); - removeMEIfBooked(profileMEName, igetter); ibooker.bookProfile(profileMEName, profile.get()); // ibooker makes a copy } @@ -1070,10 +1063,4 @@ void DQMGenericClient::generic_eff(TH1* denom, TH1* numer, MonitorElement* effic //efficiencyHist->setMaximum(1.0); } -void DQMGenericClient::removeMEIfBooked(const std::string& meName, DQMStore::IGetter& igetter) { - if (igetter.get(meName)) { - igetter.removeElement(meName); - } -} - /* vim:set ts=2 sts=2 sw=2 expandtab: */ diff --git a/DQMServices/Components/plugins/DQMMessageLoggerClient.cc b/DQMServices/Components/plugins/DQMMessageLoggerClient.cc index c8f45f63b74b8..234ce190c2b22 100644 --- a/DQMServices/Components/plugins/DQMMessageLoggerClient.cc +++ b/DQMServices/Components/plugins/DQMMessageLoggerClient.cc @@ -83,8 +83,6 @@ void DQMMessageLoggerClient::fillHistograms() { case 1: theDbe->setCurrentFolder(directoryName + "/Warnings"); modulesWarningsFound = theDbe->get(directoryName + "/Warnings/modulesWarningsFound"); - if (modulesWarningsFound) - theDbe->removeElement(modulesWarningsFound->getName()); if (nonzeros > 0) { modulesWarningsFound = theDbe->book1D( "modulesWarningsFound", "Warnings per module", binContent.size(), 0, binContent.size()); @@ -106,8 +104,6 @@ void DQMMessageLoggerClient::fillHistograms() { case 2: theDbe->setCurrentFolder(directoryName + "/Errors"); modulesErrorsFound = theDbe->get(directoryName + "/Errors/modulesErrorsFound"); - if (modulesErrorsFound) - theDbe->removeElement(modulesErrorsFound->getName()); if (nonzeros > 0) { modulesErrorsFound = theDbe->book1D("modulesErrorsFound", "Errors per module", binContent.size(), 0, binContent.size()); @@ -128,8 +124,6 @@ void DQMMessageLoggerClient::fillHistograms() { case 3: theDbe->setCurrentFolder(directoryName + "/Warnings"); categoriesWarningsFound = theDbe->get(directoryName + "/Warnings/categoriesWarningsFound"); - if (categoriesWarningsFound) - theDbe->removeElement(categoriesWarningsFound->getName()); if (nonzeros > 0) { categoriesWarningsFound = theDbe->book1D( "categoriesWarningsFound", "Warnings per category", binContent.size(), 0, binContent.size()); @@ -151,8 +145,6 @@ void DQMMessageLoggerClient::fillHistograms() { case 4: theDbe->setCurrentFolder(directoryName + "/Errors"); categoriesErrorsFound = theDbe->get(directoryName + "/Errors/categoriesErrorsFound"); - if (categoriesErrorsFound) - theDbe->removeElement(categoriesErrorsFound->getName()); if (nonzeros > 0) { categoriesErrorsFound = theDbe->book1D( "categoriesErrorsFound", "Errors per category", binContent.size(), 0, binContent.size()); diff --git a/DQMServices/Components/plugins/MEtoEDMConverter.cc b/DQMServices/Components/plugins/MEtoEDMConverter.cc index d25414be0fe45..1a99e334e6714 100644 --- a/DQMServices/Components/plugins/MEtoEDMConverter.cc +++ b/DQMServices/Components/plugins/MEtoEDMConverter.cc @@ -17,8 +17,7 @@ using namespace lat; -MEtoEDMConverter::MEtoEDMConverter(const edm::ParameterSet& iPSet) - : fName(""), verbosity(0), frequency(0), deleteAfterCopy(false) { +MEtoEDMConverter::MEtoEDMConverter(const edm::ParameterSet& iPSet) : fName(""), verbosity(0), frequency(0) { std::string MsgLoggerCat = "MEtoEDMConverter_MEtoEDMConverter"; // get information from parameter set @@ -26,7 +25,6 @@ MEtoEDMConverter::MEtoEDMConverter(const edm::ParameterSet& iPSet) verbosity = iPSet.getUntrackedParameter("Verbosity", 0); frequency = iPSet.getUntrackedParameter("Frequency", 50); path = iPSet.getUntrackedParameter("MEPathToSave"); - deleteAfterCopy = iPSet.getUntrackedParameter("deleteAfterCopy", false); enableMultiThread_ = false; // use value of first digit to determine default output level (inclusive) // 0 is none, 1 is basic, 2 is fill output, 3 is gather output @@ -101,10 +99,7 @@ void MEtoEDMConverter::globalEndRun(edm::Run const& iRun, const edm::EventSetup& void MEtoEDMConverter::endRunProduce(edm::Run& iRun, const edm::EventSetup& iSetup) { DQMStore* store = edm::Service().operator->(); - store->meBookerGetter([&](DQMStore::IBooker& b, DQMStore::IGetter& g) { - store->scaleElements(); - putData(g, iRun, false, iRun.run(), 0); - }); + store->meBookerGetter([&](DQMStore::IBooker& b, DQMStore::IGetter& g) { putData(g, iRun, false, iRun.run(), 0); }); } std::shared_ptr MEtoEDMConverter::globalBeginLuminosityBlock(edm::LuminosityBlock const&, @@ -291,12 +286,6 @@ void MEtoEDMConverter::putData(DQMStore::IGetter& iGetter, T& iPutTo, bool iLumi continue; } - if (!iLumiOnly) { - // remove ME after copy to EDM is done. - if (deleteAfterCopy) { - iGetter.removeElement(me->getPathname(), me->getName()); - } - } } // end loop through monitor elements std::string sName; diff --git a/DQMServices/Components/plugins/MEtoEDMConverter.h b/DQMServices/Components/plugins/MEtoEDMConverter.h index f2c826bbe4abc..8ee9cefa2168e 100644 --- a/DQMServices/Components/plugins/MEtoEDMConverter.h +++ b/DQMServices/Components/plugins/MEtoEDMConverter.h @@ -87,7 +87,6 @@ class MEtoEDMConverter : public edm::one::EDProducer, std::string fName; int verbosity; int frequency; - bool deleteAfterCopy; bool enableMultiThread_; std::string path; diff --git a/DQMServices/Components/python/MEtoEDMConverter_cfi.py b/DQMServices/Components/python/MEtoEDMConverter_cfi.py index a2542b94715cd..1573fcbd19648 100644 --- a/DQMServices/Components/python/MEtoEDMConverter_cfi.py +++ b/DQMServices/Components/python/MEtoEDMConverter_cfi.py @@ -7,6 +7,5 @@ # 2 provide more detailed output Frequency = cms.untracked.int32(50), MEPathToSave = cms.untracked.string(''), - deleteAfterCopy = cms.untracked.bool(True) ) diff --git a/DQMServices/Core/bin/BuildFile.xml b/DQMServices/Core/bin/BuildFile.xml deleted file mode 100644 index 522fc35dee52c..0000000000000 --- a/DQMServices/Core/bin/BuildFile.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/DQMServices/Core/bin/DQMCollector.cpp b/DQMServices/Core/bin/DQMCollector.cpp deleted file mode 100644 index debc73a395522..0000000000000 --- a/DQMServices/Core/bin/DQMCollector.cpp +++ /dev/null @@ -1,76 +0,0 @@ -#undef WITHOUT_CMS_FRAMEWORK -#define WITHOUT_CMS_FRAMEWORK 1 -#include "DQMServices/Core/interface/DQMNet.h" -#include "DQMServices/Core/src/DQMNet.cc" -#include "DQMServices/Core/src/DQMError.cc" -/* NB: Avoids picking up the entire DQMServices/Core - library, and in particular avoids ROOT. */ -#include "classlib/utils/DebugAids.h" -#include "classlib/utils/Signal.h" -#include -#include -#include -#include - -static const int FATAL_OPTS = (lat::Signal::FATAL_DEFAULT & ~(lat::Signal::FATAL_ON_INT | lat::Signal::FATAL_ON_QUIT | - lat::Signal::FATAL_DUMP_CORE)); - -volatile sig_atomic_t s_stop = 0; -static void interrupt(int /*sig*/) { s_stop = 1; } - -class DQMCollector : public DQMBasicNet { -public: - bool shouldStop() override { return s_stop != 0; } - - DQMCollector(char *appname, int port, bool debugging) : DQMBasicNet(appname) { - // Establish the server side. - debug(debugging); - startLocalServer(port); - } -}; - -////////////////////////////////////////////////////////////////////// -// Always abort on assertion failure. -static char onAssertFail(const char *message) { - std::cout.flush(); - fflush(stdout); - std::cerr.flush(); - fflush(stderr); - std::cerr << message << "ABORTING\n"; - return 'a'; -} - -////////////////////////////////////////////////////////////////////// -// Run the main program. -int main(int argc, char **argv) { - lat::DebugAids::failHook(&onAssertFail); - lat::Signal::handleFatal(argv[0], IOFD_INVALID, nullptr, nullptr, FATAL_OPTS); - lat::Signal::handle(SIGINT, (lat::Signal::HandlerType)&interrupt); - lat::Signal::ignore(SIGPIPE); - - // Check and process arguments. - int port = 9090; - bool debug = false; - bool bad = false; - for (int i = 1; i < argc; ++i) - if (i < argc - 1 && !strcmp(argv[i], "--listen")) - port = atoi(argv[++i]); - else if (!strcmp(argv[i], "--debug")) - debug = true; - else if (!strcmp(argv[i], "--no-debug")) - debug = false; - else { - bad = true; - break; - } - - if (bad || !port) { - std::cerr << "Usage: " << argv[0] << " --listen PORT [--[no-]debug]\n"; - return 1; - } - - // Start serving. - DQMCollector server(argv[0], port, debug); - server.run(); - exit(0); -} diff --git a/DQMServices/Core/bin/DumpFile.cpp b/DQMServices/Core/bin/DumpFile.cpp deleted file mode 100644 index 7bd49605980e8..0000000000000 --- a/DQMServices/Core/bin/DumpFile.cpp +++ /dev/null @@ -1,219 +0,0 @@ -#include "DQMServices/Core/interface/Standalone.h" -#include "DQMServices/Core/interface/DQMStore.h" -#include "DQMServices/Core/interface/MonitorElement.h" -#include "classlib/utils/DebugAids.h" -#include "classlib/utils/Signal.h" -#include "TROOT.h" -#include -#include - -#ifndef _NSIG -#define _NSIG NSIG -#endif - -typedef dqm::legacy::DQMStore DQMStore; -typedef dqm::legacy::MonitorElement MonitorElement; - -struct MEInfo { - int runnr; - std::string system; - std::string category; - std::string name; - std::string data; - char style; -}; - -static const int FATAL_OPTS = (lat::Signal::FATAL_DEFAULT & ~(lat::Signal::FATAL_ON_INT | lat::Signal::FATAL_ON_QUIT | - lat::Signal::FATAL_DUMP_CORE)); - -// ------------------------------------------------------------------- -// Always abort on assertion failure. -static char onAssertFail(const char *message) { - std::cout.flush(); - fflush(stdout); - std::cerr.flush(); - fflush(stderr); - std::cerr << message << "ABORTING\n"; - return 'a'; -} - -static const char *kindToName(MonitorElement::Kind kind) { - switch (kind) { - case MonitorElement::Kind::INVALID: - return "INVALID"; - case MonitorElement::Kind::INT: - return "INT"; - case MonitorElement::Kind::REAL: - return "REAL"; - case MonitorElement::Kind::STRING: - return "STRING"; - case MonitorElement::Kind::TH1F: - return "TH1F"; - case MonitorElement::Kind::TH1S: - return "TH1S"; - case MonitorElement::Kind::TH1D: - return "TH1D"; - case MonitorElement::Kind::TH2F: - return "TH2F"; - case MonitorElement::Kind::TH2S: - return "TH2S"; - case MonitorElement::Kind::TH2D: - return "TH2D"; - case MonitorElement::Kind::TH3F: - return "TH3F"; - case MonitorElement::Kind::TPROFILE: - return "TPROFILE"; - case MonitorElement::Kind::TPROFILE2D: - return "TPROFILE2D"; - default: - assert(false); - return "INTERNAL_ERROR"; - } -} - -// ------------------------------------------------------------------- -// Extract standard parameters from the DQM data. -static void getMEInfo(DQMStore &store, MonitorElement &me, MEInfo &info) { - info.style = 'U'; - info.runnr = -1; - info.system.clear(); - info.category.clear(); - info.name.clear(); - info.data.clear(); - - switch (me.kind()) { - case MonitorElement::Kind::INT: - case MonitorElement::Kind::REAL: - case MonitorElement::Kind::STRING: - info.data = me.tagString(); - break; - - default: - break; - } - - // If it's a reference, strip reference part out. - bool isref = false; - std::string name = me.getFullname(); - if (name.size() > 10 && name.compare(0, 10, "Reference/") == 0) { - name.erase(0, 10); - isref = true; - } - - // First check for leading "Run XYZ/System/Category/Name". - size_t slash, sys, cat; - if (name.compare(0, 4, "Run ") == 0 && (slash = name.find('/')) < name.size() - 1 && - (sys = name.find('/', slash + 1)) < name.size() - 1 && (cat = name.find('/', sys + 1)) < name.size() - 1) { - info.system.append(name, slash + 1, sys - slash - 1); - info.category.append(name, sys + 1, cat - sys - 1); - info.name.append(name, cat + 1, std::string::npos); - - errno = 0; - char *end = nullptr; - info.runnr = strtol(name.c_str() + 4, &end, 10); - if (errno != 0 || !end || *end != '/') - info.runnr = -1; - - info.style = isref ? 'c' : 'C'; - return; - } - - // Try "System/EventInfo/iRun" or just "System/Name" - if ((slash = name.find('/')) != std::string::npos && slash > 0) { - std::string system(name, 0, slash); - info.system = system; - info.category.clear(); - info.name.append(name, slash + 1, std::string::npos); - if (MonitorElement *runnr = store.get(system + "/EventInfo/iRun")) - info.runnr = runnr->getIntValue(); - else - info.runnr = -1; - - info.style = isref ? 's' : 'S'; - return; - } - - // Otherwise use the defaults but fill in the name. - info.name = name; -} - -std::string hexlify(const std::string &x) { - std::string result; - result.reserve(2 * x.size() + 1); - for (size_t i = 0, e = x.size(); i != e; ++i) { - char buf[3]; - sprintf(buf, "%02x", (unsigned)(unsigned char)x[i]); - result += buf[0]; - result += buf[1]; - } - return result; -} - -// ------------------------------------------------------------------- -// Main program. -int main(int argc, char **argv) { - // Install base debugging support. - lat::DebugAids::failHook(&onAssertFail); - lat::Signal::handleFatal(argv[0], IOFD_INVALID, nullptr, nullptr, FATAL_OPTS); - - // Re-capture signals from ROOT after ROOT has initialised. - ROOT::GetROOT(); - for (int sig = 1; sig < _NSIG; ++sig) - lat::Signal::revert(sig); - lat::Signal::handleFatal(argv[0], IOFD_INVALID, nullptr, nullptr, FATAL_OPTS); - - // Check command line arguments. - int arg = 1; - int bad = 0; - std::string dataset; - std::string step; - for (; arg < argc; ++arg) - if (arg < argc - 1 && !strcmp(argv[arg], "--dataset")) - dataset = argv[++arg]; - else if (arg < argc - 1 && !strcmp(argv[arg], "--step")) - step = argv[++arg]; - else if (argv[arg][0] == '-') - ++bad; - else - break; - - if (bad) { - std::cerr << "Usage: " << argv[0] << " [--dataset NAME]" - << " [--step NAME]" - << " FILE...\n"; - return 1; - } - - // Process each file given as argument. - edm::ParameterSet emptyps; - std::vector emptyset; - edm::ServiceToken services(edm::ServiceRegistry::createSet(emptyset)); - edm::ServiceRegistry::Operate operate(services); - DQMStore store(emptyps); - MEInfo info; - for (; arg < argc; ++arg) { - try { - // Read in the file. - store.open(argv[arg]); - std::cout << "FILE NAME='" << argv[arg] << "'\n"; - - // Dump info about the monitor elements. - std::vector mes = store.getAllContents(""); - for (auto &m : mes) { - MonitorElement &me = *m; - getMEInfo(store, me, info); - std::cout << "ME STYLE=" << info.style << " RUN=" << info.runnr << " DATASET='" << dataset << "' STEP='" << step - << "' SYSTEM='" << info.system << "' CATEGORY='" << info.category << "' KIND='" - << kindToName(me.kind()) << " FLAGS=0x" << std::hex << me.flags() << std::dec << " NAME='" - << info.name << "' DATA='" << hexlify(info.data) << "'\n"; - } - } catch (std::exception &e) { - std::cerr << "*** FAILED TO READ FILE " << argv[arg] << ":\n" << e.what() << std::endl; - } - - // Now clear the DQM store for the next file. - store.rmdir(""); - } - - return 0; -} diff --git a/DQMServices/Core/bin/MergeFile.cpp b/DQMServices/Core/bin/MergeFile.cpp deleted file mode 100644 index ff66ec623422e..0000000000000 --- a/DQMServices/Core/bin/MergeFile.cpp +++ /dev/null @@ -1,69 +0,0 @@ -#include "DQMServices/Core/interface/Standalone.h" -#include "DQMServices/Core/interface/DQMStore.h" -#include "DQMServices/Core/interface/MonitorElement.h" -#include "classlib/utils/DebugAids.h" -#include "classlib/utils/Signal.h" -#include "TROOT.h" -#include -#include -#include - -#ifndef _NSIG -#define _NSIG NSIG -#endif - -typedef dqm::legacy::DQMStore DQMStore; -typedef dqm::legacy::MonitorElement MonitorElement; - -static const int FATAL_OPTS = (lat::Signal::FATAL_DEFAULT & ~(lat::Signal::FATAL_ON_INT | lat::Signal::FATAL_ON_QUIT | - lat::Signal::FATAL_DUMP_CORE)); - -// ------------------------------------------------------------------- -// Always abort on assertion failure. -static char onAssertFail(const char *message) { - std::cout.flush(); - fflush(stdout); - std::cerr.flush(); - fflush(stderr); - std::cerr << message << "ABORTING\n"; - return 'a'; -} - -// ------------------------------------------------------------------- -// Main program. -int main(int argc, char **argv) { - // Install base debugging support. - lat::DebugAids::failHook(&onAssertFail); - lat::Signal::handleFatal(argv[0], IOFD_INVALID, nullptr, nullptr, FATAL_OPTS); - - // Re-capture signals from ROOT after ROOT has initialised. - ROOT::GetROOT(); - for (int sig = 1; sig < _NSIG; ++sig) - lat::Signal::revert(sig); - lat::Signal::handleFatal(argv[0], IOFD_INVALID, nullptr, nullptr, FATAL_OPTS); - - // Check command line arguments. - char *output = (argc > 1 ? argv[1] : nullptr); - if (!output) { - std::cerr << "Usage: " << argv[0] << " OUTPUT-FILE FILE...\n"; - return 1; - } - - // Process each file given as argument. - edm::ParameterSet emptyps; - std::vector emptyset; - edm::ServiceToken services(edm::ServiceRegistry::createSet(emptyset)); - edm::ServiceRegistry::Operate operate(services); - DQMStore store(emptyps); - for (int arg = 2; arg < argc; ++arg) - try { - // Read in the file. - store.open(argv[arg]); - } catch (std::exception &e) { - std::cerr << "*** FAILED TO READ FILE " << argv[arg] << ":\n" << e.what() << std::endl; - exit(1); - } - - store.save(output); - return 0; -} diff --git a/DQMServices/Core/interface/DQMStore.h b/DQMServices/Core/interface/DQMStore.h index 7cd6d2d921daf..a536a0e78ec1e 100644 --- a/DQMServices/Core/interface/DQMStore.h +++ b/DQMServices/Core/interface/DQMStore.h @@ -247,12 +247,6 @@ namespace dqm::dqmstoreimpl { return owner_->getContents(std::forward(args)...); } - // for the supported syntaxes, see the declarations of DQMStore::removeElement - template - void removeElement(Args&&... args) { - return owner_->removeElement(std::forward(args)...); - } - std::vector getAllContents(std::string const& path, uint32_t runNumber = 0, uint32_t lumi = 0); MonitorElement* get(std::string const& path); @@ -506,17 +500,6 @@ namespace dqm::dqmstoreimpl { std::vector getContents(std::string const& path) const; void getContents(std::vector& into, bool showContents = true) const; - // ---------------------- softReset methods ------------------------------- - void softReset(MonitorElement* me); - void disableSoftReset(MonitorElement* me); - - // ---------------------- Public deleting --------------------------------- - void rmdir(std::string const& fullpath); - void removeContents(); - void removeContents(std::string const& dir); - void removeElement(std::string const& name); - void removeElement(std::string const& dir, std::string const& name, bool warning = true); - // ------------------------------------------------------------------------ // ---------------------- public I/O -------------------------------------- void save(std::string const& filename, @@ -554,7 +537,6 @@ namespace dqm::dqmstoreimpl { int useQTestByMatch(std::string const& pattern, std::string const& qtname); void runQTests(); int getStatus(std::string const& path = "") const; - void scaleElements(); private: // ---------------- Navigation ----------------------- @@ -651,9 +633,6 @@ namespace dqm::dqmstoreimpl { static void collateProfile(MonitorElement* me, TProfile* h, unsigned verbose); static void collateProfile2D(MonitorElement* me, TProfile2D* h, unsigned verbose); - // --- Operations on MEs that are normally reset at end of monitoring cycle --- - void setAccumulate(MonitorElement* me, bool flag); - void print_trace(std::string const& dir, std::string const& name); //------------------------------------------------------------------------------- diff --git a/DQMServices/Core/interface/MonitorElement.h b/DQMServices/Core/interface/MonitorElement.h index cd339bdecf2c2..8ea68879676b1 100644 --- a/DQMServices/Core/interface/MonitorElement.h +++ b/DQMServices/Core/interface/MonitorElement.h @@ -291,8 +291,6 @@ namespace dqm::impl { void ShiftFillLast(double y, double ye = 0., int32_t xscale = 1); virtual void Reset(); - DQM_DEPRECATED - virtual void softReset(); // mostly used for IO, should be private. std::string valueString() const; @@ -410,12 +408,6 @@ namespace dqm::impl { void setAxisTimeOffset(double toffset, const char *option = "local", int axis = 1); - /// whether soft-reset is enabled; default is false - bool isSoftResetEnabled() const { return refvalue_ != nullptr; } - - /// whether ME contents should be accumulated over multiple monitoring periods; default: false - bool isAccumulateEnabled() const { return data_.flags & DQMNet::DQM_PROP_ACCUMULATE; } - /// true if ME is marked for deletion bool markedToDelete() const { return data_.flags & DQMNet::DQM_PROP_MARKTODELETE; } @@ -429,16 +421,9 @@ namespace dqm::impl { /// true if ME should be reset at end of monitoring cycle bool resetMe() const { return data_.flags & DQMNet::DQM_PROP_RESET; } - /// if true, will accumulate ME contents (over many periods) - /// until method is called with flag = false again - void setAccumulate(bool /* flag */) { data_.flags |= DQMNet::DQM_PROP_ACCUMULATE; } - TAxis const *getAxis(Access const &access, const char *func, int axis) const; TAxis *getAxis(AccessMut const &access, const char *func, int axis) const; - // ------------ Operations for MEs that are normally never reset --------- - protected: - void disableSoftReset(); void addProfiles(TProfile *h1, TProfile *h2, TProfile *sum, float c1, float c2); void addProfiles(TProfile2D *h1, TProfile2D *h2, TProfile2D *sum, float c1, float c2); void copyFunctions(TH1 *from, TH1 *to); diff --git a/DQMServices/Core/src/DQMStore.cc b/DQMServices/Core/src/DQMStore.cc index be52cd6acdb29..71a8228f09fb3 100644 --- a/DQMServices/Core/src/DQMStore.cc +++ b/DQMServices/Core/src/DQMStore.cc @@ -2805,60 +2805,6 @@ namespace dqm::dqmstoreimpl { return true; } - ////////////////////////////////////////////////////////////////////// - ////////////////////////////////////////////////////////////////////// - ////////////////////////////////////////////////////////////////////// - /// delete directory and all contents; - /// delete directory (all contents + subfolders); - void DQMStore::rmdir(std::string const& path) { - std::string clean; - std::string const* cleaned = nullptr; - cleanTrailingSlashes(path, clean, cleaned); - MonitorElement proto(cleaned, std::string()); - - auto e = data_.end(); - auto i = data_.lower_bound(proto); - while (i != e && isSubdirectory(*cleaned, *i->data_.dirname)) - data_.erase(i++); - - auto de = dirs_.end(); - auto di = dirs_.lower_bound(*cleaned); - while (di != de && isSubdirectory(*cleaned, *di)) - dirs_.erase(di++); - } - - /// remove all monitoring elements from directory; - void DQMStore::removeContents(std::string const& dir) { - MonitorElement proto(&dir, std::string()); - auto e = data_.end(); - auto i = data_.lower_bound(proto); - while (i != e && isSubdirectory(dir, *i->data_.dirname)) - if (dir == *i->data_.dirname) - data_.erase(i++); - else - ++i; - } - - /// erase all monitoring elements in current directory (not including subfolders); - void DQMStore::removeContents() { removeContents(pwd_); } - - /// erase monitoring element in current directory - /// (opposite of book1D,2D,etc. action); - void DQMStore::removeElement(std::string const& name) { removeElement(pwd_, name); } - - /// remove monitoring element from directory; - /// if warning = true, print message if element does not exist - void DQMStore::removeElement(std::string const& dir, std::string const& name, bool const warning /* = true */) { - MonitorElement proto(&dir, name); - auto pos = data_.find(proto); - if (pos != data_.end()) - data_.erase(pos); - else if (warning) { - std::cout << "DQMStore: WARNING: attempt to remove non-existent" - << " monitor element '" << name << "' in '" << dir << "'\n"; - } - } - ////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////// @@ -2974,29 +2920,6 @@ namespace dqm::dqmstoreimpl { return status; } - ////////////////////////////////////////////////////////////////////// - ////////////////////////////////////////////////////////////////////// - ////////////////////////////////////////////////////////////////////// - /// reset contents (does not erase contents permanently) - /// (makes copy of current contents; will be subtracted from future contents) - void DQMStore::softReset(MonitorElement* me) { - if (me) - me->softReset(); - } - - // reverts action of softReset - void DQMStore::disableSoftReset(MonitorElement* me) { - if (me) - me->disableSoftReset(); - } - - /// if true, will accumulate ME contents (over many periods) - /// until method is called with flag = false again - void DQMStore::setAccumulate(MonitorElement* me, bool const flag) { - if (me) - me->setAccumulate(flag); - } - ////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////// @@ -3026,75 +2949,4 @@ namespace dqm::dqmstoreimpl { return me && isSubdirectory(s_collateDirName, *me->data_.dirname); } - ////////////////////////////////////////////////////////////////////// - ////////////////////////////////////////////////////////////////////// - ////////////////////////////////////////////////////////////////////// - /** Invoke this method after flushing all recently changed monitoring. - Clears updated flag on all MEs and calls their Reset() method. */ - void DQMStore::scaleElements() { - if (scaleFlag_ == 0.0) - return; - if (verbose_ > 0) - std::cout << " =========== " - << " ScaleFlag " << scaleFlag_ << std::endl; - double factor = scaleFlag_; - int events = 1; - if (dirExists("Info/EventInfo")) { - if (scaleFlag_ == -1.0) { - MonitorElement* scale_me = get("Info/EventInfo/ScaleFactor"); - if (scale_me && scale_me->kind() == MonitorElement::Kind::REAL) - factor = scale_me->getFloatValue(); - } - MonitorElement* event_me = get("Info/EventInfo/processedEvents"); - if (event_me && event_me->kind() == MonitorElement::Kind::INT) - events = event_me->getIntValue(); - } - factor = factor / (events * 1.0); - - for (auto const& m : data_) { - auto& me = const_cast(m); - switch (me.kind()) { - case MonitorElement::Kind::TH1F: { - me.getTH1F()->Scale(factor); - break; - } - case MonitorElement::Kind::TH1S: { - me.getTH1S()->Scale(factor); - break; - } - case MonitorElement::Kind::TH1D: { - me.getTH1D()->Scale(factor); - break; - } - case MonitorElement::Kind::TH2F: { - me.getTH2F()->Scale(factor); - break; - } - case MonitorElement::Kind::TH2S: { - me.getTH2S()->Scale(factor); - break; - } - case MonitorElement::Kind::TH2D: { - me.getTH2D()->Scale(factor); - break; - } - case MonitorElement::Kind::TH3F: { - me.getTH3F()->Scale(factor); - break; - } - case MonitorElement::Kind::TPROFILE: { - me.getTProfile()->Scale(factor); - break; - } - case MonitorElement::Kind::TPROFILE2D: { - me.getTProfile2D()->Scale(factor); - break; - } - default: - if (verbose_ > 0) - std::cout << " The DQM object '" << me.getFullname() << "' is not scalable object " << std::endl; - continue; - } - } - } } // namespace dqm::dqmstoreimpl diff --git a/DQMServices/Core/src/MonitorElement.cc b/DQMServices/Core/src/MonitorElement.cc index 5ce0e90b78204..1d03b94d0e28e 100644 --- a/DQMServices/Core/src/MonitorElement.cc +++ b/DQMServices/Core/src/MonitorElement.cc @@ -946,143 +946,6 @@ namespace dqm::impl { return access.value.scalar_.str; } - // ------------ Operations for MEs that are normally never reset --------- - - /// reset contents (does not erase contents permanently) - /// (makes copy of current contents; will be subtracted from future contents) - void MonitorElement::softReset() { - update(); - - // Create the reference object the first time this is called. - // On subsequent calls accumulate the current value to the - // reference, and then reset the current value. This way the - // future contents will have the reference "subtracted". - if (kind() == Kind::TH1F) { - auto *orig = static_cast(getTH1()); - auto *r = static_cast(refvalue_); - if (!r) { - refvalue_ = r = (TH1F *)orig->Clone((std::string(orig->GetName()) + "_ref").c_str()); - r->SetDirectory(nullptr); - r->Reset(); - } - - r->Add(orig); - orig->Reset(); - } else if (kind() == Kind::TH1S) { - auto *orig = static_cast(getTH1()); - auto *r = static_cast(refvalue_); - if (!r) { - refvalue_ = r = (TH1S *)orig->Clone((std::string(orig->GetName()) + "_ref").c_str()); - r->SetDirectory(nullptr); - r->Reset(); - } - - r->Add(orig); - orig->Reset(); - } else if (kind() == Kind::TH1D) { - auto *orig = static_cast(getTH1()); - auto *r = static_cast(refvalue_); - if (!r) { - refvalue_ = r = (TH1D *)orig->Clone((std::string(orig->GetName()) + "_ref").c_str()); - r->SetDirectory(nullptr); - r->Reset(); - } - - r->Add(orig); - orig->Reset(); - } else if (kind() == Kind::TH2F) { - auto *orig = static_cast(getTH1()); - auto *r = static_cast(refvalue_); - if (!r) { - refvalue_ = r = (TH2F *)orig->Clone((std::string(orig->GetName()) + "_ref").c_str()); - r->SetDirectory(nullptr); - r->Reset(); - } - - r->Add(orig); - orig->Reset(); - } else if (kind() == Kind::TH2S) { - auto *orig = static_cast(getTH1()); - auto *r = static_cast(refvalue_); - if (!r) { - refvalue_ = r = (TH2S *)orig->Clone((std::string(orig->GetName()) + "_ref").c_str()); - r->SetDirectory(nullptr); - r->Reset(); - } - - r->Add(orig); - orig->Reset(); - } else if (kind() == Kind::TH2D) { - auto *orig = static_cast(getTH1()); - auto *r = static_cast(refvalue_); - if (!r) { - refvalue_ = r = (TH2D *)orig->Clone((std::string(orig->GetName()) + "_ref").c_str()); - r->SetDirectory(nullptr); - r->Reset(); - } - - r->Add(orig); - orig->Reset(); - } else if (kind() == Kind::TH3F) { - auto *orig = static_cast(getTH1()); - auto *r = static_cast(refvalue_); - if (!r) { - refvalue_ = r = (TH3F *)orig->Clone((std::string(orig->GetName()) + "_ref").c_str()); - r->SetDirectory(nullptr); - r->Reset(); - } - - r->Add(orig); - orig->Reset(); - } else if (kind() == Kind::TPROFILE) { - auto *orig = static_cast(getTH1()); - auto *r = static_cast(refvalue_); - if (!r) { - refvalue_ = r = (TProfile *)orig->Clone((std::string(orig->GetName()) + "_ref").c_str()); - r->SetDirectory(nullptr); - r->Reset(); - } - - addProfiles(r, orig, r, 1, 1); - orig->Reset(); - } else if (kind() == Kind::TPROFILE2D) { - auto *orig = static_cast(getTH1()); - auto *r = static_cast(refvalue_); - if (!r) { - refvalue_ = r = (TProfile2D *)orig->Clone((std::string(orig->GetName()) + "_ref").c_str()); - r->SetDirectory(nullptr); - r->Reset(); - } - - addProfiles(r, orig, r, 1, 1); - orig->Reset(); - } else - incompatible(__PRETTY_FUNCTION__); - } - - /// reverts action of softReset - void MonitorElement::disableSoftReset() { - if (refvalue_) { - if (kind() == Kind::TH1F || kind() == Kind::TH1S || kind() == Kind::TH1D || kind() == Kind::TH2F || - kind() == Kind::TH2S || kind() == Kind::TH2D || kind() == Kind::TH3F) { - auto *orig = getTH1(); - orig->Add(refvalue_); - } else if (kind() == Kind::TPROFILE) { - auto *orig = static_cast(getTH1()); - auto *r = static_cast(refvalue_); - addProfiles(orig, r, orig, 1, 1); - } else if (kind() == Kind::TPROFILE2D) { - auto *orig = static_cast(getTH1()); - auto *r = static_cast(refvalue_); - addProfiles(orig, r, orig, 1, 1); - } else - incompatible(__PRETTY_FUNCTION__); - - delete refvalue_; - refvalue_ = nullptr; - } - } - // implementation: Giuseppe.Della-Ricca@ts.infn.it // Can be called with sum = h1 or sum = h2 void MonitorElement::addProfiles(TProfile *h1, TProfile *h2, TProfile *sum, float c1, float c2) { @@ -1178,11 +1041,6 @@ namespace dqm::impl { } void MonitorElement::copyFunctions(TH1 *from, TH1 *to) { - // will copy functions only if local-copy and original-object are equal - // (ie. no soft-resetting or accumulating is enabled) - if (isSoftResetEnabled() || isAccumulateEnabled()) - return; - update(); TList *fromf = from->GetListOfFunctions(); TList *tof = to->GetListOfFunctions(); @@ -1211,29 +1069,7 @@ namespace dqm::impl { if (orig->GetTitle() != from->GetTitle()) orig->SetTitle(from->GetTitle()); - if (!isAccumulateEnabled()) - orig->Reset(); - - if (isSoftResetEnabled()) { - if (kind() == Kind::TH1F || kind() == Kind::TH1S || kind() == Kind::TH1D || kind() == Kind::TH2F || - kind() == Kind::TH2S || kind() == Kind::TH2D || kind() == Kind::TH3F) - // subtract "reference" - orig->Add(from, refvalue_, 1, -1); - else if (kind() == Kind::TPROFILE) - // subtract "reference" - addProfiles( - static_cast(from), static_cast(refvalue_), static_cast(orig), 1, -1); - else if (kind() == Kind::TPROFILE2D) - // subtract "reference" - addProfiles(static_cast(from), - static_cast(refvalue_), - static_cast(orig), - 1, - -1); - else - incompatible(__PRETTY_FUNCTION__); - } else - orig->Add(from); + orig->Add(from); copyFunctions(from, orig); } diff --git a/DQMServices/Core/src/QStatisticalTests.cc b/DQMServices/Core/src/QStatisticalTests.cc deleted file mode 100644 index a48c237daf9ab..0000000000000 --- a/DQMServices/Core/src/QStatisticalTests.cc +++ /dev/null @@ -1,120 +0,0 @@ -#include "DQMServices/Core/src/QStatisticalTests.h" -#include - -using namespace TMath; - -//--------------------------------------------------------------------------- -void BinLogLikelihoodRatio(long Nentries, long Nfailures, double epsilon_max, double* S_fail_obs, double* S_pass_obs) { - /*--------------------------------------------------------------------------+ - | Description: Log-likelihood Ratio for Binomial PDF | - +--------------------------------------------------------------------------+ - | Input to this function | - +--------------------------------------------------------------------------+ - |int Nentries : The number of attempts | - |int Nfailures : The number of failures | - |double epsilon_max, : maximum allowed failure rate fraction | - |double* S_fail_obs : uninitialised Significance of failure | - |double* S_pass_obs : uninitialised Significance of Success | - +--------------------------------------------------------------------------+ - | Return values for this function | - +--------------------------------------------------------------------------+ - |double* S_fail_obs : the observed Significance of failure | - |double* S_pass_obs : the observed Significance of Success | - +--------------------------------------------------------------------------+ - | Author: Richard Cavanaugh, University of Florida | - | email: Richard.Cavanaugh@cern.ch | - | Creation Date: 11.July.2005 | - | Last Modified: 17.Jan.2006 | - | Comments: | - +--------------------------------------------------------------------------*/ - long N = Nentries, n = Nfailures; - if (n == 0) - n = 1; //protect against no failures: approx. 0 by 1 - if (n == N) - n -= 1; //protect against all failures: approx. n by (n - 1) - double epsilon_meas = (double)n / (double)N; - - double LogQ = ((double)n) * (Log(epsilon_meas) - Log(epsilon_max)) + - ((double)(N - n)) * (Log(1.0 - epsilon_meas) - Log(1.0 - epsilon_max)); - - //x-check: var of binomial = epsilon_max * (1 - epsilon_max) / N - if (Nentries <= 1) //guard against insufficient entries - { - *S_fail_obs = 0.0; - *S_pass_obs = 0.0; - } else if (Nfailures == 0 && (epsilon_max <= 1.0 / (double)Nentries)) { - *S_fail_obs = 0.0; - *S_pass_obs = 0.0; - } else if (Nfailures == 0) { - *S_fail_obs = 0.0; - *S_pass_obs = sqrt(2.0 * LogQ); - } else if (Nfailures == Nentries) { - *S_fail_obs = sqrt(2.0 * LogQ); - *S_pass_obs = 0.0; - } else if (epsilon_meas >= epsilon_max) { - *S_fail_obs = sqrt(2.0 * LogQ); - *S_pass_obs = 0.0; - } else { - *S_fail_obs = 0.0; - *S_pass_obs = sqrt(2.0 * LogQ); - } -} -//--------------------------------------------------------------------------- - -//--------------------------------------------------------------------------- -void PoissionLogLikelihoodRatio( - double data, double hypothesis, double epsilon_max, double epsilon_min, double* S_fail_obs, double* S_pass_obs) { - /*--------------------------------------------------------------------------+ - | Description: Log-likelihood Ratio for Poission PDF | - +--------------------------------------------------------------------------+ - | Input to this function | - +--------------------------------------------------------------------------+ - |double data, : The observed number of entries | - |double sigma, : The uncertainty on, data, the observed entries | - |double hypothesis, : The assumed hypothese, tested against data | - |double epsilon_max, : Maximum tolerance above fraction of fitted line | - |double epsilon_min, : Minimum tolerance below fraction of fitted line | - |double* S_fail_obs : uninitialised Significance of failure | - |double* S_pass_obs : uninitialised Significance of Success | - +--------------------------------------------------------------------------+ - | Return values for this function | - +--------------------------------------------------------------------------+ - |double* S_fail_obs : the observed Significance of failure | - |double* S_pass_obs : the observed Significance of Success | - +--------------------------------------------------------------------------+ - | Author: Richard Cavanaugh, University of Florida | - | email: Richard.Cavanaugh@cern.ch | - | Creation Date: 14.Jan.2006 | - | Last Modified: 16.Jan.2006 | - | Comments: | - +--------------------------------------------------------------------------*/ - double tolerance_min = hypothesis * (1.0 - epsilon_min); - double tolerance_max = hypothesis * (1.0 + epsilon_max); - *S_pass_obs = 0.0; - *S_fail_obs = 0.0; - if (data > tolerance_max) { - double Nsig = data - tolerance_max; - double Nbak = tolerance_max; - double LogQ = (double)(Nsig + Nbak) * Log(1.0 + (double)Nsig / (double)Nbak) - (double)Nsig; - *S_fail_obs = sqrt(2.0 * LogQ); - } else if (tolerance_min < data && data < tolerance_max) { - if (data - hypothesis > 0.0) { - double Nsig = tolerance_max - data; - double Nbak = tolerance_max; - double LogQ = (double)(Nsig + Nbak) * Log(1.0 + (double)Nsig / (double)Nbak) - (double)Nsig; - *S_pass_obs = sqrt(2.0 * LogQ); - } else { - double Nsig = data - tolerance_min; - double Nbak = tolerance_min; - double LogQ = (double)(Nsig + Nbak) * Log(1.0 + (double)Nsig / (double)Nbak) - (double)Nsig; - *S_pass_obs = sqrt(2.0 * LogQ); - } - } else // data < tolerance_min - { - double Nsig = tolerance_min - data; - double Nbak = tolerance_min; - double LogQ = (double)(Nsig + Nbak) * Log(1.0 + (double)Nsig / (double)Nbak) - (double)Nsig; - *S_fail_obs = sqrt(2.0 * LogQ); - } -} -//--------------------------------------------------------------------------- diff --git a/DQMServices/Core/src/QStatisticalTests.h b/DQMServices/Core/src/QStatisticalTests.h deleted file mode 100644 index e1e106660a871..0000000000000 --- a/DQMServices/Core/src/QStatisticalTests.h +++ /dev/null @@ -1,2 +0,0 @@ -void BinLogLikelihoodRatio(long, long, double, double*, double*); -void PoissionLogLikelihoodRatio(double, double, double, double, double*, double*); diff --git a/DQMServices/Core/src/QTest.cc b/DQMServices/Core/src/QTest.cc index 84057f1d28fc2..ecd3eae524741 100644 --- a/DQMServices/Core/src/QTest.cc +++ b/DQMServices/Core/src/QTest.cc @@ -1,7 +1,6 @@ #include "DQMServices/Core/interface/QTest.h" #include "DQMServices/Core/interface/DQMStore.h" #include "DQMServices/Core/src/DQMError.h" -#include "DQMServices/Core/src/QStatisticalTests.h" #include "Math/ProbFuncMathCore.h" #include "TMath.h" #include diff --git a/DQMServices/Core/test/BuildFile.xml b/DQMServices/Core/test/BuildFile.xml index 6245b0a8abf79..cf1dedd7aadfe 100644 --- a/DQMServices/Core/test/BuildFile.xml +++ b/DQMServices/Core/test/BuildFile.xml @@ -1,9 +1,6 @@ - - - diff --git a/DQMServices/Core/test/DQMReadFileExample.cc b/DQMServices/Core/test/DQMReadFileExample.cc deleted file mode 100644 index e2a80a9fae570..0000000000000 --- a/DQMServices/Core/test/DQMReadFileExample.cc +++ /dev/null @@ -1,114 +0,0 @@ -// -*- C++ -*- -// -// Package: DQMServices/CoreROOT -// Class: DQMReadFileExample -// -/**\class DQMReadFileExample - -Description: Simple example showing how to read MonitorElements from ROOT file - -Implementation: - -*/ -// -// -// - -// system include files -#include - -#include -#include -#include - -// user include files -#include "FWCore/Framework/interface/EDAnalyzer.h" - -#include "FWCore/Framework/interface/MakerMacros.h" - -#include "FWCore/ParameterSet/interface/ParameterSet.h" - -#include "DQMServices/Core/interface/DQMStore.h" -#include "FWCore/ServiceRegistry/interface/Service.h" - -// -// class declaration -// -class DQMReadFileExample : public edm::EDAnalyzer { -public: - typedef dqm::legacy::DQMStore DQMStore; - typedef dqm::legacy::MonitorElement MonitorElement; - - explicit DQMReadFileExample(const edm::ParameterSet&); - ~DQMReadFileExample() override; - - void analyze(const edm::Event&, const edm::EventSetup&) override; - - void endJob() override; - -private: - // ----------member data --------------------------- - - // back-end interface - DQMStore* dbe; - - // remove all MonitorElements and directories - void removeAll(); -}; - -// -// constructors and destructor -// -DQMReadFileExample::DQMReadFileExample(const edm::ParameterSet& iConfig) { - // get hold of back-end interface - dbe = edm::Service().operator->(); - - std::string filename = iConfig.getUntrackedParameter("RootFileName", "test_playback.root"); - dbe->open(filename); - dbe->showDirStructure(); - removeAll(); - - bool overwrite = false; - std::string pathname = "Collector/FU0/C1/C2"; - dbe->open(filename, overwrite, pathname); - dbe->showDirStructure(); - removeAll(); - - pathname = "Collector/FU0/C1/C3"; - dbe->open(filename, overwrite, pathname); - dbe->showDirStructure(); - removeAll(); -} - -DQMReadFileExample::~DQMReadFileExample() { - // do anything here that needs to be done at desctruction time - // (e.g. close files, deallocate resources etc.) -} - -// remove all MonitorElements and directories -void DQMReadFileExample::removeAll() { - // go to top directory - dbe->cd(); - // remove MEs at top directory - dbe->removeContents(); - // remove directory (including subdirectories recursively) - if (dbe->dirExists("Collector")) - dbe->rmdir("Collector"); - if (dbe->dirExists("Summary")) - dbe->rmdir("Summary"); -} - -void DQMReadFileExample::endJob() { - dbe->showDirStructure(); - // dbe->save("test.root"); -} - -// -// member functions -// - -// ------------ method called to produce the data ------------ -void DQMReadFileExample::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) {} - -// define this as a plug-in -DEFINE_FWK_MODULE(DQMReadFileExample); diff --git a/HLTrigger/Timer/plugins/ThroughputServiceClient.cc b/HLTrigger/Timer/plugins/ThroughputServiceClient.cc index 8d08322cc2e0c..12f9f55ce4280 100644 --- a/HLTrigger/Timer/plugins/ThroughputServiceClient.cc +++ b/HLTrigger/Timer/plugins/ThroughputServiceClient.cc @@ -80,11 +80,6 @@ void ThroughputServiceClient::fillSummaryPlots(DQMStore::IBooker &booker, DQMSto if (m_dqm_merge and folders.size() > 1) { std::string summary_folder = m_dqm_path + "/Summary"; booker.setCurrentFolder(summary_folder); - // drop the summary histograms, if they exist - if (getter.get(summary_folder + "/throughput_sourced")) - getter.removeElement(summary_folder, "throughput_sourced", true); - if (getter.get(summary_folder + "/throughput_retired")) - getter.removeElement(summary_folder, "throughput_retired", true); // clone the first set of histograms auto folder = folders.begin(); TH1F *sourced = @@ -106,9 +101,6 @@ void ThroughputServiceClient::fillSummaryPlots(DQMStore::IBooker &booker, DQMSto unsigned int nbins = sourced->GetXaxis()->GetNbins(); double range = sourced->GetXaxis()->GetXmax(); - // drop .../concurrent, if it exists - if (getter.get(folder + "/concurrent")) - getter.removeElement(folder, "concurrent", true); // (re)book and fill .../concurrent TH1F *concurrent = booker.book1D("concurrent", "Concurrent events being processed", nbins, 0., range)->getTH1F(); double sum = 0; @@ -128,9 +120,6 @@ void ThroughputServiceClient::fillSummaryPlots(DQMStore::IBooker &booker, DQMSto avg_max = std::ceil(avg_max + width * 0.2); width = avg_max - avg_min; - // drop .../average_sourced, if it exists - if (getter.get(folder + "/average_sourced")) - getter.removeElement(folder, "average_sourced", true); // define the range for .../average_sourced uint64_t first = sourced->FindFirstBinAbove(0.); uint64_t last = sourced->FindLastBinAbove(0.); @@ -140,9 +129,6 @@ void ThroughputServiceClient::fillSummaryPlots(DQMStore::IBooker &booker, DQMSto for (unsigned int i = first; i <= last; ++i) average->Fill(sourced->GetBinContent(i)); - // drop .../average_retired, if it exists - if (getter.get(folder + "/average_retired")) - getter.removeElement(folder, "average_retired", true); // define the range for .../average_retired first = retired->FindFirstBinAbove(0.); last = retired->FindLastBinAbove(0.); diff --git a/HLTriggerOffline/B2G/test/b2gHLTDQM_production_cfg.py b/HLTriggerOffline/B2G/test/b2gHLTDQM_production_cfg.py index c4ae47a334e43..c5847c582ff42 100644 --- a/HLTriggerOffline/B2G/test/b2gHLTDQM_production_cfg.py +++ b/HLTriggerOffline/B2G/test/b2gHLTDQM_production_cfg.py @@ -77,7 +77,6 @@ process.MessageLogger.categories.append('B2GSingleLeptonTriggerDQM' ) process.MessageLogger.cerr.B2GSingleLeptonTriggerDQM = cms.untracked.PSet(limit = cms.untracked.int32(1)) -process.MEtoEDMConverter.deleteAfterCopy = cms.untracked.bool(False) ## line added to avoid crash when changing run number process.b2gSingleMuonMediumTriggerDQM.preselection.trigger.select = cms.vstring(['HLT_IsoMu17_eta2p1_TriCentralPFNoPUJet50_40_30_v1']) diff --git a/Validation/RecoB/plugins/BDHadronTrackMonitoringHarvester.cc b/Validation/RecoB/plugins/BDHadronTrackMonitoringHarvester.cc index e9727dcaefa4a..15b9c1afa4edc 100644 --- a/Validation/RecoB/plugins/BDHadronTrackMonitoringHarvester.cc +++ b/Validation/RecoB/plugins/BDHadronTrackMonitoringHarvester.cc @@ -170,30 +170,6 @@ void BDHadronTrackMonitoringHarvester::dqmEndJob(DQMStore::IBooker &ibook, DQMSt nTrk_relative_dusgjet->setBinContent(i + 1, mean_dusgjets[i] / meanAll_dusgjets); nTrk_std_dusgjet->setBinContent(i + 1, std_dusgjets[i]); } - - // *********************** - // - // Remove histograms with nTracks that we do not want to show - // - // *********************** - - // b jets - for (unsigned int i = 0; i < BDHadronTrackMonitoringAnalyzer::TrkHistCat.size(); i++) { - iget.removeElement("nTrk_bjet_" + BDHadronTrackMonitoringAnalyzer::TrkHistCat[i]); - } - iget.removeElement("nTrkAll_bjet"); - - // c jets - for (unsigned int i = 0; i < BDHadronTrackMonitoringAnalyzer::TrkHistCat.size(); i++) { - iget.removeElement("nTrk_cjet_" + BDHadronTrackMonitoringAnalyzer::TrkHistCat[i]); - } - iget.removeElement("nTrkAll_cjet"); - - // dusg jets - for (unsigned int i = 0; i < BDHadronTrackMonitoringAnalyzer::TrkHistCat.size(); i++) { - iget.removeElement("nTrk_dusgjet_" + BDHadronTrackMonitoringAnalyzer::TrkHistCat[i]); - } - iget.removeElement("nTrkAll_dusgjet"); } // define this as a plug-in diff --git a/Validation/RecoTau/plugins/dqmAuxFunctions.cc b/Validation/RecoTau/plugins/dqmAuxFunctions.cc index 742da893e60e2..8f1e1cf6ea7ba 100644 --- a/Validation/RecoTau/plugins/dqmAuxFunctions.cc +++ b/Validation/RecoTau/plugins/dqmAuxFunctions.cc @@ -117,8 +117,6 @@ void dqmCopyRecursively(dqm::legacy::DQMStore& dqmStore, //std::cout << " outputDirectory = " << outputDirectory << std::endl; //std::cout << " rmInputDirectory = " << rmInputDirectory << std::endl; - bool meInput_copied = false; - //--- copy all monitor elements in current inputDirectory to the outputDirectory dqmStore.setCurrentFolder(inputDirectory); std::vector meNames = dqmStore.getMEs(); @@ -167,8 +165,6 @@ void dqmCopyRecursively(dqm::legacy::DQMStore& dqmStore, } else { dqmRegisterHistogram(dqmStore, clone.release(), *meName); } - - meInput_copied = true; } //--- call function recursively for all sub-directories @@ -186,12 +182,6 @@ void dqmCopyRecursively(dqm::legacy::DQMStore& dqmStore, dqmCopyRecursively(dqmStore, inputDirName_full, outputDirName_full, scaleFactor, mode, rmInputDirectory); } - - //--- delete inputDirectory - // (if requested to do so and inputDirectory is **not empty**; - // otherwise, common parent directories of inputDirectory and outputDirectory might get deleted !!) - if (rmInputDirectory && meInput_copied) - dqmStore.rmdir(inputDirectory); } //