00001 #include "DQMOffline/PFTau/plugins/BenchmarkAnalyzer.h" 00002 #include "FWCore/MessageLogger/interface/MessageLogger.h" 00003 00004 #include "FWCore/ParameterSet/interface/ParameterSet.h" 00005 #include "FWCore/Utilities/interface/InputTag.h" 00006 00007 #include "DQMServices/Core/interface/DQMStore.h" 00008 #include "FWCore/ServiceRegistry/interface/Service.h" 00009 00010 #include <string> 00011 #include <iostream> 00012 00013 using namespace std; 00014 00015 BenchmarkAnalyzer::BenchmarkAnalyzer(const edm::ParameterSet& parameterSet) 00016 { 00017 00018 inputLabel_ = parameterSet.getParameter<edm::InputTag>("InputCollection"); 00019 benchmarkLabel_ = parameterSet.getParameter<std::string>("BenchmarkLabel"); 00020 00021 00022 } 00023 00024 00025 00026 void 00027 BenchmarkAnalyzer::beginJob() 00028 { 00029 Benchmark::DQM_ = edm::Service<DQMStore>().operator->(); 00030 if(!Benchmark::DQM_) { 00031 throw "Please initialize the DQM service in your cfg"; 00032 } 00033 00034 // part of the following could be put in the base class 00035 string path = "PFTask/" + benchmarkLabel_ ; 00036 Benchmark::DQM_->setCurrentFolder(path.c_str()); 00037 cout<<"path set to "<<path<<endl; 00038 }