CMS 3D CMS Logo

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

#include <SiStripPopConHistoryDQMBase.h>

Inheritance diagram for SiStripPopConHistoryDQMBase:
SiStripDQMPopConSourceHandler< HDQMSummary > SiStripDQMHistoryHelper popcon::PopConSourceHandler< HDQMSummary > GenericHistoryDQM SiStripPopConHistoryDQM

Public Member Functions

bool checkForCompatibility (const std::string &otherMetaData) const override
 
void dqmEndJob (DQMStore::IBooker &booker, DQMStore::IGetter &getter) override
 
HDQMSummarygetObj () const override
 
 SiStripPopConHistoryDQMBase (const edm::ParameterSet &pset)
 
 ~SiStripPopConHistoryDQMBase () override
 
- Public Member Functions inherited from SiStripDQMPopConSourceHandler< HDQMSummary >
virtual std::string getMetaDataString () const
 
void getNewObjects () override
 
std::string id () const override
 
virtual void initES (const edm::EventSetup &)
 
 SiStripDQMPopConSourceHandler (const edm::ParameterSet &pset)
 
 ~SiStripDQMPopConSourceHandler () override
 
- Public Member Functions inherited from popcon::PopConSourceHandler< HDQMSummary >
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 Types

typedef std::vector< edm::ParameterSetVParameters
 

Private Attributes

std::unique_ptr< HDQMfitUtilitiesfitME_
 
VParameters histoList_
 
HDQMSummary m_obj
 
std::string MEDir_
 

Additional Inherited Members

- Public Types inherited from popcon::PopConSourceHandler< HDQMSummary >
typedef std::vector< Triplet > Container
 
typedef std::vector< std::pair< HDQMSummary *, cond::Time_t > > OldContainer
 
typedef PopConSourceHandler< HDQMSummaryself
 
typedef cond::Summary Summary
 
typedef cond::Time_t Time_t
 
typedef HDQMSummary value_type
 
- Protected Member Functions inherited from SiStripDQMPopConSourceHandler< HDQMSummary >
uint32_t getRunNumber () const
 
- Protected Member Functions inherited from popcon::PopConSourceHandler< HDQMSummary >
int add (value_type *payload, Summary *summary, Time_t time)
 
cond::persistency::SessiondbSession () const
 
- Protected Member Functions inherited from SiStripDQMHistoryHelper
virtual uint32_t returnDetComponent (const MonitorElement *ME) const =0
 
virtual void scanTreeAndFillSummary (const std::vector< MonitorElement * > &MEs, HDQMSummary *summary, const std::string &histoName, const std::vector< std::string > &Quantities) const
 
std::string sep () const
 
virtual bool setDBLabelsForGauss (const std::string &keyName, std::vector< std::string > &userDBContent) const
 
virtual bool setDBLabelsForLandau (const std::string &keyName, std::vector< std::string > &userDBContent) const
 
virtual bool setDBLabelsForStat (const std::string &keyName, std::vector< std::string > &userDBContent) const
 
virtual bool setDBLabelsForUser (const std::string &keyName, std::vector< std::string > &userDBContent, const std::string &quantity) const
 
virtual bool setDBLabelsForUser (const std::string &keyName, std::vector< std::string > &userDBContent) const
 
virtual bool setDBValuesForGauss (const MonitorElement *me, HDQMSummary::InputVector &values) const
 
virtual bool setDBValuesForLandau (const MonitorElement *me, HDQMSummary::InputVector &values) const
 
virtual bool setDBValuesForStat (const MonitorElement *me, HDQMSummary::InputVector &values) const
 
virtual bool setDBValuesForUser (const MonitorElement *me, HDQMSummary::InputVector &values, const std::string &quantity) const
 
virtual bool setDBValuesForUser (const MonitorElement *me, HDQMSummary::InputVector &values) const
 
 SiStripDQMHistoryHelper (const edm::ParameterSet &pset)
 
