00001 #include "DQMOffline/RecoB/interface/HistoProviderDQM.h"
00002
00003 #include "DQMServices/Core/interface/DQMStore.h"
00004 #include "DQMServices/Core/interface/MonitorElement.h"
00005 #include "FWCore/ServiceRegistry/interface/Service.h"
00006
00007
00008 HistoProviderDQM::HistoProviderDQM(std::string prefix, std::string label){
00009
00010 dqmStore_ = edm::Service<DQMStore>().operator->();
00011 label_ =prefix+"/"+label;
00012 setDir(label_);
00013 }
00014
00015 void HistoProviderDQM::show(){
00016 dqmStore_->showDirStructure();
00017 }
00018
00019
00020 void HistoProviderDQM::setDir(std::string name){
00021 dqmStore_->setCurrentFolder(name);
00022 }
00023
00024 MonitorElement* HistoProviderDQM::book1D(const TString &name,
00025 const TString &title,
00026 int nchX, double lowX, double highX) {
00027 return (dqmStore_->book1D ((const char *)name,(const char *) title, nchX,lowX,highX));
00028
00029 }
00030
00031
00032 MonitorElement* HistoProviderDQM::book1D (const TString &name,
00033 const TString &title,
00034 int nchX, float *xbinsize){
00035 return (dqmStore_->book1D ((const char *)name, (const char *)title,nchX, xbinsize));
00036 }
00037
00038 MonitorElement * HistoProviderDQM::access(const TString &name){
00039 return dqmStore_->get((const char *)(label_+"/"+name));
00040 }
00041