Skip to content

Commit

Permalink
Merge pull request #9869 from wddgit/getProcessParameterSetDQMServices
Browse files Browse the repository at this point in the history
Replace getProcessParameterSet function
  • Loading branch information
cmsbuild committed Jun 25, 2015
2 parents 9f98bf7 + 2abfa66 commit 5485828
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 14 deletions.
6 changes: 4 additions & 2 deletions DQMServices/Components/src/DQMDcsInfo.cc
Expand Up @@ -37,8 +37,10 @@ void DQMDcsInfo::bookHistograms(DQMStore::IBooker & ibooker,
// Fetch GlobalTag information and fill the string/ME.
ibooker.cd();
ibooker.setCurrentFolder(subsystemname_ +"/CMSSWInfo/");
const edm::ParameterSet &globalTagPSet = edm::getProcessParameterSet()
.getParameterSet("PoolDBESSource@GlobalTag");

const edm::ParameterSet &globalTagPSet =
edm::getProcessParameterSetContainingModule(moduleDescription())
.getParameterSet("PoolDBESSource@GlobalTag");

ibooker.bookString("globalTag_Step1", globalTagPSet.getParameter<std::string>("globaltag"));

Expand Down
1 change: 0 additions & 1 deletion DQMServices/Components/src/DQMDcsInfo.h
Expand Up @@ -13,7 +13,6 @@
#include <FWCore/Framework/interface/Run.h>
#include <FWCore/Framework/interface/MakerMacros.h>
#include <FWCore/ParameterSet/interface/ParameterSet.h>
#include <FWCore/ParameterSet/interface/Registry.h>
#include <FWCore/ServiceRegistry/interface/Service.h>

#include <DQMServices/Core/interface/DQMStore.h>
Expand Down
5 changes: 3 additions & 2 deletions DQMServices/Components/src/DQMDcsInfoClient.cc
Expand Up @@ -35,8 +35,9 @@ DQMDcsInfoClient::beginRun(const edm::Run& r, const edm::EventSetup& c)
// Fetch GlobalTag information and fill the string/ME.
dbe_->cd();
dbe_->setCurrentFolder(subsystemname_ +"/CMSSWInfo/");
const edm::ParameterSet &globalTagPSet = edm::getProcessParameterSet()
.getParameterSet("PoolDBESSource@GlobalTag");
const edm::ParameterSet &globalTagPSet =
edm::getProcessParameterSetContainingModule(moduleDescription())
.getParameterSet("PoolDBESSource@GlobalTag");

dbe_->bookString("globalTag_Harvesting", globalTagPSet.getParameter<std::string>("globaltag"));

Expand Down
1 change: 0 additions & 1 deletion DQMServices/Components/src/DQMDcsInfoClient.h
Expand Up @@ -13,7 +13,6 @@
#include <FWCore/Framework/interface/Run.h>
#include <FWCore/Framework/interface/MakerMacros.h>
#include <FWCore/ParameterSet/interface/ParameterSet.h>
#include <FWCore/ParameterSet/interface/Registry.h>
#include <FWCore/ServiceRegistry/interface/Service.h>

#include <DQMServices/Core/interface/DQMStore.h>
Expand Down
6 changes: 4 additions & 2 deletions DQMServices/Components/src/DQMEventInfo.cc
Expand Up @@ -7,7 +7,6 @@
#include "DQMEventInfo.h"
#include "FWCore/Framework/interface/LuminosityBlock.h"
#include "FWCore/Version/interface/GetReleaseVersion.h"
#include "FWCore/ParameterSet/interface/Registry.h"
#include <TSystem.h>

#include <stdio.h>
Expand Down Expand Up @@ -95,7 +94,10 @@ void DQMEventInfo::bookHistograms(DQMStore::IBooker & ibooker,
ibooker.setCurrentFolder(subfolder);

//Online static histograms
const edm::ParameterSet &sourcePSet = edm::getProcessParameterSet().getParameterSet("@main_input");
const edm::ParameterSet &sourcePSet =
edm::getProcessParameterSetContainingModule(moduleDescription())
.getParameterSet("@main_input");

if (sourcePSet.getParameter<std::string>("@module_type") == "EventStreamHttpReader" ){
std::string evSelection;
std::vector<std::string> evSelectionList;
Expand Down
11 changes: 5 additions & 6 deletions DQMServices/Components/src/DQMProvInfo.cc
Expand Up @@ -7,7 +7,6 @@

#include "DQMProvInfo.h"
#include <TSystem.h>
#include "DataFormats/Provenance/interface/ProcessHistory.h"
#include "DataFormats/Scalers/interface/DcsStatus.h"
#include "DataFormats/L1GlobalTrigger/interface/L1GtFdlWord.h"
#include "DataFormats/L1GlobalTrigger/interface/L1GlobalTriggerReadoutRecord.h"
Expand Down Expand Up @@ -150,11 +149,11 @@ DQMProvInfo::beginRun(const edm::Run& r, const edm::EventSetup &c ) {
void DQMProvInfo::analyze(const edm::Event& e, const edm::EventSetup& c){
if(!gotProcessParameterSet_){
gotProcessParameterSet_=true;
edm::ParameterSet ps;
//fetch the real process name
nameProcess_ = e.processHistory()[e.processHistory().size()-1].processName();
e.getProcessParameterSet(nameProcess_,ps);
globalTag_ = ps.getParameterSet("PoolDBESSource@GlobalTag").getParameter<std::string>("globaltag");

globalTag_ =
edm::getProcessParameterSetContainingModule(moduleDescription()).
getParameterSet("PoolDBESSource@GlobalTag").
getParameter<std::string>("globaltag");
versGlobaltag_->Fill(globalTag_);
}

Expand Down

0 comments on commit 5485828

Please sign in to comment.