Skip to content

Commit

Permalink
Move histogram production out of a activity registry callback and int…
Browse files Browse the repository at this point in the history
…o *Produce.
  • Loading branch information
Dmitrijus Bugelskis committed Feb 27, 2018
1 parent a897e11 commit 2b489f3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 17 deletions.
4 changes: 4 additions & 0 deletions DQMServices/Core/src/DQMEDAnalyzer.cc
Expand Up @@ -23,6 +23,10 @@ void DQMEDAnalyzer::endRun(edm::Run const& run, edm::EventSetup const& setup)

void DQMEDAnalyzer::endRunProduce(edm::Run& run, edm::EventSetup const& setup)
{
edm::Service<DQMStore>()->cloneRunHistograms(
run.run(),
run.moduleCallingContext()->moduleDescription()->id());

run.put(runToken_, std::make_unique<DQMToken>());
}

Expand Down
17 changes: 0 additions & 17 deletions DQMServices/Core/src/DQMStore.cc
Expand Up @@ -385,23 +385,6 @@ DQMStore::DQMStore(const edm::ParameterSet &pset, edm::ActivityRegistry& ar)
ar.watchPostSourceLumi([this](edm::LuminosityBlockIndex){ forceReset(); });
}
ar.watchPostGlobalBeginLumi(this, &DQMStore::postGlobalBeginLumi);

// ACHTUNG: if DQMEDAnalyzers are migrated from EDAnalyzer to EDProducer<Accumulator>
// this callback should be removed, and the call to cloneLumiHistograms(...) should be
// moved to the DQMEDAnalyzer::endLuminosityBlockProduce...() method.
ar.watchPostModuleGlobalEndLumi([this](edm::GlobalContext const& gc, edm::ModuleCallingContext const& mcc) {
cloneLumiHistograms(
gc.luminosityBlockID().run(),
gc.luminosityBlockID().luminosityBlock(),
mcc.moduleDescription()->id());
});

ar.watchPostModuleGlobalEndRun([this](edm::GlobalContext const& gc, edm::ModuleCallingContext const& mcc) {
cloneRunHistograms(
gc.luminosityBlockID().run(),
mcc.moduleDescription()->id());
});

}

DQMStore::DQMStore(const edm::ParameterSet &pset)
Expand Down

0 comments on commit 2b489f3

Please sign in to comment.