CMS 3D CMS Logo

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

#include <DQMXMLFileSourceHandler.h>

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

Public Member Functions

 DQMXMLFileSourceHandler (const edm::ParameterSet &pset)
 
void getNewObjects () override
 
std::string id () const override
 
 ~DQMXMLFileSourceHandler () 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 DQMXMLFileSourceHandler.h.

Constructor & Destructor Documentation

◆ DQMXMLFileSourceHandler()

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

Definition at line 10 of file DQMXMLFileSourceHandler.cc.

11  : m_name(pset.getUntrackedParameter<std::string>("name", "DQMXMLFileSourceHandler")),
12  m_file(pset.getUntrackedParameter<std::string>("XMLFile", "./file.xml")),
13  m_zip(pset.getUntrackedParameter<bool>("zip", false)),
14  m_since(pset.getUntrackedParameter<unsigned long long>("firstSince", 1)),
15  m_debugMode(pset.getUntrackedParameter<bool>("debug", false)) {}

◆ ~DQMXMLFileSourceHandler()

popcon::DQMXMLFileSourceHandler::~DQMXMLFileSourceHandler ( )
override

Definition at line 17 of file DQMXMLFileSourceHandler.cc.

17 {}

Member Function Documentation

◆ getNewObjects()

void popcon::DQMXMLFileSourceHandler::getNewObjects ( )
overridevirtual

Implements popcon::PopConSourceHandler< FileBlob >.

Definition at line 19 of file DQMXMLFileSourceHandler.cc.

19  {
20  edm::LogInfo("DQMXMLFileSourceHandler")
21  << "[DQMXMLFileSourceHandler::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  << "last object valid since " << this->tagInfo().lastInterval.since << ",\n token "
29  << this->tagInfo().lastInterval.payloadId << ",\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("DQMXMLFileSourceHandler") << ss.str();
45  }
46  edm::LogInfo("DQMXMLFileSourceHandler") << "runnumber/first since = " << m_since << std::endl;
47  if (this->tagInfo().size > 0 && m_since <= this->tagInfo().lastInterval.since) {
48  edm::LogInfo("DQMXMLFileSourceHandler")
49  << "[DQMXMLFileSourceHandler::getNewObjects] \nthe current starting iov " << m_since
50  << "\nis not compatible with the last iov (" << this->tagInfo().lastInterval.since << ") 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("DQMXMLFileSourceHandler")
56  << "[DQMXMLFileSourceHandler::getNewObjects] " << m_name << " getting data to be transferred " << std::endl;
58  /*if(!this->tagInfo().size)
59  m_since=1;
60  else
61  if (m_debugMode)
62  m_since=this->tagInfo().lastInterval.first+1; */
63  if (XMLFile->size() != 0) {
64  edm::LogInfo("DQMXMLFileSourceHandler") << "setting runnumber/first since = " << m_since << std::endl;
65  this->m_to_transfer.push_back(std::make_pair(XMLFile, m_since));
66  } else {
67  edm::LogError("DQMSummarySourceHandler") << "XML file " << m_file << " does not exist" << std::endl;
68  delete XMLFile;
69  }
70  edm::LogInfo("DQMSummarySourceHandler") << "------- " << m_name << " - > getNewObjects" << std::endl;
71  }

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(), 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::Iov_t::payloadId, cond::LogDBEntry_t::payloadIdx, cond::LogDBEntry_t::payloadToken, cond::LogDBEntry_t::provenance, cond::Iov_t::since, cond::TagInfo_t::size, findQualityFiles::size, contentValuesCheck::ss, popcon::PopConSourceHandler< FileBlob >::tagInfo(), cond::LogDBEntry_t::usertext, popcon::PopConSourceHandler< FileBlob >::userTextLog(), and ProducerES_cfi::XMLFile.

◆ id()

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

Implements popcon::PopConSourceHandler< FileBlob >.

Definition at line 73 of file DQMXMLFileSourceHandler.cc.

73 { return m_name; }

References m_name.

Member Data Documentation

◆ m_debugMode

bool popcon::DQMXMLFileSourceHandler::m_debugMode
private

Definition at line 24 of file DQMXMLFileSourceHandler.h.

