CMS 3D CMS Logo

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

#include <DQMReferenceHistogramRootFileSourceHandler.h>

Inheritance diagram for popcon::DQMReferenceHistogramRootFileSourceHandler:
popcon::PopConSourceHandler< FileBlob >

Public Member Functions

 DQMReferenceHistogramRootFileSourceHandler (const edm::ParameterSet &pset)
 
void getNewObjects () override
 
std::string id () const override
 
 ~DQMReferenceHistogramRootFileSourceHandler () override
 
- Public Member Functions inherited from popcon::PopConSourceHandler< FileBlob >
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

bool m_debugMode
 
std::string m_file
 
std::string m_name
 
unsigned long long m_since
 
bool m_zip
 

Additional Inherited Members

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

Detailed Description

Definition at line 11 of file DQMReferenceHistogramRootFileSourceHandler.h.

Constructor & Destructor Documentation

popcon::DQMReferenceHistogramRootFileSourceHandler::DQMReferenceHistogramRootFileSourceHandler ( const edm::ParameterSet pset)
popcon::DQMReferenceHistogramRootFileSourceHandler::~DQMReferenceHistogramRootFileSourceHandler ( )
override

Definition at line 17 of file DQMReferenceHistogramRootFileSourceHandler.cc.

17 {}

Member Function Documentation

void popcon::DQMReferenceHistogramRootFileSourceHandler::getNewObjects ( )
overridevirtual

Implements popcon::PopConSourceHandler< FileBlob >.

Definition at line 19 of file DQMReferenceHistogramRootFileSourceHandler.cc.

References cond::LogDBEntry_t::destinationDB, cond::LogDBEntry_t::execmessage, cond::LogDBEntry_t::exectime, cond::LogDBEntry_t::iovtag, cond::LogDBEntry_t::iovtimetype, cond::TagInfo_t::lastInterval, popcon::PopConSourceHandler< FileBlob >::lastPayload(), cond::TagInfo_t::lastPayloadToken, popcon::PopConSourceHandler< FileBlob >::logDBEntry(), cond::LogDBEntry_t::logId, m_debugMode, m_file, m_name, m_since, popcon::PopConSourceHandler< FileBlob >::m_to_transfer, m_zip, cond::TagInfo_t::name, jets_cff::payload, cond::LogDBEntry_t::payloadClass, cond::LogDBEntry_t::payloadIdx, cond::LogDBEntry_t::payloadToken, cond::LogDBEntry_t::provenance, indexGen::rootFile, FileBlob::size(), cond::TagInfo_t::size, findQualityFiles::size, contentValuesCheck::ss, popcon::PopConSourceHandler< FileBlob >::tagInfo(), cond::TagInfo_t::token, cond::LogDBEntry_t::usertext, and popcon::PopConSourceHandler< FileBlob >::userTextLog().

