12 return fParam ==
"defaults";
15 bool asciiFile (
const std::string fParam) {
16 return fParam.find (
':') == std::string::npos && std::string (fParam, fParam.length () - 4) ==
".txt";
19 bool xmlFile (
const std::string fParam) {
20 return fParam.find (
':') == std::string::npos && std::string (fParam, fParam.length () - 4) ==
".xml";
23 bool dbFile (
const std::string fParam) {
24 return fParam.find (
':') != std::string::npos;
28 bool getObject (
T* fObject,
const std::string& fDb,
const std::string& fTag,
int fRun) {
29 if (!fObject)
return false;
30 if (fDb.empty ())
return false;
32 std::cout <<
"HcalLedAnalyzer-> USE INPUT: ASCII " << std::endl;
33 std::ifstream stream (fDb.c_str ());
38 std::cout <<
"HcalLedAnalyzer-> USE INPUT: Pool " << fDb << std::endl;
39 std::cout <<
"HcalPedestalAnalyzer-> Pool interface is not supportet since 1.3.0" << fDb << std::endl;
45 std::cerr <<
"HcalLedAnalyzer-> Unknown input type " << fDb << std::endl;
62 const char* foo1 =
"CORAL_AUTH_USER=blah";
63 const char* foo2 =
"CORAL_AUTH_PASSWORD=blah";
64 if (!::getenv(
"CORAL_AUTH_USER")) ::putenv(const_cast<char*>(foo1));
65 if (!::getenv(
"CORAL_AUTH_PASSWORD")) ::putenv(const_cast<char*>(foo2));
80 std::cerr <<
"HcalLedAnalyzer-> Failed to get pedestal values" << std::endl;
121 std::cout <<
"HcalLedAnalyzer: analyzed " <<
m_ievt <<
" events" << std::endl;
std::string m_inputPedestals_source
T getUntrackedParameter(std::string const &, T const &) const
HcalLedAnalysis * m_ledAnal
TObject * getObject(TDirectory *fDir, const std::vector< std::string > &fObjectName)
void LedSetup(const std::string &m_outputFileROOT)
bool defaultsFile(const std::string fParam)
~HcalLedAnalyzer()
Destructor.
void processLedEvent(const HBHEDigiCollection &hbhe, const HODigiCollection &ho, const HFDigiCollection &hf, const HcalCalibDigiCollection calib, const HcalDbService &cond)
bool getByType(Handle< PROD > &result) const
void analyze(const edm::Event &e, const edm::EventSetup &c)
Analyze.
MVATrainerComputer * calib
HcalLedAnalyzer(const edm::ParameterSet &ps)
Constructor.
bool dbFile(const std::string fParam)
bool xmlFile(const std::string fParam)
bool getObject(std::istream &fInput, HcalPedestals *fObject)
std::string m_inputPedestals_tag
bool asciiFile(const std::string fParam)