Main Page
Namespaces
Classes
Package Documentation
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"
) <<
"------- "
<<
m_name
<<
" -> getNewObjects\n"
24
<<
"got offlineInfo "
<<
tagInfo
().
name
25
<<
", size "
<<
tagInfo
().
size
26
<<
", last object valid since "
27
<<
tagInfo
().
lastInterval
.first <<
" token "
28
<<
tagInfo
().
lastPayloadToken
<< std::endl;
29
edm::LogInfo
(
"DQMSummarySourceHandler"
) <<
" ------ last entry info regarding the payload (if existing): "
30
<<
logDBEntry
().
usertext
31
<<
"; last record with the correct tag (if existing) has been written in the db: "
32
<<
logDBEntry
().
destinationDB
<< std::endl;
33
if
(
tagInfo
().
size
> 0) {
34
Ref
payload
=
lastPayload
();
35
edm::LogInfo
(
"DQMSummarySourceHandler"
) <<
"size of last payload "
36
<< payload->m_summary.size() << std::endl;
37
}
38
std::cout
<<
"runnumber/first since = "
<<
m_since
<< std::endl;
39
DQMSummary
* dqmSummary =
new
DQMSummary
;
40
DQMSummaryReader
dqmSummaryReader(
m_connectionString
,
m_user
,
m_pass
);
41
*dqmSummary = dqmSummaryReader.
readData
(
"SUMMARYCONTENT"
,
m_since
);
42
m_to_transfer
.push_back(std::make_pair((
DQMSummary
*)dqmSummary,
m_since
));
43
edm::LogInfo
(
"DQMSummarySourceHandler"
) <<
"------- "
44
<<
m_name
<<
" - > getNewObjects"
45
<< std::endl;
46
}
47
48
std::string
DQMSummarySourceHandler::id
()
const
{
return
m_name
;}
49
}
findQualityFiles.size
size
Write out results.
Definition:
findQualityFiles.py:442
DQMSummaryReader
Definition:
DQMSummaryReader.h:8
MessageLogger.h
reco::JetExtendedAssociation::Ref
edm::Ref< Container > Ref
Definition:
JetExtendedAssociation.h:32
popcon::DQMSummarySourceHandler::getNewObjects
void getNewObjects()
Definition:
DQMSummarySourceHandler.cc:21
popcon::DQMSummarySourceHandler::m_since
unsigned long long m_since
Definition:
DQMSummarySourceHandler.h:20
DQMSummaryReader.h
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:255
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:76
std
Definition:
JetResolutionObject.h:76
ParameterSetfwd.h
popcon::PopConSourceHandler< DQMSummary >::m_to_transfer
OldContainer m_to_transfer
Definition:
PopConSourceHandler.h:190
cond::TagInfo_t::name
std::string name
Definition:
Types.h:72
ParameterSet.h
popcon::DQMSummarySourceHandler::m_name
std::string m_name
Definition:
DQMSummarySourceHandler.h:18
cond::TagInfo_t::lastInterval
cond::ValidityInterval lastInterval
Definition:
Types.h:74
jetCorrFactors_cfi.payload
payload
payload postfix for testing
Definition:
jetCorrFactors_cfi.py:10
popcon::DQMSummarySourceHandler::id
std::string id() const
Definition:
DQMSummarySourceHandler.cc:48
popcon::DQMSummarySourceHandler::m_user
std::string m_user
Definition:
DQMSummarySourceHandler.h:23
popcon::DQMSummarySourceHandler::m_connectionString
std::string m_connectionString
Definition:
DQMSummarySourceHandler.h:22
DQMSummary
Definition:
DQMSummary.h:19
popcon::PopConSourceHandler< DQMSummary >::lastPayload
Ref lastPayload() const
Definition:
PopConSourceHandler.h:102
popcon::PopConSourceHandler< DQMSummary >::logDBEntry
cond::LogDBEntry_t const & logDBEntry() const
Definition:
PopConSourceHandler.h:107
popcon::DQMSummarySourceHandler::DQMSummarySourceHandler
DQMSummarySourceHandler(const edm::ParameterSet &pset)
Definition:
DQMSummarySourceHandler.cc:11
popcon::DQMSummarySourceHandler::m_pass
std::string m_pass
Definition:
DQMSummarySourceHandler.h:24
cond::LogDBEntry_t::destinationDB
std::string destinationDB
Definition:
Types.h:92
edm::LogInfo
Definition:
MessageLogger.h:216
DQMSummarySourceHandler.h
cond::TagInfo_t::lastPayloadToken
std::string lastPayloadToken
Definition:
Types.h:75
popcon::DQMSummarySourceHandler::~DQMSummarySourceHandler
~DQMSummarySourceHandler()
Definition:
DQMSummarySourceHandler.cc:19
cond::LogDBEntry_t::usertext
std::string usertext
Definition:
Types.h:94
edm::ParameterSet
Definition:
ParameterSet.h:36
gather_cfg.cout
cout
Definition:
gather_cfg.py:145
popcon::PopConSourceHandler< DQMSummary >::tagInfo
cond::TagInfo_t const & tagInfo() const
Definition:
PopConSourceHandler.h:99
Generated for CMSSW Reference Manual by
1.8.11