19  {
20  edm::LogInfo("DQMReferenceHistogramRootFileSourceHandler")
21  << "[DQMReferenceHistogramRootFileSourceHandler::getNewObjects] for PopCon application " << m_name;
22  if (m_debugMode) {
23  std::stringstream ss;
24  ss << "\n------- " << m_name << " - > getNewObjects\n";
25  if (this->tagInfo().size > 0) {
26  //check what is already inside of the database
27  ss << "\ngot offlineInfo " << this->tagInfo().name << ",\n size " << this->tagInfo().size << ",\n"
28  << this->tagInfo().token << ",\n last object valid since " << this->tagInfo().lastInterval.first
29  << ",\n token " << this->tagInfo().lastPayloadToken << ",\n UserText " << this->userTextLog()
30  << ";\n last entry info regarding the payload (if existing):"
31  << ",\n logId" << this->logDBEntry().logId
32  << ",\n last record with the correct tag (if existing) has been written in the db "
33  << this->logDBEntry().destinationDB << ",\n provenance " << this->logDBEntry().provenance << ",\n usertext "
34  << this->logDBEntry().usertext << ",\n iovtag " << this->logDBEntry().iovtag << ",\n timetype "
35  << this->logDBEntry().iovtimetype << ",\n payload index " << this->logDBEntry().payloadIdx
36  << ",\n payload class " << this->logDBEntry().payloadClass << ",\n payload token "
37  << this->logDBEntry().payloadToken << ",\n execution time " << this->logDBEntry().exectime
38  << ",\n execution message " << this->logDBEntry().execmessage << std::endl;
39  Ref payload = this->lastPayload();
40  ss << "size of last payload " << payload->size() << std::endl;
41  } else {
42  ss << " First object for this tag " << std::endl;
43  }
44  edm::LogInfo("DQMReferenceHistogramRootFileSourceHandler") << ss.str();
45  }
46  edm::LogInfo("DQMReferenceHistogramRootFileSourceHandler") << "runnumber/first since = " << m_since << std::endl;
47  if (m_since <= this->tagInfo().lastInterval.first) {
48  edm::LogInfo("DQMReferenceHistogramRootFileSourceHandler")
49  << "[DQMReferenceHistogramRootFileSourceHandler::getNewObjects] \nthe current starting iov " << m_since
50  << "\nis not compatible with the last iov (" << this->tagInfo().lastInterval.first << ") open for the object "
51  << this->logDBEntry().payloadClass << " \nin the db " << this->logDBEntry().destinationDB
52  << " \n NO TRANSFER NEEDED" << std::endl;
53  return;
54  }
55  edm::LogInfo("DQMReferenceHistogramRootFileSourceHandler")
56  << "[DQMReferenceHistogramRootFileSourceHandler::getNewObjects] " << m_name
57  << " getting data to be transferred " << std::endl;
59  /*if(!this->tagInfo().size)
60  m_since=1;
61  else
62  if (m_debugMode)
63  m_since=this->tagInfo().lastInterval.first+1; */
64  if (rootFile->size() != 0) {
65  edm::LogInfo("DQMReferenceHistogramRootFileSourceHandler")
66  << "setting runnumber/first since = " << m_since << std::endl;
67  this->m_to_transfer.push_back(std::make_pair(rootFile, m_since));
68  } else {
69  edm::LogError("DQMSummarySourceHandler") << "Root file " << m_file << " does not exist" << std::endl;
70  delete rootFile;
71  }
72  edm::LogInfo("DQMSummarySourceHandler") << "------- " << m_name << " - > getNewObjects" << std::endl;
73  }
size
Write out results.
unsigned long long logId
Definition: Types.h:91
std::string provenance
Definition: Types.h:93
std::string payloadToken
Definition: Types.h:100
size_t size
Definition: Types.h:76
std::string execmessage
Definition: Types.h:102
std::string name
Definition: Types.h:72
cond::ValidityInterval lastInterval
Definition: Types.h:74
std::string payloadClass
Definition: Types.h:99
cond::LogDBEntry_t const & logDBEntry() const
std::string destinationDB
Definition: Types.h:92
int size() const
Definition: FileBlob.h:32
std::string exectime
Definition: Types.h:101
std::string lastPayloadToken
Definition: Types.h:75
unsigned int payloadIdx
Definition: Types.h:97
std::string usertext
Definition: Types.h:94
std::string token
Definition: Types.h:73
cond::TagInfo_t const & tagInfo() const
std::string iovtimetype
Definition: Types.h:96
std::string iovtag
Definition: Types.h:95
std::string popcon::DQMReferenceHistogramRootFileSourceHandler::id ( ) const
overridevirtual

Member Data Documentation

bool popcon::DQMReferenceHistogramRootFileSourceHandler::m_debugMode
private

Definition at line 24 of file DQMReferenceHistogramRootFileSourceHandler.h.

Referenced by getNewObjects().

std::string popcon::DQMReferenceHistogramRootFileSourceHandler::m_file
private

Definition at line 20 of file DQMReferenceHistogramRootFileSourceHandler.h.

Referenced by getNewObjects().

std::string popcon::DQMReferenceHistogramRootFileSourceHandler::m_name
private

Definition at line 19 of file DQMReferenceHistogramRootFileSourceHandler.h.

Referenced by getNewObjects(), and id().

unsigned long long popcon::DQMReferenceHistogramRootFileSourceHandler::m_since
private

Definition at line 23 of file DQMReferenceHistogramRootFileSourceHandler.h.

Referenced by getNewObjects().

bool popcon::DQMReferenceHistogramRootFileSourceHandler::m_zip
private

Definition at line 21 of file DQMReferenceHistogramRootFileSourceHandler.h.

Referenced by getNewObjects().