virtual ~SiStripDQMHistoryHelper ()
 
- Protected Attributes inherited from popcon::PopConSourceHandler< HDQMSummary >
OldContainer m_to_transfer
 
std::string m_userTextLog
 

Detailed Description

Definition at line 10 of file SiStripPopConHistoryDQMBase.h.

Member Typedef Documentation

Definition at line 21 of file SiStripPopConHistoryDQMBase.h.

Constructor & Destructor Documentation

SiStripPopConHistoryDQMBase::SiStripPopConHistoryDQMBase ( const edm::ParameterSet pset)
explicit

Definition at line 3 of file SiStripPopConHistoryDQMBase.cc.

References edm::ParameterSet::getUntrackedParameter(), histoList_, and AlCaHLTBitMon_QueryRunRegistry::string.

5  , SiStripDQMHistoryHelper(iConfig)
6  , MEDir_{iConfig.getUntrackedParameter<std::string>("ME_DIR", "DQMData")}
7  , histoList_{iConfig.getParameter<VParameters>("histoList")}
8 {
9  edm::LogInfo("SiStripHistoryDQMService") << "[SiStripHistoryDQMService::SiStripHistoryDQMService]";
10 }
std::vector< edm::ParameterSet > VParameters
SiStripDQMHistoryHelper(const edm::ParameterSet &pset)
SiStripPopConHistoryDQMBase::~SiStripPopConHistoryDQMBase ( )
override

Definition at line 12 of file SiStripPopConHistoryDQMBase.cc.

13 {
14  edm::LogInfo("SiStripHistoryDQMService") << "[SiStripHistoryDQMService::~SiStripHistoryDQMService]";
15 }

Member Function Documentation

bool SiStripPopConHistoryDQMBase::checkForCompatibility ( const std::string &  otherMetaData) const
overridevirtual

Reimplemented from SiStripDQMPopConSourceHandler< HDQMSummary >.

Definition at line 17 of file SiStripPopConHistoryDQMBase.cc.

References SiStripDQMPopConSourceHandler< HDQMSummary >::getRunNumber().

18 {
19  if ( otherMetaData.empty() )
20  return true;
21 
22  uint32_t previousRun=atoi(otherMetaData.substr(otherMetaData.find("Run ")+4).c_str());
23 
24  edm::LogInfo("DQMHistoryServiceBase") << "[DQMHistoryServiceBase::checkForCompatibility] extracted string " << previousRun ;
25  return previousRun < getRunNumber();
26 }
void SiStripPopConHistoryDQMBase::dqmEndJob ( DQMStore::IBooker booker,
DQMStore::IGetter getter 
)
overridevirtual

Reimplemented from SiStripDQMPopConSourceHandler< HDQMSummary >.

Definition at line 28 of file SiStripPopConHistoryDQMBase.cc.

References DQMStore::IGetter::getAllContents(), SiStripDQMPopConSourceHandler< HDQMSummary >::getRunNumber(), HDQMSummary::getUserDBContent(), histoList_, m_obj, MEDir_, SiStripDQMHistoryHelper::scanTreeAndFillSummary(), SiStripDQMHistoryHelper::setDBLabelsForGauss(), SiStripDQMHistoryHelper::setDBLabelsForLandau(), SiStripDQMHistoryHelper::setDBLabelsForStat(), SiStripDQMHistoryHelper::setDBLabelsForUser(), HDQMSummary::setRunNr(), HDQMSummary::setUserDBContent(), and AlCaHLTBitMon_QueryRunRegistry::string.

