CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
popcon::DQMSummarySourceHandler Class Reference

#include <DQMSummarySourceHandler.h>

Inheritance diagram for popcon::DQMSummarySourceHandler:
popcon::PopConSourceHandler< DQMSummary >

Public Member Functions

 DQMSummarySourceHandler (const edm::ParameterSet &pset)
 
void getNewObjects () override
 
std::string id () const override
 
 ~DQMSummarySourceHandler () override
 
- Public Member Functions inherited from popcon::PopConSourceHandler< DQMSummary >
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 ()
 
cond::TagInfo_t const & tagInfo () const
 
std::string const & userTextLog () const
 
virtual ~PopConSourceHandler ()
 

Private Attributes

std::string m_connectionString
 
std::string m_name
 
std::string m_pass
 
unsigned long long m_since
 
std::string m_user
 

Additional Inherited Members

- Public Types inherited from popcon::PopConSourceHandler< DQMSummary >
typedef std::map< Time_t, std::shared_ptr< DQMSummary > > Container
 
typedef std::unique_ptr< DQMSummaryRef
 
typedef PopConSourceHandler< DQMSummaryself
 
typedef cond::Time_t Time_t
 
typedef DQMSummary value_type
 
- Protected Member Functions inherited from popcon::PopConSourceHandler< DQMSummary >
cond::persistency::SessiondbSession () const
 
- Protected Attributes inherited from popcon::PopConSourceHandler< DQMSummary >
Container m_iovs
 
std::vector< std::pair< DQMSummary *, Time_t > > m_to_transfer
 
std::string m_userTextLog
 

Detailed Description

Definition at line 11 of file DQMSummarySourceHandler.h.

Constructor & Destructor Documentation

◆ DQMSummarySourceHandler()

popcon::DQMSummarySourceHandler::DQMSummarySourceHandler ( const edm::ParameterSet pset)

Definition at line 11 of file DQMSummarySourceHandler.cc.

References m_connectionString.

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  }

◆ ~DQMSummarySourceHandler()

popcon::DQMSummarySourceHandler::~DQMSummarySourceHandler ( )
override

Definition at line 19 of file DQMSummarySourceHandler.cc.

19 {}

Member Function Documentation

◆ getNewObjects()

void popcon::DQMSummarySourceHandler::getNewObjects ( )
overridevirtual

Implements popcon::PopConSourceHandler< DQMSummary >.

Definition at line 21 of file DQMSummarySourceHandler.cc.

References gather_cfg::cout, cond::LogDBEntry_t::destinationDB, cond::TagInfo_t::lastInterval, popcon::PopConSourceHandler< DQMSummary >::lastPayload(), popcon::PopConSourceHandler< DQMSummary >::logDBEntry(), m_connectionString, m_name, m_pass, m_since, popcon::PopConSourceHandler< DQMSummary >::m_to_transfer, m_user, cond::TagInfo_t::name, jetsAK4_Puppi_cff::payload, cond::Iov_t::payloadId, DQMSummaryReader::readData(), cond::Iov_t::since, cond::TagInfo_t::size, findQualityFiles::size, popcon::PopConSourceHandler< DQMSummary >::tagInfo(), and cond::LogDBEntry_t::usertext.

21  {
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) {
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;
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  }
size
Write out results.
Iov_t lastInterval
Definition: Types.h:73
Time_t since
Definition: Types.h:53
size_t size
Definition: Types.h:74
std::string name
Definition: Types.h:72
cond::TagInfo_t const & tagInfo() const
std::vector< std::pair< DQMSummary *, Time_t > > m_to_transfer
Hash payloadId
Definition: Types.h:55
std::string destinationDB
Definition: Types.h:88
Log< level::Info, false > LogInfo
cond::LogDBEntry_t const & logDBEntry() const
std::string usertext
Definition: Types.h:90

◆ id()

std::string popcon::DQMSummarySourceHandler::id ( ) const
overridevirtual

Implements popcon::PopConSourceHandler< DQMSummary >.

Definition at line 43 of file DQMSummarySourceHandler.cc.

References m_name.

Member Data Documentation

◆ m_connectionString

std::string popcon::DQMSummarySourceHandler::m_connectionString
private

Definition at line 23 of file DQMSummarySourceHandler.h.

Referenced by DQMSummarySourceHandler(), and getNewObjects().

◆ m_name

std::string popcon::DQMSummarySourceHandler::m_name
private

Definition at line 19 of file DQMSummarySourceHandler.h.

Referenced by getNewObjects(), and id().

◆ m_pass

std::string popcon::DQMSummarySourceHandler::m_pass
private

Definition at line 25 of file DQMSummarySourceHandler.h.

Referenced by getNewObjects().

◆ m_since

unsigned long long popcon::DQMSummarySourceHandler::m_since
private

Definition at line 21 of file DQMSummarySourceHandler.h.

Referenced by getNewObjects().

◆ m_user

std::string popcon::DQMSummarySourceHandler::m_user
private

Definition at line 24 of file DQMSummarySourceHandler.h.

Referenced by getNewObjects().