CMS 3D CMS Logo

cond::SQLReport Class Reference

#include <CondCore/DBCommon/interface/SQLReport.h>

List of all members.

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 DBSessionm_session


Detailed Description

Definition at line 10 of file SQLReport.h.


Constructor & Destructor Documentation

cond::SQLReport::SQLReport ( const DBSession session  )  [inline, explicit]

Definition at line 34 of file SQLReport.h.

00034                                                 :m_session(session),m_report(){
00035 }

virtual cond::SQLReport::~SQLReport (  )  [inline, virtual]

Definition at line 16 of file SQLReport.h.

00016 {}

cond::SQLReport::SQLReport (  )  [private]


Member Function Documentation

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 }


Member Data Documentation

std::stringstream cond::SQLReport::m_report [private]

Definition at line 28 of file SQLReport.h.

Referenced by putOnFile(), and reportForConnection().

const DBSession& cond::SQLReport::m_session [private]

Definition at line 26 of file SQLReport.h.

Referenced by reportForConnection().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:36:49 2009 for CMSSW by  doxygen 1.5.4