#include <DQMFileReader.h>
Public Member Functions | |
DQMFileReader (const edm::ParameterSet &) | |
~DQMFileReader () | |
Private Member Functions | |
virtual void | analyze (const edm::Event &, const edm::EventSetup &) |
virtual void | beginJob () |
virtual void | endJob () |
Private Attributes | |
DQMStore * | dbe_ |
std::vector< std::string > | filenames_ |
edm::ParameterSet | pset_ |
std::string | referenceFileName_ |
Definition at line 23 of file DQMFileReader.h.
DQMFileReader::DQMFileReader | ( | const edm::ParameterSet & | ps | ) | [explicit] |
Definition at line 5 of file DQMFileReader.cc.
References dbe_, filenames_, edm::ParameterSet::getUntrackedParameter(), cmsCodeRules::cppFunctionSkipper::operator, pset_, and referenceFileName_.
{ pset_ = ps; dbe_ = edm::Service<DQMStore>().operator->(); filenames_.clear(); filenames_=pset_.getUntrackedParameter<std::vector<std::string > >("FileNames"); referenceFileName_=pset_.getUntrackedParameter<std::string>("referenceFileName",""); }
DQMFileReader::~DQMFileReader | ( | ) |
Definition at line 17 of file DQMFileReader.cc.
{}
void DQMFileReader::analyze | ( | const edm::Event & | iEvent, |
const edm::EventSetup & | iSetup | ||
) | [private, virtual] |
void DQMFileReader::beginJob | ( | void | ) | [private, virtual] |
Reimplemented from edm::EDAnalyzer.
Definition at line 21 of file DQMFileReader.cc.
References DQMStore::bookString(), validate_alignment_devdb10_cfg::catalog, DQMStore::cd(), gather_cfg::cout, dbe_, alignCSCRings::ff, edm::InputFileCatalog::fileNames(), filenames_, i, recoMuon::in, DQMStore::load(), DQMStore::open(), referenceFileName_, DQMStore::setCurrentFolder(), and DQMStore::StripRunDirs.
{ if (referenceFileName_ != "") { const std::string override = ""; std::vector<std::string> in ; in.push_back(referenceFileName_); edm::InputFileCatalog catalog(in,override,true); std::string ff=catalog.fileNames()[0]; std::cout << "DQMFileReader: reading reference file '" << ff << "'\n"; // now open file, quietly continuing if it does not exist if (dbe_->open(ff, true, "", "Reference", DQMStore::StripRunDirs, false)) { dbe_->cd(); dbe_->setCurrentFolder("Info/ProvInfo"); dbe_->bookString("referenceFileName",ff); std::cout << "DQMFileReader: reference file '" << ff << "' successfully read in \n"; } else { dbe_->cd(); dbe_->setCurrentFolder("Info/ProvInfo"); dbe_->bookString("referenceFileName","non-existent:"+ff); std::cout << "DQMFileReader: reference file '" << ff << "' does not exist \n"; } dbe_->cd(); return; } dbe_->bookString("referenceFileName","no reference file specified"); dbe_->cd(); // read in files, stripping off Run Summary and Run <number> folders for (unsigned int i=0; i<filenames_.size(); i++) { std::cout << "DQMFileReader::beginJob: loading" << filenames_[i] << std::endl; if (dbe_) dbe_->load(filenames_[i]); } }
void DQMFileReader::endJob | ( | void | ) | [private, virtual] |
DQMStore* DQMFileReader::dbe_ [private] |
Definition at line 34 of file DQMFileReader.h.
Referenced by beginJob(), and DQMFileReader().
std::vector<std::string > DQMFileReader::filenames_ [private] |
Definition at line 37 of file DQMFileReader.h.
Referenced by beginJob(), and DQMFileReader().
edm::ParameterSet DQMFileReader::pset_ [private] |
Definition at line 35 of file DQMFileReader.h.
Referenced by DQMFileReader().
std::string DQMFileReader::referenceFileName_ [private] |
Definition at line 38 of file DQMFileReader.h.
Referenced by beginJob(), and DQMFileReader().