CondTools
RunInfo
src
L1TriggerScalerHandler.cc
Go to the documentation of this file.
1
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
2
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
3
#include "
CondTools/RunInfo/interface/L1TriggerScalerHandler.h
"
4
#include "
CondTools/RunInfo/interface/L1TriggerScalerRead.h
"
5
#include <iostream>
6
#include <vector>
7
8
L1TriggerScalerHandler::L1TriggerScalerHandler
(
const
edm::ParameterSet
&
pset
)
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
L1TriggerScalerHandler::~L1TriggerScalerHandler
() {}
23
24
void
L1TriggerScalerHandler::getNewObjects
() {
25
edm::LogInfo
(
"L1TriggerScalerHandler"
) <<
"------- "
<<
m_name
<<
" - > getNewObjects\n"
26
<<
27
//check whats already inside of database
28
"got offlineInfo"
<<
tagInfo
().
name
<<
", size "
<<
tagInfo
().
size
<<
", last object valid since "
29
<<
tagInfo
().
lastInterval
.
since
<<
" token "
30
<<
tagInfo
().
lastInterval
.
payloadId
<< std::endl;
31
32
if
(
tagInfo
().
size
> 0) {
33
Ref
payload
=
lastPayload
();
34
edm::LogInfo
(
"L1TriggerScalerHandler"
) <<
"size of last payload "
<<
payload
->m_run.size() << std::endl;
35
}
36
37
int
snc;
38
39
std::cerr
<<
"Source implementation test ::getNewObjects : enter runnumber as a first since ! \n"
;
40
std::cin >> snc;
41
42
std::cout
<<
"runnumber/first since = "
<< snc << std::endl;
43
45
46
L1TriggerScaler
*
r
=
new
L1TriggerScaler
();
47
48
// reading from omds
49
L1TriggerScalerRead
rn(
m_connectionString
,
m_user
,
m_pass
);
50
std::vector<L1TriggerScaler::Lumi> l1lumiscaler_array;
51
52
l1lumiscaler_array = rn.
readData
((
int
)snc);
53
54
L1TriggerScaler::Lumi
rnfill;
55
std::vector<L1TriggerScaler::Lumi>::iterator Iit;
56
for
(Iit = l1lumiscaler_array.begin(); Iit != l1lumiscaler_array.end(); Iit++) {
57
rnfill = *(Iit);
58
r
->m_run.push_back(rnfill);
59
}
60
61
m_to_transfer
.push_back(std::make_pair((
L1TriggerScaler
*)
r
, snc));
62
std::ostringstream
ss
;
63
ss
<<
"since ="
<< snc;
64
65
m_userTextLog
=
ss
.str() +
";"
;
66
67
edm::LogInfo
(
"L1TriggerScalerHandler"
) <<
"------- "
<<
m_name
<<
" - > getNewObjects"
<< std::endl;
68
}
L1TriggerScalerHandler::m_user
std::string m_user
Definition:
L1TriggerScalerHandler.h:27
L1TriggerScalerHandler::L1TriggerScalerHandler
L1TriggerScalerHandler(const edm::ParameterSet &pset)
Definition:
L1TriggerScalerHandler.cc:8
popcon::PopConSourceHandler< L1TriggerScaler >::m_to_transfer
OldContainer m_to_transfer
Definition:
PopConSourceHandler.h:162
MessageLogger.h
gather_cfg.cout
cout
Definition:
gather_cfg.py:144
L1TriggerScalerRead.h
edm::LogInfo
Log< level::Info, false > LogInfo
Definition:
MessageLogger.h:125
cond::TagInfo_t::name
std::string name
Definition:
Types.h:72
L1TriggerScalerHandler.h
contentValuesCheck.ss
ss
Definition:
contentValuesCheck.py:33
L1TriggerScalerHandler::~L1TriggerScalerHandler
~L1TriggerScalerHandler() override
Definition:
L1TriggerScalerHandler.cc:22
L1TriggerScaler
Definition:
L1TriggerScaler.h:18
L1TriggerScalerHandler::m_name
std::string m_name
Definition:
L1TriggerScalerHandler.h:17
jets_cff.payload
payload
Definition:
jets_cff.py:32
L1TriggerScalerRead
Definition:
L1TriggerScalerRead.h:8
edm::ParameterSet
Definition:
ParameterSet.h:47
popcon::PopConSourceHandler< L1TriggerScaler >::tagInfo
cond::TagInfo_t const & tagInfo() const
Definition:
PopConSourceHandler.h:78
cond::Iov_t::payloadId
Hash payloadId
Definition:
Types.h:55
cond::Iov_t::since
Time_t since
Definition:
Types.h:53
L1TriggerScalerHandler::m_pass
std::string m_pass
Definition:
L1TriggerScalerHandler.h:28
L1TriggerScaler::Lumi
Definition:
L1TriggerScaler.h:22
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
alignCSCRings.r
r
Definition:
alignCSCRings.py:93
cond::TagInfo_t::lastInterval
Iov_t lastInterval
Definition:
Types.h:73
std
Definition:
JetResolutionObject.h:76
L1TriggerScalerRead::readData
std::vector< L1TriggerScaler::Lumi > readData(const int r_number)
Definition:
L1TriggerScalerRead.cc:54
reco::JetExtendedAssociation::Ref
edm::Ref< Container > Ref
Definition:
JetExtendedAssociation.h:32
popcon::PopConSourceHandler< L1TriggerScaler >::lastPayload
Ref lastPayload() const
Definition:
PopConSourceHandler.h:81
L1TriggerScalerHandler::m_connectionString
std::string m_connectionString
Definition:
L1TriggerScalerHandler.h:22
ParameterSet.h
EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0.cerr
cerr
Definition:
EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0.py:8
popcon::PopConSourceHandler< L1TriggerScaler >::m_userTextLog
std::string m_userTextLog
Definition:
PopConSourceHandler.h:168
muonDTDigis_cfi.pset
pset
Definition:
muonDTDigis_cfi.py:27
cond::TagInfo_t::size
size_t size
Definition:
Types.h:74
findQualityFiles.size
size
Write out results.
Definition:
findQualityFiles.py:443
L1TriggerScalerHandler::getNewObjects
void getNewObjects() override
Definition:
L1TriggerScalerHandler.cc:24
Generated for CMSSW Reference Manual by
1.8.16