CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
SiStripPopConHistoryDQM Class Reference
Inheritance diagram for SiStripPopConHistoryDQM:
SiStripPopConHistoryDQMBase SiStripDQMPopConSourceHandler< HDQMSummary > SiStripDQMHistoryHelper popcon::PopConSourceHandler< HDQMSummary >

Public Member Functions

void initES (const edm::EventSetup &) override
 
 SiStripPopConHistoryDQM (const edm::ParameterSet &pset)
 
 ~SiStripPopConHistoryDQM () override
 
- Public Member Functions inherited from SiStripPopConHistoryDQMBase
bool checkForCompatibility (const std::string &otherMetaData)
 
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 bool checkForCompatibility (const std::string otherMetaData) const
 
virtual std::string getMetaDataString () const
 
void getNewObjects () override
 
std::string id () const override
 
 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 Member Functions

uint32_t returnDetComponent (const MonitorElement *ME) const override
 
bool setDBLabelsForUser (const std::string &keyName, std::vector< std::string > &userDBContent, const std::string &quantity) const override
 
bool setDBValuesForUser (const MonitorElement *me, HDQMSummary::InputVector &values, const std::string &quantity) const override
 

Private Attributes

const TrackerTopologytrackerTopo_
 

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 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
 
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
 
 SiStripDQMHistoryHelper (const edm::ParameterSet &pset)
 
virtual ~SiStripDQMHistoryHelper ()
 
- Protected Attributes inherited from popcon::PopConSourceHandler< HDQMSummary >
OldContainer m_to_transfer
 
std::string m_userTextLog
 

Detailed Description

Author
D. Giordano, A.-C. Le Bihan

to read DQM root file & insert summary informations to DB

Definition at line 14 of file SiStripPopConHistoryDQM.cc.

Constructor & Destructor Documentation

SiStripPopConHistoryDQM::SiStripPopConHistoryDQM ( const edm::ParameterSet pset)
inlineexplicit
SiStripPopConHistoryDQM::~SiStripPopConHistoryDQM ( )
override

Definition at line 32 of file SiStripPopConHistoryDQM.cc.

Referenced by SiStripPopConHistoryDQM().

32 {}

Member Function Documentation

void SiStripPopConHistoryDQM::initES ( const edm::EventSetup setup)
overridevirtual
uint32_t SiStripPopConHistoryDQM::returnDetComponent ( const MonitorElement ME) const
overrideprivatevirtual

Implements SiStripDQMHistoryHelper.

Definition at line 41 of file SiStripPopConHistoryDQM.cc.

References MonitorElement::getName(), LogTrace, DetId::rawId(), str, AlCaHLTBitMon_QueryRunRegistry::string, TrackerTopology::tecDetId(), TrackerTopology::tibDetId(), TrackerTopology::tidDetId(), TrackerTopology::tobDetId(), DetId::Tracker, and trackerTopo_.

Referenced by SiStripPopConHistoryDQM().

