CMS 3D CMS Logo

DTLVStatusHandler.cc
Go to the documentation of this file.
1 /*
2  * See header file for a description of this class.
3  *
4  * \author Paolo Ronchese INFN Padova
5  *
6  */
7 
8 //-----------------------
9 // This Class' Header --
10 //-----------------------
12 
13 //-------------------------------
14 // Collaborating Class Headers --
15 //-------------------------------
17 
19 
20 #include "RelationalAccess/ISchema.h"
21 #include "RelationalAccess/ITable.h"
22 #include "RelationalAccess/ICursor.h"
23 #include "RelationalAccess/IQuery.h"
24 #include "CoralBase/AttributeList.h"
25 #include "CoralBase/AttributeSpecification.h"
26 #include "CoralBase/Attribute.h"
27 
28 //---------------
29 // C++ Headers --
30 //---------------
31 
32 #include <iostream>
33 
34 //-------------------
35 // Initializations --
36 //-------------------
37 
38 //----------------
39 // Constructors --
40 //----------------
42  : dataTag(ps.getParameter<std::string>("tag")),
43  onlineConnect(ps.getParameter<std::string>("onlineDB")),
44  onlineAuthentication(ps.getParameter<std::string>("onlineAuthentication")),
45  bufferConnect(ps.getParameter<std::string>("bufferDB")),
46  omds_session(),
47  buff_session() {
48  std::cout << " PopCon application for DT DCS data (CCB status) export " << std::endl;
49 }
50 
51 //--------------
52 // Destructor --
53 //--------------
55 
56 //--------------
57 // Operations --
58 //--------------
60  // online DB connection
61  std::cout << "configure omds DbConnection" << std::endl;
64  connection.configure();
65  std::cout << "create omds DbSession" << std::endl;
67  std::cout << "start omds transaction" << std::endl;
69  std::cout << "" << std::endl;
70 
71  // buffer DB connection
72  std::cout << "create buffer DbSession" << std::endl;
74  std::cout << "start buffer transaction" << std::endl;
76 
77  // offline info
78 
79  //to access the information on the tag inside the offline database:
80  cond::TagInfo_t const& ti = tagInfo();
82  std::cout << "latest DCS data (CCB status) already copied for run: " << last << std::endl;
83 
84  if (last == 0) {
85  DTLVStatus* dummyConf = new DTLVStatus(dataTag);
86  cond::Time_t snc = 1;
87  m_to_transfer.push_back(std::make_pair(dummyConf, snc));
88  }
89 
90  //to access the information on last successful log entry for this tag:
91  // cond::LogDBEntry const & lde = logDBEntry();
92 
93  //to access the lastest payload (Ref is a smart pointer)
94  // Ref payload = lastPayload();
95 
96  unsigned lastRun = last;
97  std::cout << "check for new runs since " << lastRun << std::endl;
98 
102 
103  return;
104 }
105 
ConnectionPool.h
popcon::PopConSourceHandler< DTLVStatus >::m_to_transfer
OldContainer m_to_transfer
Definition: PopConSourceHandler.h:162
DTLVStatusHandler::~DTLVStatusHandler
~DTLVStatusHandler() override
Definition: DTLVStatusHandler.cc:54
CSCTFAlignmentOnline_cfi.onlineAuthentication
onlineAuthentication
Definition: CSCTFAlignmentOnline_cfi.py:3
gather_cfg.cout
cout
Definition: gather_cfg.py:144
SiStripBadComponentsDQMServiceTemplate_cfg.lastRun
lastRun
Definition: SiStripBadComponentsDQMServiceTemplate_cfg.py:27
DTLVStatusHandler::buff_session
cond::persistency::Session buff_session
Definition: DTLVStatusHandler.h:59
DTLVStatusHandler::getNewObjects
void getNewObjects() override
Definition: DTLVStatusHandler.cc:59
cond::persistency::Session::close
void close()
Definition: Session.cc:50
cond::persistency::ConnectionPool::createSession
Session createSession(const std::string &connectionString, bool writeCapable=false)
Definition: ConnectionPool.cc:154
dqmdumpme.last
last
Definition: dqmdumpme.py:56
DTLVStatus
Definition: DTLVStatus.h:63
DTLVStatusHandler::id
std::string id() const override
Definition: DTLVStatusHandler.cc:106
cond::persistency::ConnectionPool
Definition: ConnectionPool.h:31
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
DTLVStatusHandler::DTLVStatusHandler
DTLVStatusHandler(const edm::ParameterSet &ps)
Definition: DTLVStatusHandler.cc:41
edm::ParameterSet
Definition: ParameterSet.h:36
popcon::PopConSourceHandler< DTLVStatus >::tagInfo
cond::TagInfo_t const & tagInfo() const
Definition: PopConSourceHandler.h:78
cond::persistency::Session
Definition: Session.h:63
cond::Iov_t::since
Time_t since
Definition: Types.h:53
cond::Time_t
unsigned long long Time_t
Definition: Time.h:14
cond::persistency::Transaction::commit
void commit()
Definition: Session.cc:23
cond::persistency::ConnectionPool::setAuthenticationPath
void setAuthenticationPath(const std::string &p)
Definition: ConnectionPool.cc:32
DTLVStatusHandler::onlineConnect
std::string onlineConnect
Definition: DTLVStatusHandler.h:53
cond::persistency::ConnectionPool::configure
void configure()
Definition: ConnectionPool.cc:121
DTLVStatusHandler::omds_session
cond::persistency::Session omds_session
Definition: DTLVStatusHandler.h:58
cond::TagInfo_t::lastInterval
Iov_t lastInterval
Definition: Types.h:73
cond::persistency::Session::transaction
Transaction & transaction()
Definition: Session.cc:52
cond::persistency::Transaction::start
void start(bool readOnly=true)
Definition: Session.cc:18
std
Definition: JetResolutionObject.h:76
DTLVStatusHandler::dataTag
std::string dataTag
Definition: DTLVStatusHandler.h:52
DTLVStatus.h
gctErrorAnalyzer_cfi.dataTag
dataTag
Definition: gctErrorAnalyzer_cfi.py:28
DTLVStatusHandler::onlineAuthentication
std::string onlineAuthentication
Definition: DTLVStatusHandler.h:54
cond::TagInfo_t
Definition: Types.h:69
DTLVStatusHandler.h
DTLVStatusHandler::bufferConnect
std::string bufferConnect
Definition: DTLVStatusHandler.h:55