Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bookhistograms signature #1724

Merged
merged 2 commits into from Dec 9, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion DQMServices/Components/src/DQMDcsInfo.cc
Expand Up @@ -32,7 +32,9 @@ DQMDcsInfo::DQMDcsInfo(const edm::ParameterSet& ps)
DQMDcsInfo::~DQMDcsInfo(){
}

void DQMDcsInfo::bookHistograms(DQMStore::IBooker & ibooker) {
void DQMDcsInfo::bookHistograms(DQMStore::IBooker & ibooker,
edm::Run const & /* iRun */,
edm::EventSetup const & /* iSetup */) {

// Fetch GlobalTag information and fill the string/ME.
ibooker.cd();
Expand Down
2 changes: 1 addition & 1 deletion DQMServices/Components/src/DQMDcsInfo.h
Expand Up @@ -37,7 +37,7 @@ class DQMDcsInfo: public DQMEDAnalyzer{

/// Analyze
void analyze(const edm::Event& e, const edm::EventSetup& c);
void bookHistograms(DQMStore::IBooker &) override;
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
void endLuminosityBlock(const edm::LuminosityBlock& l, const edm::EventSetup& c);

private:
Expand Down
4 changes: 3 additions & 1 deletion DQMServices/Components/src/DQMEventInfo.cc
Expand Up @@ -45,7 +45,9 @@ DQMEventInfo::DQMEventInfo(const edm::ParameterSet& ps){
DQMEventInfo::~DQMEventInfo(){
}

void DQMEventInfo::bookHistograms(DQMStore::IBooker & ibooker)
void DQMEventInfo::bookHistograms(DQMStore::IBooker & ibooker,
edm::Run const & /* iRun*/,
edm::EventSetup const & /* iSetup */)
{
ibooker.setCurrentFolder(eventInfoFolder_) ;

Expand Down
6 changes: 3 additions & 3 deletions DQMServices/Components/src/DQMEventInfo.h
Expand Up @@ -35,15 +35,15 @@ class DQMEventInfo: public DQMEDAnalyzer{

/// Constructor
DQMEventInfo(const edm::ParameterSet& ps);

/// Destructor
virtual ~DQMEventInfo();

protected:

/// Analyze
void analyze(const edm::Event& e, const edm::EventSetup& c);
void bookHistograms(DQMStore::IBooker &) override;
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
void dqmBeginRun(const edm::Run& r, const edm::EventSetup& c) ;
void beginLuminosityBlock(const edm::LuminosityBlock& l, const edm::EventSetup& c);

Expand All @@ -67,7 +67,7 @@ class DQMEventInfo: public DQMEDAnalyzer{
int64_t pEvent_;

//////////////////////////////////////////////////////////////////
///These MEs are filled with the info from the most recent event
///These MEs are filled with the info from the most recent event
/// by the module
//////////////////////////////////////////////////////////////////
MonitorElement * runId_;
Expand Down
Expand Up @@ -156,7 +156,7 @@ class DummyBookFillDQMStoreMultiThread : public DQMEDAnalyzer {
virtual void endLuminosityBlock(edm::LuminosityBlock const&,
edm::EventSetup const&);

void bookHistograms(DQMStore::IBooker &);
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
void fillerDispose();

// ----------member data ---------------------------
Expand Down Expand Up @@ -195,7 +195,9 @@ void DummyBookFillDQMStoreMultiThread::fillerDispose(void) {
}


void DummyBookFillDQMStoreMultiThread::bookHistograms(DQMStore::IBooker &iBooker) {
void DummyBookFillDQMStoreMultiThread::bookHistograms(DQMStore::IBooker &iBooker,
edm::Run const & /* iRun */,
edm::EventSetup const & /* iSetup */) {
fillerDispose();

std::cout << "Booking" << std::endl;
Expand Down
2 changes: 1 addition & 1 deletion DQMServices/Core/interface/DQMEDAnalyzer.h
Expand Up @@ -50,7 +50,7 @@ class DQMEDAnalyzer
dqmDetails::NoCache*);
uint32_t streamId() const {return stream_id_;}
virtual void dqmBeginRun(edm::Run const&, edm::EventSetup const&) {}
virtual void bookHistograms(DQMStore::IBooker &) = 0;
virtual void bookHistograms(DQMStore::IBooker &i, edm::Run const&, edm::EventSetup const&) = 0;

private:
uint32_t stream_id_;
Expand Down
4 changes: 2 additions & 2 deletions DQMServices/Core/src/DQMEDAnalyzer.cc
Expand Up @@ -17,8 +17,8 @@ void DQMEDAnalyzer::beginStream(edm::StreamID id)
void DQMEDAnalyzer::beginRun(edm::Run const &iRun,
edm::EventSetup const &iSetup) {
DQMStore * store = edm::Service<DQMStore>().operator->();
store->bookTransaction([this](DQMStore::IBooker &b) {
this->bookHistograms(b);
store->bookTransaction([this, &iRun, &iSetup](DQMStore::IBooker &b) {
this->bookHistograms(b, iRun, iSetup);
},
iRun.run(),
streamId(),
Expand Down
18 changes: 10 additions & 8 deletions DQMServices/Core/src/DQMStore.cc
Expand Up @@ -323,10 +323,11 @@ MonitorElement * DQMStore::IBooker::book2D(const std::string &name,
void DQMStore::mergeAndResetMEsRunSummaryCache(uint32_t run,
uint32_t streamId,
uint32_t moduleId) {
std::cout << "Merging objects from run: "
<< run
<< ", stream: " << streamId
<< " module: " << moduleId << std::endl;
if (verbose_ > 1)
std::cout << "Merging objects from run: "
<< run
<< ", stream: " << streamId
<< " module: " << moduleId << std::endl;
std::string null_str("");
MonitorElement proto(&null_str, null_str, run, streamId, moduleId);
std::set<MonitorElement>::const_iterator e = data_.end();
Expand Down Expand Up @@ -373,10 +374,11 @@ void DQMStore::mergeAndResetMEsLuminositySummaryCache(uint32_t run,
uint32_t lumi,
uint32_t streamId,
uint32_t moduleId) {
std::cout << "Merging objects from run: "
<< run << " lumi: " << lumi
<< ", stream: " << streamId
<< " module: " << moduleId << std::endl;
if (verbose_ > 1)
std::cout << "Merging objects from run: "
<< run << " lumi: " << lumi
<< ", stream: " << streamId
<< " module: " << moduleId << std::endl;
std::string null_str("");
MonitorElement proto(&null_str, null_str, run, streamId, moduleId);
std::set<MonitorElement>::const_iterator e = data_.end();
Expand Down
8 changes: 6 additions & 2 deletions DQMServices/Core/test/DQMTestMultiThread.cc
Expand Up @@ -16,7 +16,9 @@ class DQMTestMultiThread

virtual void analyze(const edm::Event&, const edm::EventSetup&);

virtual void bookHistograms(DQMStore::IBooker&) override;
virtual void bookHistograms(DQMStore::IBooker&,
edm::Run const &,
edm::EventSetup const &) override;

void dumpMe(MonitorElement const&, bool printStat = false);

Expand All @@ -34,7 +36,9 @@ DQMTestMultiThread::DQMTestMultiThread(const edm::ParameterSet &pset)
debug_(pset.getUntrackedParameter<bool>("debug", false))
{}

void DQMTestMultiThread::bookHistograms(DQMStore::IBooker &b) {
void DQMTestMultiThread::bookHistograms(DQMStore::IBooker &b,
edm::Run const & /* iRun*/,
edm::EventSetup const & /* iSetup*/ ) {
b.setCurrentFolder("");
b.setCurrentFolder(folder_);
myHisto = b.book1D("MyHisto",
Expand Down