#include <RunSummaryHandler.h>
Public Member Functions | |
void | getNewObjects () |
std::string | id () const |
RunSummaryHandler (const edm::ParameterSet &pset) | |
~RunSummaryHandler () | |
Private Attributes | |
std::string | m_authpath |
std::string | m_connectionString |
std::string | m_host |
std::string | m_name |
std::string | m_pass |
int | m_port |
std::string | m_sid |
unsigned long long | m_since |
std::string | m_user |
Definition at line 10 of file RunSummaryHandler.h.
RunSummaryHandler::~RunSummaryHandler | ( | ) |
Definition at line 21 of file RunSummaryHandler.cc.
{ }
RunSummaryHandler::RunSummaryHandler | ( | const edm::ParameterSet & | pset | ) |
Definition at line 9 of file RunSummaryHandler.cc.
References m_connectionString.
: m_name(pset.getUntrackedParameter<std::string>("name","RunSummaryHandler")), // m_connect(pset.getUntrackedParameter<std::string>("OnlineConn","")), m_user(pset.getUntrackedParameter<std::string>("OnlineDBUser","CMS_RUNINFO")), m_pass(pset.getUntrackedParameter<std::string>("OnlineDBPass","********")) { m_connectionString= "oracle://cms_omds_lb/CMS_RUNINFO"; }
void RunSummaryHandler::getNewObjects | ( | ) | [virtual] |
Implements popcon::PopConSourceHandler< RunSummary >.
Definition at line 26 of file RunSummaryHandler.cc.
References ExpressReco_HICollisions_FallBack::cerr, gather_cfg::cout, RunSummary::Fake_RunSummary(), cond::TagInfo::lastInterval, cond::TagInfo::lastPayloadToken, m_connectionString, m_name, m_pass, popcon::PopConSourceHandler< RunSummary >::m_to_transfer, m_user, popcon::PopConSourceHandler< RunSummary >::m_userTextLog, cond::TagInfo::name, csvReporter::r, RunSummaryRead::readData(), findQualityFiles::size, cond::TagInfo::size, and popcon::PopConSourceHandler< RunSummary >::tagInfo().
{ edm::LogInfo ("RunSummaryHandler") << "------- " << m_name << " - > getNewObjects\n" << //check whats already inside of database "got offlineInfo"<< tagInfo().name << ", size " << tagInfo().size << ", last object valid since " << tagInfo().lastInterval.first << " token " << tagInfo().lastPayloadToken << std::endl; /* if (tagInfo().size>0) { Ref payload = lastPayload(); //edm::LogInfo ("RunSummaryHandler")<<"size of last payload "<< // payload->..........size()<<std::endl; } */ unsigned int snc; std::cerr << "Source implementation test ::getNewObjects : enter runnumber as a first since ! \n"; std::cin >> snc; std::cout<<"runnumber/first since = "<< snc <<std::endl; RunSummary * r = new RunSummary(); //fill with null runsummary if empty run are found beetween the two last validones size_t n_empty_run=0; if (tagInfo().size>0 && (tagInfo().lastInterval.first+1) < snc){ n_empty_run = snc- tagInfo().lastInterval.first - 1; edm::LogInfo ("RunSummaryHandler") << "------- " << "entering fake run from " << tagInfo().lastInterval.first + 1 << "to " << snc -1 << "- > getNewObjects" << std::endl; n_empty_run = snc- tagInfo().lastInterval.first - 1; // for (size_t i=1; i<= n_empty_run ; i++){ // r->summary.push_back(empty->fake_Run()); // } } // transfer fake run for 1 to since for the first time if (tagInfo().size==0){ m_to_transfer.push_back(std::make_pair((RunSummary*) (r->Fake_RunSummary()),1)); } // transfer also empty run if tag already existing if (n_empty_run!=0) { m_to_transfer.push_back(std::make_pair((RunSummary*) (r->Fake_RunSummary()),tagInfo().lastInterval.first + 1)); } // reading from omds RunSummaryRead rn( m_connectionString, m_user, m_pass); *r = rn.readData("RUNSESSION_PARAMETER", "STRING_VALUE",(int)snc ); m_to_transfer.push_back(std::make_pair((RunSummary*)r,snc)); std::ostringstream ss; ss << "since =" << snc; m_userTextLog = ss.str()+";"; edm::LogInfo ("RunSummaryHandler") << "------- " << m_name << " - > getNewObjects" << std::endl; }
std::string RunSummaryHandler::id | ( | void | ) | const [inline, virtual] |
Implements popcon::PopConSourceHandler< RunSummary >.
Definition at line 13 of file RunSummaryHandler.h.
References m_name.
{ return m_name;}
std::string RunSummaryHandler::m_authpath [private] |
Definition at line 24 of file RunSummaryHandler.h.
std::string RunSummaryHandler::m_connectionString [private] |
Definition at line 22 of file RunSummaryHandler.h.
Referenced by getNewObjects(), and RunSummaryHandler().
std::string RunSummaryHandler::m_host [private] |
Definition at line 25 of file RunSummaryHandler.h.
std::string RunSummaryHandler::m_name [private] |
Definition at line 17 of file RunSummaryHandler.h.
Referenced by getNewObjects(), and id().
std::string RunSummaryHandler::m_pass [private] |
Definition at line 28 of file RunSummaryHandler.h.
Referenced by getNewObjects().
int RunSummaryHandler::m_port [private] |
Definition at line 29 of file RunSummaryHandler.h.
std::string RunSummaryHandler::m_sid [private] |
Definition at line 26 of file RunSummaryHandler.h.
unsigned long long RunSummaryHandler::m_since [private] |
Definition at line 18 of file RunSummaryHandler.h.
std::string RunSummaryHandler::m_user [private] |
Definition at line 27 of file RunSummaryHandler.h.
Referenced by getNewObjects().