#include "FWCore/Framework/interface/EventSetup.h"
#include "CalibFormats/HcalObjects/interface/HcalDbRecord.h"
#include <CalibCalorimetry/HcalStandardModules/interface/HcalPedestalAnalyzer.h>
#include "CondTools/Hcal/interface/HcalDbOnline.h"
#include "CondTools/Hcal/interface/HcalDbXml.h"
#include "CondFormats/HcalObjects/interface/HcalPedestals.h"
#include "CondFormats/HcalObjects/interface/HcalPedestalWidths.h"
Go to the source code of this file.
Functions | |
bool | asciiFile (const std::string fParam) |
bool | dbFile (const std::string fParam) |
bool | defaultsFile (const std::string fParam) |
bool | dumpXmlPedestals (const HcalPedestals &fObject, const HcalPedestalWidths &fWidth, const std::string &fXml, const std::string &fTag, int fRun) |
template<class T> | |
bool | getObject (T *fObject, const std::string &fDb, const std::string &fTag, int fRun) |
bool | masterDb (const std::string fParam) |
template<class T> | |
bool | putObject (T **fObject, const std::string &fDb, const std::string &fTag, int fRun) |
bool | xmlFile (const std::string fParam) |
bool @817::asciiFile | ( | const std::string | fParam | ) | [static] |
Definition at line 27 of file HcalPedestalAnalyzer.cc.
00027 { 00028 return fParam.find (':') == std::string::npos && std::string (fParam, fParam.length () - 4) == ".txt"; 00029 }
bool @817::dbFile | ( | const std::string | fParam | ) | [static] |
bool @817::defaultsFile | ( | const std::string | fParam | ) | [static] |
bool @817::dumpXmlPedestals | ( | const HcalPedestals & | fObject, | |
const HcalPedestalWidths & | fWidth, | |||
const std::string & | fXml, | |||
const std::string & | fTag, | |||
int | fRun | |||
) | [static] |
Definition at line 71 of file HcalPedestalAnalyzer.cc.
References GenMuonPlsPt100GeV_cfg::cout, HcalDbXml::dumpObject(), lat::endl(), and HLT_VtxMuL3::result.
Referenced by HcalPedestalAnalyzer::endJob().
00071 { 00072 std::cout << "HcalPedestalAnalyzer-> USE OUTPUT: XML" << std::endl; 00073 std::ofstream stream (fXml.c_str ()); 00074 bool result = HcalDbXml::dumpObject (stream, fRun, fRun, 0, fTag, fObject, fWidth); 00075 stream.close (); 00076 return result; 00077 }
bool @817::getObject | ( | T * | fObject, | |
const std::string & | fDb, | |||
const std::string & | fTag, | |||
int | fRun | |||
) | [inline, static] |
Definition at line 44 of file HcalPedestalAnalyzer.cc.
References asciiFile(), TestMuL1L2Filter_cff::cerr, GenMuonPlsPt100GeV_cfg::cout, dbFile(), lat::endl(), HcalDbASCIIIO::getObject(), HcalDbOnline::getObject(), and masterDb().
00044 { 00045 if (!fObject) return false; 00046 if (fDb.empty ()) return false; 00047 if (asciiFile (fDb)) { 00048 std::cout << "HcalPedestalAnalyzer-> USE INPUT: ASCII " << std::endl; 00049 std::ifstream stream (fDb.c_str ()); 00050 HcalDbASCIIIO::getObject (stream, fObject); 00051 return true; 00052 } 00053 else if (dbFile (fDb)) { 00054 std::cout << "HcalPedestalAnalyzer-> USE INPUT: Pool " << fDb << std::endl; 00055 std::cout << "HcalPedestalAnalyzer-> Pool interface is not supportet since 1.3.0" << fDb << std::endl; 00056 return false; 00057 // HcalDbTool poolDb (fDb); 00058 // return poolDb.getObject (fObject, fTag, fRun); 00059 } 00060 else if (masterDb (fDb)) { 00061 std::cout << "HcalPedestalAnalyzer-> USE INPUT: MasterDB " << fDb << std::endl; 00062 HcalDbOnline masterDb (fDb); 00063 return masterDb.getObject (fObject, fTag, fRun); 00064 } 00065 else { 00066 std::cerr << "HcalPedestalAnalyzer-> Unknown input type " << fDb << std::endl; 00067 return false; 00068 } 00069 }
bool @817::masterDb | ( | const std::string | fParam | ) | [static] |
bool @817::putObject | ( | T ** | fObject, | |
const std::string & | fDb, | |||
const std::string & | fTag, | |||
int | fRun | |||
) | [inline, static] |
Definition at line 80 of file HcalPedestalAnalyzer.cc.
References asciiFile(), TestMuL1L2Filter_cff::cerr, GenMuonPlsPt100GeV_cfg::cout, dbFile(), HcalDbASCIIIO::dumpObject(), and lat::endl().
00080 { 00081 if (!fObject || !*fObject) return false; 00082 if (fDb.empty ()) return false; 00083 if (asciiFile (fDb)) { 00084 std::cout << "HcalPedestalAnalyzer-> USE OUTPUT: ASCII " << std::endl; 00085 std::ofstream stream (fDb.c_str ()); 00086 HcalDbASCIIIO::dumpObject (stream, **fObject); 00087 return true; 00088 } 00089 else if (dbFile (fDb)) { 00090 std::cout << "HcalPedestalAnalyzer-> USE OUTPUT: Pool " << fDb << std::endl; 00091 std::cout << "HcalPedestalAnalyzer-> Pool interface is not supportet since 1.3.0" << fDb << std::endl; 00092 return false; 00093 // HcalDbTool poolDb (fDb); 00094 // bool result = poolDb.putObject (*fObject, fTag, fRun); 00095 // if (result) *fObject = 0; // owned by POOL 00096 // return result; 00097 } 00098 else { 00099 std::cerr << "HcalPedestalAnalyzer-> Unknown output type " << fDb << std::endl; 00100 return false; 00101 } 00102 }
bool @817::xmlFile | ( | const std::string | fParam | ) | [static] |
Definition at line 31 of file HcalPedestalAnalyzer.cc.
00031 { 00032 return fParam.find (':') == std::string::npos && std::string (fParam, fParam.length () - 4) == ".xml"; 00033 }