CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

DQMFileReader Class Reference

#include <DQMFileReader.h>

Inheritance diagram for DQMFileReader:
edm::EDAnalyzer

List of all members.

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

DQMStoredbe_
std::vector< std::string > filenames_
edm::ParameterSet pset_
std::string referenceFileName_

Detailed Description

Definition at line 23 of file DQMFileReader.h.


Constructor & Destructor Documentation

DQMFileReader::DQMFileReader ( const edm::ParameterSet ps) [explicit]
DQMFileReader::~DQMFileReader ( )

Definition at line 17 of file DQMFileReader.cc.

{}

Member Function Documentation

void DQMFileReader::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
) [private, virtual]

Implements edm::EDAnalyzer.

Definition at line 68 of file DQMFileReader.cc.

{}
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(), AlCaHLTBitMon_QueryRunRegistry::string, 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]

Reimplemented from edm::EDAnalyzer.

Definition at line 64 of file DQMFileReader.cc.

{}

Member Data Documentation

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().

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().