CMS 3D CMS Logo

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

#include <SiStripHistoryDQMService.h>

Inheritance diagram for SiStripHistoryDQMService:
DQMHistoryServiceBase

Public Member Functions

 SiStripHistoryDQMService (const edm::ParameterSet &, const edm::ActivityRegistry &)
 
 ~SiStripHistoryDQMService ()
 
- Public Member Functions inherited from DQMHistoryServiceBase
virtual bool checkForCompatibility (std::string ss)
 
 DQMHistoryServiceBase (const edm::ParameterSet &, const edm::ActivityRegistry &)
 
virtual void getMetaDataString (std::stringstream &ss)
 
virtual void getObj (HDQMSummary *&obj)
 
virtual void initialize ()
 
virtual void setSeparator (std::string const &)
 
virtual ~DQMHistoryServiceBase ()
 

Private Member Functions

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

Private Attributes

edm::ParameterSet iConfig_
 

Additional Inherited Members

- Protected Member Functions inherited from DQMHistoryServiceBase
virtual void createSummary ()
 
virtual uint32_t getRunNumber () const
 
virtual void openRequestedFile ()
 
virtual void scanTreeAndFillSummary (const std::vector< MonitorElement * > &MEs, HDQMSummary *summary, std::string &histoName, std::vector< std::string > &Quantities)
 
virtual bool setDBLabelsForGauss (std::string &keyName, std::vector< std::string > &userDBContent)
 
virtual bool setDBLabelsForLandau (std::string &keyName, std::vector< std::string > &userDBContent)
 
virtual bool setDBLabelsForStat (std::string &keyName, std::vector< std::string > &userDBContent)
 
virtual bool setDBLabelsForUser (std::string &keyName, std::vector< std::string > &userDBContent)
 
virtual bool setDBValuesForGauss (std::vector< MonitorElement * >::const_iterator iterMes, HDQMSummary::InputVector &values)
 
virtual bool setDBValuesForLandau (std::vector< MonitorElement * >::const_iterator iterMes, HDQMSummary::InputVector &values)
 
virtual bool setDBValuesForStat (std::vector< MonitorElement * >::const_iterator iterMes, HDQMSummary::InputVector &values)
 
virtual bool setDBValuesForUser (std::vector< MonitorElement * >::const_iterator iterMes, HDQMSummary::InputVector &values)
 
- Protected Attributes inherited from DQMHistoryServiceBase
DQMStoredqmStore_
 
HDQMfitUtilitiesfitME
 
std::string fSep
 
edm::ParameterSet iConfig_
 
HDQMSummaryobj_
 

Detailed Description

Author
D. Giordano, A.-C. Le Bihan to read DQM root file & insert summary informations to DB

Definition at line 11 of file SiStripHistoryDQMService.h.

Constructor & Destructor Documentation

SiStripHistoryDQMService::SiStripHistoryDQMService ( const edm::ParameterSet iConfig,
const edm::ActivityRegistry aReg 
)
explicit

Definition at line 11 of file SiStripHistoryDQMService.cc.

13 {
14  edm::LogInfo("SiStripHistoryDQMService") << "[SiStripHistoryDQMService::SiStripHistoryDQMService]";
15 }
DQMHistoryServiceBase(const edm::ParameterSet &, const edm::ActivityRegistry &)
SiStripHistoryDQMService::~SiStripHistoryDQMService ( )

Definition at line 18 of file SiStripHistoryDQMService.cc.

18  {
19  edm::LogInfo("SiStripHistoryDQMService") << "[SiStripHistoryDQMService::~SiStripHistoryDQMService]";
20 }

Member Function Documentation

uint32_t SiStripHistoryDQMService::returnDetComponent ( const MonitorElement ME)
privatevirtual

Reimplemented from DQMHistoryServiceBase.

Definition at line 23 of file SiStripHistoryDQMService.cc.

References MonitorElement::getName(), LogTrace, DetId::rawId(), harvestTrackValidationPlots::str, AlCaHLTBitMon_QueryRunRegistry::string, and DetId::Tracker.

