#include <CondTools/RunInfo/interface/RunInfoHandler.h>
Public Member Functions | |
void | getNewObjects () |
std::string | id () const |
RunInfoHandler (const edm::ParameterSet &pset) | |
~RunInfoHandler () | |
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 39 of file RunInfoHandler.h.
RunInfoHandler::~RunInfoHandler | ( | ) |
RunInfoHandler::RunInfoHandler | ( | const edm::ParameterSet & | pset | ) |
Definition at line 19 of file RunInfoHandler.cc.
References m_connectionString.
00019 : 00020 m_name(pset.getUntrackedParameter<std::string>("name","RunInfoHandler")), 00021 // m_connect(pset.getUntrackedParameter<std::string>("OnlineConn","")), 00022 00023 m_user(pset.getUntrackedParameter<std::string>("OnlineDBUser","CMS_RUNINFO")), 00024 m_pass(pset.getUntrackedParameter<std::string>("OnlineDBPass","XXXXXXX")) 00025 00026 { 00027 m_connectionString= "oracle://cms_omds_lb/CMS_RUNINFO"; 00028 00029 }
void RunInfoHandler::getNewObjects | ( | ) | [virtual] |
Implements popcon::PopConSourceHandler< RunInfo >.
Definition at line 36 of file RunInfoHandler.cc.
References TestMuL1L2Filter_cff::cerr, GenMuonPlsPt100GeV_cfg::cout, lat::endl(), RunInfo::Fake_RunInfo(), cond::TagInfo::lastInterval, cond::TagInfo::lastPayloadToken, m_connectionString, m_name, m_pass, popcon::PopConSourceHandler< RunInfo >::m_to_transfer, m_user, popcon::PopConSourceHandler< RunInfo >::m_userTextLog, cond::TagInfo::name, r, RunInfoRead::readData(), cond::TagInfo::size, size, ss, and popcon::PopConSourceHandler< RunInfo >::tagInfo().
00036 { 00037 edm::LogInfo ("RunInfoHandler") << "------- " << m_name 00038 << " - > getNewObjects\n" << 00039 //check whats already inside of database 00040 "got offlineInfo"<< 00041 tagInfo().name << ", size " << tagInfo().size 00042 << ", last object valid since " 00043 << tagInfo().lastInterval.first << " token " 00044 << tagInfo().lastPayloadToken << std::endl; 00045 00046 00047 unsigned int snc; 00048 00049 00050 std::cerr << "Source implementation test ::getNewObjects : enter runnumber as a first since ! \n"; 00051 std::cin >> snc; 00052 00053 00054 std::cout<<"runnumber/first since = "<< snc <<std::endl; 00055 00056 00057 00058 00059 RunInfo * r = new RunInfo(); 00060 00061 00062 //fill with null runsummary if empty run are found beetween the two last validones 00063 00064 size_t n_empty_run=0; 00065 if (tagInfo().size>0 && (tagInfo().lastInterval.first+1) < snc){ 00066 n_empty_run = snc- tagInfo().lastInterval.first - 1; 00067 edm::LogInfo ("RunInfoHandler") << "------- " << "entering fake run from " << tagInfo().lastInterval.first + 1 << "to " << snc -1 << "- > getNewObjects" << std::endl; 00068 n_empty_run = snc- tagInfo().lastInterval.first - 1; 00069 00070 } 00071 00072 00073 // reading from omds 00074 RunInfoRead rn( m_connectionString, m_user, m_pass); 00075 00076 if (n_empty_run!=0) { 00077 m_to_transfer.push_back(std::make_pair((RunInfo*) (r->Fake_RunInfo()),tagInfo().lastInterval.first + 1)); 00078 } 00079 00080 *r = rn.readData("RUNSESSION_PARAMETER", "STRING_VALUE",(int)snc ); 00081 m_to_transfer.push_back(std::make_pair((RunInfo*)r,snc)); 00082 std::ostringstream ss; 00083 ss << "since =" << snc; 00084 00085 00086 00087 m_userTextLog = ss.str()+";"; 00088 00089 00090 edm::LogInfo ("RunInfoHandler") << "------- " << m_name << " - > getNewObjects" << std::endl; 00091 00092 00093 }
std::string RunInfoHandler::id | ( | void | ) | const [inline, virtual] |
Implements popcon::PopConSourceHandler< RunInfo >.
Definition at line 42 of file RunInfoHandler.h.
References m_name.
00042 { return m_name;}
std::string RunInfoHandler::m_authpath [private] |
Definition at line 55 of file RunInfoHandler.h.
std::string RunInfoHandler::m_connectionString [private] |
Definition at line 53 of file RunInfoHandler.h.
Referenced by getNewObjects(), and RunInfoHandler().
std::string RunInfoHandler::m_host [private] |
Definition at line 56 of file RunInfoHandler.h.
std::string RunInfoHandler::m_name [private] |
std::string RunInfoHandler::m_pass [private] |
int RunInfoHandler::m_port [private] |
Definition at line 60 of file RunInfoHandler.h.
std::string RunInfoHandler::m_sid [private] |
Definition at line 57 of file RunInfoHandler.h.
unsigned long long RunInfoHandler::m_since [private] |
Definition at line 49 of file RunInfoHandler.h.
std::string RunInfoHandler::m_user [private] |