#include <CondTools/RunInfo/interface/L1TriggerScalerHandler.h>
Public Member Functions | |
void | getNewObjects () |
std::string | id () const |
L1TriggerScalerHandler (const edm::ParameterSet &pset) | |
~L1TriggerScalerHandler () | |
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 L1TriggerScalerHandler.h.
L1TriggerScalerHandler::~L1TriggerScalerHandler | ( | ) |
L1TriggerScalerHandler::L1TriggerScalerHandler | ( | const edm::ParameterSet & | pset | ) |
Definition at line 21 of file L1TriggerScalerHandler.cc.
References m_connectionString.
00021 : 00022 m_name(pset.getUntrackedParameter<std::string>("name","L1TriggerScalerHandler")), 00023 // m_connect(pset.getUntrackedParameter<std::string>("OnlineConn","")), 00024 //m_authpath(pset.getUntrackedParameter<std::string>("OnlineAuthPath",".")), 00025 //m_host(pset.getUntrackedParameter<std::string>("OnlineDBHost","cmsor1-v.cern.ch")), 00026 // m_sid(pset.getUntrackedParameter<std::string>("OnlineDBSID","omds")), 00027 00028 m_user(pset.getUntrackedParameter<std::string>("OnlineDBUser","CMS_RUNINFO")), 00029 m_pass(pset.getUntrackedParameter<std::string>("OnlineDBPass","XXXXXXX")) 00030 // m_port(pset.getUntrackedParameter<int>("OnlineDBPort",10121)) 00031 { 00032 m_connectionString= "oracle://cms_omds_lb/CMS_RUNINFO"; 00033 00034 }
void L1TriggerScalerHandler::getNewObjects | ( | ) | [virtual] |
... understand how to know in advise the lumisection_number
Implements popcon::PopConSourceHandler< L1TriggerScaler >.
Definition at line 41 of file L1TriggerScalerHandler.cc.
References TestMuL1L2Filter_cff::cerr, GenMuonPlsPt100GeV_cfg::cout, lat::endl(), cond::TagInfo::lastInterval, popcon::PopConSourceHandler< L1TriggerScaler >::lastPayload(), cond::TagInfo::lastPayloadToken, m_connectionString, m_name, m_pass, L1TriggerScaler::m_run, popcon::PopConSourceHandler< L1TriggerScaler >::m_to_transfer, m_user, popcon::PopConSourceHandler< L1TriggerScaler >::m_userTextLog, cond::TagInfo::name, r, L1TriggerScalerRead::readData(), cond::TagInfo::size, size, ss, and popcon::PopConSourceHandler< L1TriggerScaler >::tagInfo().
00041 { 00042 edm::LogInfo ("L1TriggerScalerHandler") << "------- " << m_name 00043 << " - > getNewObjects\n" << 00044 //check whats already inside of database 00045 "got offlineInfo"<< 00046 tagInfo().name << ", size " << tagInfo().size 00047 << ", last object valid since " 00048 << tagInfo().lastInterval.first << " token " 00049 << tagInfo().lastPayloadToken << std::endl; 00050 00051 00052 if (tagInfo().size>0) { 00053 Ref payload = lastPayload(); 00054 edm::LogInfo ("L1TriggerScalerHandler")<<"size of last payload "<< 00055 payload->m_run.size()<<std::endl; 00056 } 00057 00058 int snc; 00059 00060 std::cerr << "Source implementation test ::getNewObjects : enter runnumber as a first since ! \n"; 00061 std::cin >> snc; 00062 00063 00064 00065 00066 std::cout<<"runnumber/first since = "<< snc <<std::endl; 00067 00068 00070 00071 L1TriggerScaler * r = new L1TriggerScaler(); 00072 00073 00074 00075 // reading from omds 00076 L1TriggerScalerRead rn( m_connectionString, m_user, m_pass); 00077 std::vector<L1TriggerScaler::Lumi> l1lumiscaler_array; 00078 00079 00080 00081 l1lumiscaler_array = rn.readData((int)snc ); 00082 00083 L1TriggerScaler::Lumi rnfill; 00084 std::vector<L1TriggerScaler::Lumi>::iterator Iit; 00085 for(Iit = l1lumiscaler_array.begin() ; Iit != l1lumiscaler_array.end(); Iit++) 00086 { 00087 rnfill = *(Iit); 00088 r->m_run.push_back(rnfill); 00089 } 00090 00091 m_to_transfer.push_back(std::make_pair((L1TriggerScaler*)r,snc)); 00092 std::ostringstream ss; 00093 ss << "since =" << snc; 00094 00095 00096 00097 m_userTextLog = ss.str()+";"; 00098 00099 00100 edm::LogInfo ("L1TriggerScalerHandler") << "------- " << m_name << " - > getNewObjects" << std::endl; 00101 00102 00103 }
std::string L1TriggerScalerHandler::id | ( | void | ) | const [inline, virtual] |
Implements popcon::PopConSourceHandler< L1TriggerScaler >.
Definition at line 42 of file L1TriggerScalerHandler.h.
References m_name.
00042 { return m_name;}
std::string L1TriggerScalerHandler::m_authpath [private] |
Definition at line 55 of file L1TriggerScalerHandler.h.
std::string L1TriggerScalerHandler::m_connectionString [private] |
Definition at line 53 of file L1TriggerScalerHandler.h.
Referenced by getNewObjects(), and L1TriggerScalerHandler().
std::string L1TriggerScalerHandler::m_host [private] |
Definition at line 56 of file L1TriggerScalerHandler.h.
std::string L1TriggerScalerHandler::m_name [private] |
std::string L1TriggerScalerHandler::m_pass [private] |
int L1TriggerScalerHandler::m_port [private] |
Definition at line 60 of file L1TriggerScalerHandler.h.
std::string L1TriggerScalerHandler::m_sid [private] |
Definition at line 57 of file L1TriggerScalerHandler.h.
unsigned long long L1TriggerScalerHandler::m_since [private] |
Definition at line 49 of file L1TriggerScalerHandler.h.
std::string L1TriggerScalerHandler::m_user [private] |