src
CondTools
DQM
src
DQMSummarySourceHandler.cc
Go to the documentation of this file.
1
#include "
CondTools/DQM/interface/DQMSummarySourceHandler.h
"
2
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
3
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
4
#include "
FWCore/ParameterSet/interface/ParameterSetfwd.h
"
5
#include "
CondTools/DQM/interface/DQMSummaryReader.h
"
6
#include <iostream>
7
#include <string>
8
#include <vector>
9
10
namespace
popcon
{
11
DQMSummarySourceHandler::DQMSummarySourceHandler
(
const
edm::ParameterSet
&
pset
)
12
: m_name(
pset
.getUntrackedParameter<
std
::
string
>(
"name"
,
"DQMSummarySourceHandler"
)),
13
m_since(
pset
.getUntrackedParameter<unsigned long long>(
"firstSince"
, 1)),
14
m_user(
pset
.getUntrackedParameter<
std
::
string
>(
"OnlineDBUser"
,
"CMS_DQM_SUMMARY"
)),
15
m_pass(
pset
.getUntrackedParameter<
std
::
string
>(
"OnlineDBPass"
,
"****"
)) {
16
m_connectionString
=
"oracle://cms_omds_lb/CMS_DQM_SUMMARY"
;
17
}
18
19
DQMSummarySourceHandler::~DQMSummarySourceHandler
() {}
20
21
void
DQMSummarySourceHandler::getNewObjects
() {
22
//check what is already inside of the database
23
edm::LogInfo
(
"DQMSummarySourceHandler"
)
24
<<
"------- "
<<
m_name
<<
" -> getNewObjects\n"
25
<<
"got offlineInfo "
<<
tagInfo
().
name
<<
", size "
<<
tagInfo
().
size
<<
", last object valid since "
26
<<
tagInfo
().
lastInterval
.
since
<<
" token "
<<
tagInfo
().
lastInterval
.
payloadId
<< std::endl;
27
edm::LogInfo
(
"DQMSummarySourceHandler"
)
28
<<
" ------ last entry info regarding the payload (if existing): "
<<
logDBEntry
().
usertext
29
<<
"; last record with the correct tag (if existing) has been written in the db: "
<<
logDBEntry
().
destinationDB
30
<< std::endl;
31
if
(
tagInfo
().
size
> 0) {
32
Ref
payload
=
lastPayload
();
33
edm::LogInfo
(
"DQMSummarySourceHandler"
) <<
"size of last payload "
<<
payload
->m_summary.size() << std::endl;
34
}
35
std::cout
<<
"runnumber/first since = "
<<
m_since
<< std::endl;
36
DQMSummary
* dqmSummary =
new
DQMSummary
;
37
DQMSummaryReader
dqmSummaryReader(
m_connectionString
,
m_user
,
m_pass
);
38
*dqmSummary = dqmSummaryReader.
readData
(
"SUMMARYCONTENT"
,
m_since
);
39
m_to_transfer
.push_back(std::make_pair((
DQMSummary
*)dqmSummary,
m_since
));
40
edm::LogInfo
(
"DQMSummarySourceHandler"
) <<
"------- "
<<
m_name
<<
" - > getNewObjects"
<< std::endl;
41
}
42
43
std::string
DQMSummarySourceHandler::id
()
const
{
return
m_name
; }
44
}
// namespace popcon
findQualityFiles.size
size
Write out results.
Definition:
findQualityFiles.py:443
DQMSummaryReader
Definition:
DQMSummaryReader.h:8
popcon::DQMSummarySourceHandler::~DQMSummarySourceHandler
~DQMSummarySourceHandler() override
Definition:
DQMSummarySourceHandler.cc:19
cond::TagInfo_t::lastInterval
Iov_t lastInterval
Definition:
Types.h:73
popcon::DQMSummarySourceHandler::m_since
unsigned long long m_since
Definition:
DQMSummarySourceHandler.h:21
MessageLogger.h
DQMSummaryReader.h
cond::Iov_t::since
Time_t since
Definition:
Types.h:53
DQMSummaryReader::readData
DQMSummary readData(const std::string &table, const long long r_number)
Definition:
DQMSummaryReader.cc:35
popcon
Definition:
Exception.h:6
muonDTDigis_cfi.pset
pset
Definition:
muonDTDigis_cfi.py:27
cond::TagInfo_t::size
size_t size
Definition:
Types.h:74
std
Definition:
JetResolutionObject.h:76
popcon::DQMSummarySourceHandler::getNewObjects
void getNewObjects() override
Definition:
DQMSummarySourceHandler.cc:21
ParameterSetfwd.h
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
cond::TagInfo_t::name
std::string name
Definition:
Types.h:72
ParameterSet.h
popcon::PopConSourceHandler< DQMSummary >::tagInfo
cond::TagInfo_t const & tagInfo() const
Definition:
PopConSourceHandler.h:43
popcon::DQMSummarySourceHandler::m_name
std::string m_name
Definition:
DQMSummarySourceHandler.h:19
popcon::DQMSummarySourceHandler::m_user
std::string m_user
Definition:
DQMSummarySourceHandler.h:24
popcon::DQMSummarySourceHandler::m_connectionString
std::string m_connectionString
Definition:
DQMSummarySourceHandler.h:23
DQMSummary
Definition:
DQMSummary.h:19
popcon::PopConSourceHandler< DQMSummary >::m_to_transfer
std::vector< std::pair< DQMSummary *, Time_t > > m_to_transfer
Definition:
PopConSourceHandler.h:99
popcon::DQMSummarySourceHandler::DQMSummarySourceHandler
DQMSummarySourceHandler(const edm::ParameterSet &pset)
Definition:
DQMSummarySourceHandler.cc:11
cond::Iov_t::payloadId
Hash payloadId
Definition:
Types.h:55
popcon::DQMSummarySourceHandler::m_pass
std::string m_pass
Definition:
DQMSummarySourceHandler.h:25
cond::LogDBEntry_t::destinationDB
std::string destinationDB
Definition:
Types.h:88
jetsAK4_Puppi_cff.payload
payload
Definition:
jetsAK4_Puppi_cff.py:17
edm::LogInfo
Log< level::Info, false > LogInfo
Definition:
MessageLogger.h:125
popcon::DQMSummarySourceHandler::id
std::string id() const override
Definition:
DQMSummarySourceHandler.cc:43
DQMSummarySourceHandler.h
popcon::PopConSourceHandler< DQMSummary >::logDBEntry
cond::LogDBEntry_t const & logDBEntry() const
Definition:
PopConSourceHandler.h:49
popcon::PopConSourceHandler< DQMSummary >::Ref
std::unique_ptr< DQMSummary > Ref
Definition:
PopConSourceHandler.h:37
popcon::PopConSourceHandler< DQMSummary >::lastPayload
Ref lastPayload() const
Definition:
PopConSourceHandler.h:46
cond::LogDBEntry_t::usertext
std::string usertext
Definition:
Types.h:90
edm::ParameterSet
Definition:
ParameterSet.h:47
gather_cfg.cout
cout
Definition:
gather_cfg.py:144
Generated for CMSSW Reference Manual by
1.8.14