#include <CondCore/DBCommon/interface/SQLReport.h>
Public Member Functions | |
bool | putOnFile (std::string fileName=std::string("")) |
void | reportForConnection (const std::string &connectionString) |
SQLReport (const DBSession &session) | |
virtual | ~SQLReport () |
Private Member Functions | |
SQLReport () | |
Private Attributes | |
std::stringstream | m_report |
const DBSession & | m_session |
Definition at line 10 of file SQLReport.h.
cond::SQLReport::SQLReport | ( | const DBSession & | session | ) | [inline, explicit] |
virtual cond::SQLReport::~SQLReport | ( | ) | [inline, virtual] |
cond::SQLReport::SQLReport | ( | ) | [private] |
bool cond::SQLReport::putOnFile | ( | std::string | fileName = std::string("") |
) |
Definition at line 14 of file SQLReport.cc.
References Exception, m_report, alivecheck_mergeAndRegister::msg, and SQLREPORT_DEFAULT_FILENAME().
00014 { 00015 std::ofstream outFile; 00016 if(fileName.empty()) fileName.append(SQLREPORT_DEFAULT_FILENAME); 00017 outFile.open(fileName.c_str()); 00018 if(!outFile.good()){ 00019 std::stringstream msg; 00020 msg << "Cannot open the output file \""<<fileName<<"\""; 00021 outFile.close(); 00022 throw cond::Exception(msg.str()); 00023 } 00024 outFile << m_report.str(); 00025 outFile.flush(); 00026 outFile.close(); 00027 return true; 00028 }
void cond::SQLReport::reportForConnection | ( | const std::string & | connectionString | ) |
Definition at line 9 of file SQLReport.cc.
References lat::endl(), m_report, m_session, and cond::DBSession::monitoringReporter().
00009 { 00010 m_report << "-- connection: "<< connectionString << std::endl; 00011 m_session.monitoringReporter().reportToOutputStream( connectionString, m_report ); 00012 }
std::stringstream cond::SQLReport::m_report [private] |
const DBSession& cond::SQLReport::m_session [private] |