CMS 3D CMS Logo

L1TriggerScalerHandler.cc
Go to the documentation of this file.
5 #include<iostream>
6 #include<vector>
7 
9  m_name(pset.getUntrackedParameter<std::string>("name","L1TriggerScalerHandler")),
10  // m_connect(pset.getUntrackedParameter<std::string>("OnlineConn","")),
11  //m_authpath(pset.getUntrackedParameter<std::string>("OnlineAuthPath",".")),
12  //m_host(pset.getUntrackedParameter<std::string>("OnlineDBHost","cmsor1-v.cern.ch")),
13  // m_sid(pset.getUntrackedParameter<std::string>("OnlineDBSID","omds")),
14 
15  m_user(pset.getUntrackedParameter<std::string>("OnlineDBUser","CMS_RUNINFO")),
16  m_pass(pset.getUntrackedParameter<std::string>("OnlineDBPass","XXXXXXX"))
17  // m_port(pset.getUntrackedParameter<int>("OnlineDBPort",10121))
18 {
19  m_connectionString= "oracle://cms_omds_lb/CMS_RUNINFO";
20 
21 }
22 
24 {
25 
26 }
27 
29  edm::LogInfo ("L1TriggerScalerHandler") << "------- " << m_name
30  << " - > getNewObjects\n" <<
31  //check whats already inside of database
32  "got offlineInfo"<<
33  tagInfo().name << ", size " << tagInfo().size
34  << ", last object valid since "
35  << tagInfo().lastInterval.first << " token "
36  << tagInfo().lastPayloadToken << std::endl;
37 
38 
39  if (tagInfo().size>0) {
41  edm::LogInfo ("L1TriggerScalerHandler")<<"size of last payload "<<
42  payload->m_run.size()<<std::endl;
43  }
44 
45  int snc;
46 
47  std::cerr << "Source implementation test ::getNewObjects : enter runnumber as a first since ! \n";
48  std::cin >> snc;
49 
50 
51 
52 
53  std::cout<<"runnumber/first since = "<< snc <<std::endl;
54 
55 
57 
59 
60 
61 
62  // reading from omds
64  std::vector<L1TriggerScaler::Lumi> l1lumiscaler_array;
65 
66 
67 
68  l1lumiscaler_array = rn.readData((int)snc );
69 
70  L1TriggerScaler::Lumi rnfill;
71  std::vector<L1TriggerScaler::Lumi>::iterator Iit;
72  for(Iit = l1lumiscaler_array.begin() ; Iit != l1lumiscaler_array.end(); Iit++)
73  {
74  rnfill = *(Iit);
75  r->m_run.push_back(rnfill);
76  }
77 
78  m_to_transfer.push_back(std::make_pair((L1TriggerScaler*)r,snc));
79  std::ostringstream ss;
80  ss << "since =" << snc;
81 
82 
83 
84  m_userTextLog = ss.str()+";";
85 
86 
87  edm::LogInfo ("L1TriggerScalerHandler") << "------- " << m_name << " - > getNewObjects" << std::endl;
88 
89 
90 }
91 
92 
93 
94 
size
Write out results.
size_t size
Definition: Types.h:77
std::string name
Definition: Types.h:73
cond::ValidityInterval lastInterval
Definition: Types.h:75
std::vector< Lumi > m_run
std::vector< L1TriggerScaler::Lumi > readData(const int r_number)
std::string lastPayloadToken
Definition: Types.h:76
L1TriggerScalerHandler(const edm::ParameterSet &pset)