42 {
43  LogTrace("SiStripHistoryDQMService") << "[SiStripHistoryDQMService::returnDetComponent]";
44  const std::string& str{ME->getName()};
45  const size_t __key_length__=7;
46  const size_t __detid_length__=9;
47 
48  uint32_t layer=0,side=0;
49 
50  if ( str.find("__det__") != std::string::npos ) {
51  return atoi(str.substr(str.find("__det__")+__key_length__,__detid_length__).c_str());
52  }
53  //TIB
54  else if ( str.find("TIB") != std::string::npos ) {
55  if ( str.find("layer")!= std::string::npos )
56  layer = atoi(str.substr(str.find("layer__")+__key_length__,1).c_str());
57  return trackerTopo_->tibDetId(layer,0,0,0,0,0).rawId();
58  }
59  //TOB
60  else if ( str.find("TOB") != std::string::npos ) {
61  if ( str.find("layer") != std::string::npos )
62  layer = atoi(str.substr(str.find("layer__")+__key_length__,1).c_str());
63  return trackerTopo_->tobDetId(layer,0,0,0,0).rawId();
64  }
65  //TID
66  else if ( str.find("TID") != std::string::npos ) {
67  if ( str.find("side") != std::string::npos ) {
68  side = atoi(str.substr(str.find("_side__")+__key_length__,1).c_str());
69  if ( str.find("wheel") != std::string::npos ) {
70  layer = atoi(str.substr(str.find("wheel__")+__key_length__,1).c_str());
71  }
72  }
73  return trackerTopo_->tidDetId(side,layer,0,0,0,0).rawId();
74  }
75  //TEC
76  else if ( str.find("TEC") != std::string::npos ) {
77  if ( str.find("side") != std::string::npos ) {
78  side = atoi(str.substr(str.find("_side__")+__key_length__,1).c_str());
79  if ( str.find("wheel") != std::string::npos ) {
80  layer = atoi(str.substr(str.find("wheel__")+__key_length__,1).c_str());
81  }
82  }
83  return trackerTopo_->tecDetId(side,layer,0,0,0,0,0).rawId();
84  }
85  else
86  return DetId(DetId::Tracker,0).rawId(); //Full Tracker
87 }
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:50
const std::string & getName() const
get name of ME
DetId tobDetId(uint32_t layer, uint32_t rod_fw_bw, uint32_t rod, uint32_t module, uint32_t ster) const
DetId tidDetId(uint32_t side, uint32_t wheel, uint32_t ring, uint32_t module_fw_bw, uint32_t module, uint32_t ster) const
#define LogTrace(id)
Definition: DetId.h:18
DetId tibDetId(uint32_t layer, uint32_t str_fw_bw, uint32_t str_int_ext, uint32_t str, uint32_t module, uint32_t ster) const
const TrackerTopology * trackerTopo_
#define str(s)
DetId tecDetId(uint32_t side, uint32_t wheel, uint32_t petal_fw_bw, uint32_t petal, uint32_t ring, uint32_t module, uint32_t ster) const
bool SiStripPopConHistoryDQM::setDBLabelsForUser ( const std::string &  keyName,
std::vector< std::string > &  userDBContent,
const std::string &  quantity 
) const
overrideprivatevirtual

Reimplemented from SiStripDQMHistoryHelper.

Definition at line 90 of file SiStripPopConHistoryDQM.cc.

References tauVariables_cff::quantity, SiStripDQMHistoryHelper::sep(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by SiStripPopConHistoryDQM().

91 {
92  if (quantity == "user_2DYmean") {
93  userDBContent.push_back(keyName+sep()+std::string("yMean"));
94  userDBContent.push_back(keyName+sep()+std::string("yError"));
95  } else {
96  edm::LogError("SiStripHistoryDQMService") << "ERROR: quantity does not exist in SiStripHistoryDQMService::setDBValuesForUser(): " << quantity;
97  return false;
98  }
99  return true;
100 }
bool SiStripPopConHistoryDQM::setDBValuesForUser ( const MonitorElement me,
HDQMSummary::InputVector values,
const std::string &  quantity 
) const
overrideprivatevirtual

Reimplemented from SiStripDQMHistoryHelper.

Definition at line 102 of file SiStripPopConHistoryDQM.cc.

References MonitorElement::getTH2F(), and tauVariables_cff::quantity.

Referenced by SiStripPopConHistoryDQM().

103 {
104  if (quantity == "user_2DYmean") {
105  TH2F* Hist = (TH2F*) me->getTH2F();
106  values.push_back( Hist->GetMean(2) );
107  values.push_back( Hist->GetRMS(2) );
108  } else {
109  edm::LogError("SiStripHistoryDQMService") << "ERROR: quantity does not exist in SiStripHistoryDQMService::setDBValuesForUser(): " << quantity;
110  return false;
111  }
112  return true;
113 }
TH2F * getTH2F() const

Member Data Documentation

const TrackerTopology* SiStripPopConHistoryDQM::trackerTopo_
private

Definition at line 29 of file SiStripPopConHistoryDQM.cc.

Referenced by initES(), and returnDetComponent().