23  {
24  LogTrace("SiStripHistoryDQMService") << "[SiStripHistoryDQMService::returnDetComponent]";
25  std::string str=ME->getName();
26  size_t __key_length__=7;
27  size_t __detid_length__=9;
28 
29  uint32_t layer=0,side=0;
30 
31  if(str.find("__det__")!= std::string::npos){
32  return atoi(str.substr(str.find("__det__")+__key_length__,__detid_length__).c_str());
33  }
34  //TIB
35  else if(str.find("TIB")!= std::string::npos){
36  if (str.find("layer")!= std::string::npos)
37  layer=atoi(str.substr(str.find("layer__")+__key_length__,1).c_str());
38  return TIBDetId(layer,0,0,0,0,0).rawId();
39  }
40  //TOB
41  else if(str.find("TOB")!= std::string::npos){
42  if (str.find("layer")!= std::string::npos)
43  layer=atoi(str.substr(str.find("layer__")+__key_length__,1).c_str());
44  return TOBDetId(layer,0,0,0,0).rawId();
45  }
46  //TID
47  else if(str.find("TID")!= std::string::npos){
48  if (str.find("side")!= std::string::npos){
49  side=atoi(str.substr(str.find("_side__")+__key_length__,1).c_str());
50  if (str.find("wheel")!= std::string::npos){
51  layer=atoi(str.substr(str.find("wheel__")+__key_length__,1).c_str());
52  }
53  }
54  return TIDDetId(side,layer,0,0,0,0).rawId();
55  }
56  //TEC
57  else if(str.find("TEC")!= std::string::npos){
58  if (str.find("side")!= std::string::npos){
59  side=atoi(str.substr(str.find("_side__")+__key_length__,1).c_str());
60  if (str.find("wheel")!= std::string::npos){
61  layer=atoi(str.substr(str.find("wheel__")+__key_length__,1).c_str());
62  }
63  }
64  return TECDetId(side,layer,0,0,0,0,0).rawId();
65  }
66  else
67  return SiStripDetId(DetId::Tracker,0).rawId(); //Full Tracker
68 }
const std::string & getName(void) const
get name of ME
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
#define LogTrace(id)
Detector identifier class for the strip tracker.
Definition: SiStripDetId.h:17
bool SiStripHistoryDQMService::setDBLabelsForUser ( std::string &  keyName,
std::vector< std::string > &  userDBContent,
std::string &  quantity 
)
privatevirtual

Reimplemented from DQMHistoryServiceBase.

Definition at line 71 of file SiStripHistoryDQMService.cc.

References DQMHistoryServiceBase::fSep, tauVariables_cff::quantity, and AlCaHLTBitMon_QueryRunRegistry::string.

71  {
72  if (quantity == "user_2DYmean") {
73  userDBContent.push_back(keyName+fSep+std::string("yMean"));
74  userDBContent.push_back(keyName+fSep+std::string("yError"));
75  } else {
76  edm::LogError("SiStripHistoryDQMService") << "ERROR: quantity does not exist in SiStripHistoryDQMService::setDBValuesForUser(): " << quantity;
77  return false;
78  }
79  return true;
80 }
bool SiStripHistoryDQMService::setDBValuesForUser ( std::vector< MonitorElement * >::const_iterator  iterMes,
HDQMSummary::InputVector values,
std::string &  quantity 
)
privatevirtual

Reimplemented from DQMHistoryServiceBase.

Definition at line 81 of file SiStripHistoryDQMService.cc.

References tauVariables_cff::quantity.

81  {
82  if (quantity == "user_2DYmean") {
83  TH2F* Hist = (TH2F*) (*iterMes)->getTH2F();
84  values.push_back( Hist->GetMean(2) );
85  values.push_back( Hist->GetRMS(2) );
86  } else {
87  edm::LogError("SiStripHistoryDQMService") << "ERROR: quantity does not exist in SiStripHistoryDQMService::setDBValuesForUser(): " << quantity;
88  return false;
89  }
90  return true;
91 }

Member Data Documentation

edm::ParameterSet SiStripHistoryDQMService::iConfig_
private

Definition at line 25 of file SiStripHistoryDQMService.h.