CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

GenericHistoryDQMService Class Reference

#include <GenericHistoryDQMService.h>

Inheritance diagram for GenericHistoryDQMService:
DQMHistoryServiceBase

List of all members.

Public Member Functions

 GenericHistoryDQMService (const edm::ParameterSet &, const edm::ActivityRegistry &)
 ~GenericHistoryDQMService ()

Private Member Functions

uint32_t returnDetComponent (const MonitorElement *ME)
bool setDBLabelsForUser (std::string &keyName, std::vector< std::string > &userDBContent, std::string &quantity)
 Example on how to define an user function for the statistic extraction.
bool setDBValuesForUser (std::vector< MonitorElement * >::const_iterator iterMes, HDQMSummary::InputVector &values, std::string &quantity)

Private Attributes

edm::ParameterSet iConfig_

Detailed Description

Author:
D. Giordano to read DQM root file & insert summary informations to DB

Definition at line 11 of file GenericHistoryDQMService.h.


Constructor & Destructor Documentation

GenericHistoryDQMService::GenericHistoryDQMService ( const edm::ParameterSet iConfig,
const edm::ActivityRegistry aReg 
) [explicit]

Definition at line 6 of file GenericHistoryDQMService.cc.

: DQMHistoryServiceBase::DQMHistoryServiceBase(iConfig, aReg), iConfig_(iConfig)
{
  edm::LogInfo("GenericHistoryDQMService") <<  "[GenericHistoryDQMService::GenericHistoryDQMService]";
}
GenericHistoryDQMService::~GenericHistoryDQMService ( )

Definition at line 12 of file GenericHistoryDQMService.cc.

{
  edm::LogInfo("GenericHistoryDQMService") <<  "[GenericHistoryDQMService::~GenericHistoryDQMService]";
}

Member Function Documentation

uint32_t GenericHistoryDQMService::returnDetComponent ( const MonitorElement ME) [private, virtual]

Reimplemented from DQMHistoryServiceBase.

Definition at line 17 of file GenericHistoryDQMService.cc.

References edm::ParameterSet::getParameter(), iConfig_, and LogTrace.

{
  LogTrace("GenericHistoryDQMService") <<  "[GenericHistoryDQMService::returnDetComponent] returning value defined in the configuration Pset \"DetectorId\"";
  return iConfig_.getParameter<uint32_t>("DetectorId");
}
bool GenericHistoryDQMService::setDBLabelsForUser ( std::string &  keyName,
std::vector< std::string > &  userDBContent,
std::string &  quantity 
) [private, virtual]

Example on how to define an user function for the statistic extraction.

Reimplemented from DQMHistoryServiceBase.

Definition at line 24 of file GenericHistoryDQMService.cc.

{
  if(quantity=="userExample_XMax"){
    userDBContent.push_back(keyName+std::string("@")+std::string("userExample_XMax"));
  }
  else if(quantity=="userExample_mean"){
      userDBContent.push_back(keyName+std::string("@")+std::string("userExample_mean"));
  }
  else{
    edm::LogError("DQMHistoryServiceBase") 
      << "Quantity " << quantity
      << " cannot be handled\nAllowed quantities are" 
      << "\n  'stat'   that includes: entries, mean, rms"
      << "\n  'landau' that includes: landauPeak, landauPeakErr, landauSFWHM, landauChi2NDF"
      << "\n  'gauss'  that includes: gaussMean, gaussSigma, gaussChi2NDF"
      << "\n or a specific user quantity that should be implemented in the user functions GenericHistoryDQMService::setDBLabelsForUser"
      << std::endl;
    return false;
  }
  return true;
}
bool GenericHistoryDQMService::setDBValuesForUser ( std::vector< MonitorElement * >::const_iterator  iterMes,
HDQMSummary::InputVector values,
std::string &  quantity 
) [private, virtual]

Reimplemented from DQMHistoryServiceBase.

Definition at line 46 of file GenericHistoryDQMService.cc.

{
  if(quantity=="userExample_XMax"){
    values.push_back( (*iterMes)->getTH1F()->GetXaxis()->GetBinCenter((*iterMes)->getTH1F()->GetMaximumBin()));
  }
  else if(quantity=="userExample_mean"){
    values.push_back( (*iterMes)->getMean() );
  }
  else{
    return false;
  }
  return true;
}

Member Data Documentation

Reimplemented from DQMHistoryServiceBase.

Definition at line 23 of file GenericHistoryDQMService.h.

Referenced by returnDetComponent().