CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
DTLVStatusHandler Class Reference

#include <DTLVStatusHandler.h>

Inheritance diagram for DTLVStatusHandler:
popcon::PopConSourceHandler< DTLVStatus >

Public Member Functions

 DTLVStatusHandler (const edm::ParameterSet &ps)
 
void getNewObjects () override
 
std::string id () const override
 
 ~DTLVStatusHandler () override
 
- Public Member Functions inherited from popcon::PopConSourceHandler< DTLVStatus >
void convertFromOld ()
 
SummarydummySummary (typename OldContainer::value_type const &) const
 
void initialize (const cond::persistency::Session &dbSession, cond::TagInfo_t const &tagInfo, cond::LogDBEntry_t const &logDBEntry)
 
Ref lastPayload () const
 
cond::LogDBEntry_t const & logDBEntry () const
 
std::pair< Container const *, std::string const > operator() (const cond::persistency::Session &session, cond::TagInfo_t const &tagInfo, cond::LogDBEntry_t const &logDBEntry) const
 
 PopConSourceHandler ()
 
Container const & returnData ()
 
void sort ()
 
cond::TagInfo_t const & tagInfo () const
 
std::string const & userTextLog () const
 
virtual ~PopConSourceHandler ()
 

Private Attributes

cond::persistency::Session buff_session
 
std::string bufferConnect
 
DTLVStatusccbStatus
 
std::string dataTag
 
cond::persistency::Session omds_session
 
std::string onlineAuthentication
 
std::string onlineConnect
 

Additional Inherited Members

- Public Types inherited from popcon::PopConSourceHandler< DTLVStatus >
typedef std::vector< Triplet > Container
 
typedef std::vector< std::pair< DTLVStatus *, cond::Time_t > > OldContainer
 
typedef PopConSourceHandler< DTLVStatusself
 
typedef cond::Summary Summary
 
typedef cond::Time_t Time_t
 
typedef DTLVStatus value_type
 
- Protected Member Functions inherited from popcon::PopConSourceHandler< DTLVStatus >
int add (value_type *payload, Summary *summary, Time_t time)
 
cond::persistency::SessiondbSession () const
 
- Protected Attributes inherited from popcon::PopConSourceHandler< DTLVStatus >
OldContainer m_to_transfer
 
std::string m_userTextLog
 

Detailed Description

Description: Class to copy CCB DCS-status via PopCon

Date
2010/07/21 16:06:53
Revision
1.2
Author
Paolo Ronchese INFN Padova

Definition at line 35 of file DTLVStatusHandler.h.

Constructor & Destructor Documentation

◆ DTLVStatusHandler()

DTLVStatusHandler::DTLVStatusHandler ( const edm::ParameterSet ps)

Constructor

Definition at line 41 of file DTLVStatusHandler.cc.

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 }

References gather_cfg::cout.

◆ ~DTLVStatusHandler()

DTLVStatusHandler::~DTLVStatusHandler ( )
override

Destructor

Definition at line 54 of file DTLVStatusHandler.cc.

54 {}

Member Function Documentation

◆ getNewObjects()

void DTLVStatusHandler::getNewObjects ( )
overridevirtual

Operations

Implements popcon::PopConSourceHandler< DTLVStatus >.

Definition at line 59 of file DTLVStatusHandler.cc.

59  {
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 }

References buff_session, bufferConnect, cond::persistency::Session::close(), cond::persistency::Transaction::commit(), cond::persistency::ConnectionPool::configure(), gather_cfg::cout, cond::persistency::ConnectionPool::createSession(), dataTag, dqmdumpme::last, cond::TagInfo_t::lastInterval, BeamSpotPI::lastRun, popcon::PopConSourceHandler< DTLVStatus >::m_to_transfer, omds_session, onlineAuthentication, onlineConnect, cond::persistency::ConnectionPool::setAuthenticationPath(), cond::Iov_t::since, cond::persistency::Transaction::start(), popcon::PopConSourceHandler< DTLVStatus >::tagInfo(), and cond::persistency::Session::transaction().

◆ id()

std::string DTLVStatusHandler::id ( ) const
overridevirtual

Implements popcon::PopConSourceHandler< DTLVStatus >.

Definition at line 106 of file DTLVStatusHandler.cc.

106 { return dataTag; }

References dataTag.

Member Data Documentation

◆ buff_session

cond::persistency::Session DTLVStatusHandler::buff_session
private

Definition at line 59 of file DTLVStatusHandler.h.

Referenced by getNewObjects().

◆ bufferConnect

std::string DTLVStatusHandler::bufferConnect
private

Definition at line 55 of file DTLVStatusHandler.h.

Referenced by getNewObjects().

◆ ccbStatus

DTLVStatus* DTLVStatusHandler::ccbStatus
private

Definition at line 56 of file DTLVStatusHandler.h.

◆ dataTag

std::string DTLVStatusHandler::dataTag
private

Definition at line 52 of file DTLVStatusHandler.h.

Referenced by getNewObjects(), and id().

◆ omds_session

cond::persistency::Session DTLVStatusHandler::omds_session
private

Definition at line 58 of file DTLVStatusHandler.h.

Referenced by getNewObjects().

◆ onlineAuthentication

std::string DTLVStatusHandler::onlineAuthentication
private

Definition at line 54 of file DTLVStatusHandler.h.

Referenced by getNewObjects().

◆ onlineConnect

std::string DTLVStatusHandler::onlineConnect
private

Definition at line 53 of file DTLVStatusHandler.h.

Referenced by getNewObjects().

popcon::PopConSourceHandler< DTLVStatus >::m_to_transfer
OldContainer m_to_transfer
Definition: PopConSourceHandler.h:162
gather_cfg.cout
cout
Definition: gather_cfg.py:144
DTLVStatusHandler::buff_session
cond::persistency::Session buff_session
Definition: DTLVStatusHandler.h: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:174
dqmdumpme.last
last
Definition: dqmdumpme.py:56
DTLVStatus
Definition: DTLVStatus.h:63
cond::persistency::ConnectionPool
Definition: ConnectionPool.h:35
BeamSpotPI::lastRun
Definition: BeamSpotPayloadInspectorHelper.h:40
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:35
DTLVStatusHandler::onlineConnect
std::string onlineConnect
Definition: DTLVStatusHandler.h:53
cond::persistency::ConnectionPool::configure
void configure()
Definition: ConnectionPool.cc:129
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
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
DTLVStatusHandler::dataTag
std::string dataTag
Definition: DTLVStatusHandler.h:52
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
DTLVStatusHandler::onlineAuthentication
std::string onlineAuthentication
Definition: DTLVStatusHandler.h:54
cond::TagInfo_t
Definition: Types.h:69
DTLVStatusHandler::bufferConnect
std::string bufferConnect
Definition: DTLVStatusHandler.h:55