Referenced by getNewObjects().

◆ m_file

std::string popcon::DQMXMLFileSourceHandler::m_file
private

Definition at line 20 of file DQMXMLFileSourceHandler.h.

Referenced by getNewObjects().

◆ m_name

std::string popcon::DQMXMLFileSourceHandler::m_name
private

Definition at line 19 of file DQMXMLFileSourceHandler.h.

Referenced by getNewObjects(), and id().

◆ m_since

unsigned long long popcon::DQMXMLFileSourceHandler::m_since
private

Definition at line 23 of file DQMXMLFileSourceHandler.h.

Referenced by getNewObjects().

◆ m_zip

bool popcon::DQMXMLFileSourceHandler::m_zip
private

Definition at line 21 of file DQMXMLFileSourceHandler.h.

Referenced by getNewObjects().

popcon::PopConSourceHandler< FileBlob >::m_to_transfer
OldContainer m_to_transfer
Definition: PopConSourceHandler.h:162
ProducerES_cfi.XMLFile
XMLFile
Definition: ProducerES_cfi.py:9
popcon::DQMXMLFileSourceHandler::m_name
std::string m_name
Definition: DQMXMLFileSourceHandler.h:19
popcon::DQMXMLFileSourceHandler::m_since
unsigned long long m_since
Definition: DQMXMLFileSourceHandler.h:23
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
cond::LogDBEntry_t::execmessage
std::string execmessage
Definition: Types.h:98
cond::TagInfo_t::name
std::string name
Definition: Types.h:72
contentValuesCheck.ss
ss
Definition: contentValuesCheck.py:33
popcon::DQMXMLFileSourceHandler::m_file
std::string m_file
Definition: DQMXMLFileSourceHandler.h:20
cond::LogDBEntry_t::provenance
std::string provenance
Definition: Types.h:89
popcon::DQMXMLFileSourceHandler::m_debugMode
bool m_debugMode
Definition: DQMXMLFileSourceHandler.h:24
jets_cff.payload
payload
Definition: jets_cff.py:32
cond::LogDBEntry_t::payloadToken
std::string payloadToken
Definition: Types.h:96
popcon::DQMXMLFileSourceHandler::m_zip
bool m_zip
Definition: DQMXMLFileSourceHandler.h:21
popcon::PopConSourceHandler< FileBlob >::tagInfo
cond::TagInfo_t const & tagInfo() const
Definition: PopConSourceHandler.h:78
cond::Iov_t::payloadId
Hash payloadId
Definition: Types.h:55
cond::LogDBEntry_t::usertext
std::string usertext
Definition: Types.h:90
cond::Iov_t::since
Time_t since
Definition: Types.h:53
cond::LogDBEntry_t::iovtag
std::string iovtag
Definition: Types.h:91
cond::LogDBEntry_t::destinationDB
std::string destinationDB
Definition: Types.h:88
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
cond::TagInfo_t::lastInterval
Iov_t lastInterval
Definition: Types.h:73
cond::LogDBEntry_t::iovtimetype
std::string iovtimetype
Definition: Types.h:92
cond::LogDBEntry_t::payloadClass
std::string payloadClass
Definition: Types.h:95
reco::JetExtendedAssociation::Ref
edm::Ref< Container > Ref
Definition: JetExtendedAssociation.h:32
cond::LogDBEntry_t::logId
unsigned long long logId
Definition: Types.h:87
popcon::PopConSourceHandler< FileBlob >::lastPayload
Ref lastPayload() const
Definition: PopConSourceHandler.h:81
cond::LogDBEntry_t::payloadIdx
unsigned int payloadIdx
Definition: Types.h:93
popcon::PopConSourceHandler< FileBlob >::logDBEntry
cond::LogDBEntry_t const & logDBEntry() const
Definition: PopConSourceHandler.h:84
popcon::PopConSourceHandler< FileBlob >::userTextLog
std::string const & userTextLog() const
Definition: PopConSourceHandler.h:111
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
cond::TagInfo_t::size
size_t size
Definition: Types.h:74
FileBlob
Definition: FileBlob.h:11
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443
cond::LogDBEntry_t::exectime
std::string exectime
Definition: Types.h:97