Skip to content

Commit

Permalink
Fix a compilation error in the previous commit and make DQMProtobufRe…
Browse files Browse the repository at this point in the history
…ader to generate an empty lumi transitions instead of skipping them.
  • Loading branch information
Dmitrijus Bugelskis committed Jun 25, 2014
1 parent acc5d7a commit 3826165
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 19 deletions.
33 changes: 15 additions & 18 deletions DQMServices/StreamerIO/plugins/DQMProtobufReader.cc
Expand Up @@ -38,17 +38,7 @@ InputSource::ItemType DQMProtobufReader::getNextItemType() {

// skip to the next file if we have no files openned yet
if (fiterator_.hasNext()) {
const LumiEntry& lumi = fiterator_.front();
std::string p = fiterator_.make_path_data(lumi);

if (boost::filesystem::exists(p)) {
// fiterator_.logFileAction("Initiating request to open file ", p);
return InputSource::IsLumi;
} else {
fiterator_.logFileAction("Data file is missing ", p);
fiterator_.pop();
continue;
}
return InputSource::IsLumi;
}

fiterator_.delay();
Expand Down Expand Up @@ -94,9 +84,12 @@ void DQMProtobufReader::readLuminosityBlock_(
fiterator_.logFileAction("readLuminosityBlock_");
edm::Service<DQMStore> store;

const DQMFileIterator::LumiEntry& lumi = fiterator_.front();
std::string p = fiterator_.make_path_data(lumi);
edm::Service<edm::JobReport> jr;
jr->reportInputLumiSection(lbCache.id().run(),
lbCache.id().luminosityBlock());
lbCache.fillLuminosityBlockPrincipal(processHistoryRegistryForUpdate());

// clear the old lumi histograms
std::vector<MonitorElement*> allMEs = store->getAllContents("");
for (auto const& ME : allMEs) {
// We do not want to reset Run Products here!
Expand All @@ -105,16 +98,20 @@ void DQMProtobufReader::readLuminosityBlock_(
}
}

// load the new file
const DQMFileIterator::LumiEntry& lumi = fiterator_.front();
std::string p = fiterator_.make_path_data(lumi);
if (! boost::filesystem::exists(p)) {
fiterator_.logFileAction("Data file is missing ", p);
fiterator_.pop();
return;
}

fiterator_.logFileAction("Initiating request to open file ", p);
fiterator_.logFileAction("Successfully opened file ", p);
store->load(p);
fiterator_.logFileAction("Closed file ", p);
fiterator_.pop();

edm::Service<edm::JobReport> jr;
jr->reportInputLumiSection(lbCache.id().run(),
lbCache.id().luminosityBlock());
lbCache.fillLuminosityBlockPrincipal(processHistoryRegistryForUpdate());
};

void DQMProtobufReader::readEvent_(edm::EventPrincipal&) {};
Expand Down
2 changes: 1 addition & 1 deletion DQMServices/StreamerIO/test/DQMStreamerOutputModule.cc
Expand Up @@ -174,7 +174,7 @@ void DQMStreamerOutputModule::stop() const {
ptree pt;
ptree data;

ptree child1, child2, child3;
ptree child1, child2, child3, child4;

child1.put("", processed_); // Processed
child2.put("", processed_); // Processed
Expand Down

0 comments on commit 3826165

Please sign in to comment.