29 {
30  m_obj = HDQMSummary();
32 
33  // DISCOVER SET OF HISTOGRAMS & QUANTITIES TO BE UPLOADED
34  std::vector<std::string> userDBContent;
35  for ( const auto& histoParams : histoList_ ) {
36  const std::string keyName{histoParams.getUntrackedParameter<std::string>("keyName")};
37  for ( const auto& quant : histoParams.getUntrackedParameter<std::vector<std::string> >("quantitiesToExtract") ) {
38  if ( quant == "landau" )
39  setDBLabelsForLandau(keyName, userDBContent);
40  else if ( quant == "gauss" )
41  setDBLabelsForGauss(keyName, userDBContent);
42  else if ( quant == "stat" )
43  setDBLabelsForStat(keyName, userDBContent);
44  else
45  setDBLabelsForUser(keyName, userDBContent, quant);
46  }
47  }
48  m_obj.setUserDBContent(userDBContent);
49 
50  std::stringstream ss;
51  ss << "[DQMHistoryServiceBase::scanTreeAndFillSummary] QUANTITIES TO BE INSERTED IN DB :" << std::endl;
52  for ( const std::string& iCont : m_obj.getUserDBContent() ) {
53  ss << iCont<< std::endl;
54  }
55  edm::LogInfo("HDQMSummary") << ss.str();
56 
57  // OPEN DQM FILE
58  const std::vector<MonitorElement*> MEs = getter.getAllContents(MEDir_);
59 
60  // FILL SUMMARY
61  edm::LogInfo("HDQMSummary") << "\nSTARTING TO FILL OBJECT ";
62  for ( const auto& histoParams : histoList_ ) {
63  const std::string keyName{histoParams.getUntrackedParameter<std::string>("keyName")};
64  scanTreeAndFillSummary(MEs, &m_obj, keyName, histoParams.getUntrackedParameter<std::vector<std::string> >("quantitiesToExtract"));
65  }
66 }
std::vector< MonitorElement * > getAllContents(std::string const &path, uint32_t runNumber=0, uint32_t lumi=0)
Definition: DQMStore.cc:295
void setRunNr(int inputRunNr)
Definition: HDQMSummary.h:112
virtual bool setDBLabelsForUser(const std::string &keyName, std::vector< std::string > &userDBContent, const std::string &quantity) const
virtual bool setDBLabelsForStat(const std::string &keyName, std::vector< std::string > &userDBContent) const
void setUserDBContent(const std::vector< std::string > &userDBContent)
Definition: HDQMSummary.h:111
virtual bool setDBLabelsForLandau(const std::string &keyName, std::vector< std::string > &userDBContent) const
virtual void scanTreeAndFillSummary(const std::vector< MonitorElement * > &MEs, HDQMSummary *summary, const std::string &histoName, const std::vector< std::string > &Quantities) const
quant
Definition: HTMonitor.h:44
virtual bool setDBLabelsForGauss(const std::string &keyName, std::vector< std::string > &userDBContent) const
std::vector< std::string > getUserDBContent() const
Definition: HDQMSummary.h:116
HDQMSummary * SiStripPopConHistoryDQMBase::getObj ( ) const
overridevirtual

Implements SiStripDQMPopConSourceHandler< HDQMSummary >.

Definition at line 68 of file SiStripPopConHistoryDQMBase.cc.

References m_obj.

69 {
70  return new HDQMSummary(m_obj);
71 }

Member Data Documentation

std::unique_ptr<HDQMfitUtilities> SiStripPopConHistoryDQMBase::fitME_
private

Definition at line 19 of file SiStripPopConHistoryDQMBase.h.

VParameters SiStripPopConHistoryDQMBase::histoList_
private

Definition at line 22 of file SiStripPopConHistoryDQMBase.h.

Referenced by dqmEndJob(), and SiStripPopConHistoryDQMBase().

HDQMSummary SiStripPopConHistoryDQMBase::m_obj
private

Definition at line 23 of file SiStripPopConHistoryDQMBase.h.

Referenced by dqmEndJob(), and getObj().

std::string SiStripPopConHistoryDQMBase::MEDir_
private

Definition at line 20 of file SiStripPopConHistoryDQMBase.h.

Referenced by dqmEndJob().