#include <SQLReport.h>
Public Member Functions | |
bool | putOnFile (std::string fileName=std::string("")) |
void | reportForConnection (const std::string &connectionString) |
SQLReport (DbConnection &connection) | |
virtual | ~SQLReport () |
Private Member Functions | |
SQLReport () | |
Private Attributes | |
DbConnection | m_connection |
std::stringstream | m_report |
Definition at line 11 of file SQLReport.h.
cond::SQLReport::SQLReport | ( | DbConnection & | connection | ) | [inline, explicit] |
Definition at line 35 of file SQLReport.h.
:m_connection(connection),m_report(){ }
virtual cond::SQLReport::~SQLReport | ( | ) | [inline, virtual] |
Definition at line 17 of file SQLReport.h.
{}
cond::SQLReport::SQLReport | ( | ) | [private] |
bool cond::SQLReport::putOnFile | ( | std::string | fileName = std::string("") | ) |
Definition at line 13 of file SQLReport.cc.
References Exception, MatrixRunner::msg, cmsMakeMELists::outFile, and SQLREPORT_DEFAULT_FILENAME().
Referenced by cond::Utilities::run().
{ std::ofstream outFile; if(fileName.empty()) fileName.append(SQLREPORT_DEFAULT_FILENAME); outFile.open(fileName.c_str()); if(!outFile.good()){ std::stringstream msg; msg << "Cannot open the output file \""<<fileName<<"\""; outFile.close(); throw cond::Exception(msg.str()); } outFile << m_report.str(); outFile.flush(); outFile.close(); return true; }
void cond::SQLReport::reportForConnection | ( | const std::string & | connectionString | ) |
Definition at line 8 of file SQLReport.cc.
References m_connection, m_report, and cond::DbConnection::monitoringReporter().
Referenced by cond::Utilities::run().
{ m_report << "-- connection: "<< connectionString << std::endl; m_connection.monitoringReporter().reportToOutputStream( connectionString, m_report ); }
DbConnection cond::SQLReport::m_connection [private] |
Definition at line 27 of file SQLReport.h.
Referenced by reportForConnection().
std::stringstream cond::SQLReport::m_report [private] |
Definition at line 29 of file SQLReport.h.
Referenced by reportForConnection().