CMS 3D CMS Logo

Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes

ecaldqm::DQWorker Class Reference

#include <DQWorker.h>

Inheritance diagram for ecaldqm::DQWorker:
ecaldqm::DQWorkerClient ecaldqm::DQWorkerTask ecaldqm::CertificationClient ecaldqm::IntegrityClient ecaldqm::LaserClient ecaldqm::OccupancyClient ecaldqm::PresampleClient ecaldqm::RawDataClient ecaldqm::SelectiveReadoutClient ecaldqm::SummaryClient ecaldqm::TimingClient ecaldqm::TrigPrimClient ecaldqm::ClusterTask ecaldqm::EnergyTask ecaldqm::IntegrityTask ecaldqm::LaserTask ecaldqm::LedTask ecaldqm::OccupancyTask ecaldqm::PedestalTask ecaldqm::PNIntegrityTask ecaldqm::PNPresampleTask ecaldqm::PresampleTask ecaldqm::RawDataTask ecaldqm::SelectiveReadoutTask ecaldqm::TestPulseTask ecaldqm::TimingTask ecaldqm::TowerStatusTask ecaldqm::TrigPrimTask

List of all members.

Public Types

enum  MESets { nMESets }

Public Member Functions

virtual void beginLuminosityBlock (const edm::LuminosityBlock &, const edm::EventSetup &)
virtual void beginRun (const edm::Run &, const edm::EventSetup &)
virtual void bookMEs ()
 DQWorker (const edm::ParameterSet &, const edm::ParameterSet &, std::string const &)
virtual void endLuminosityBlock (const edm::LuminosityBlock &, const edm::EventSetup &)
virtual void endRun (const edm::Run &, const edm::EventSetup &)
const std::vector< MESet * > & getMEs ()
virtual std::string const & getName ()
virtual bool isInitialized ()
virtual void reset ()
virtual void setInitialized (bool _init)
virtual void setVerbosity (int _verbosity)
virtual ~DQWorker ()

Static Public Member Functions

static void setMEData (std::vector< MEData > &)

Static Public Attributes

static std::map< std::string,
std::vector< MEData > > 
meData

Protected Member Functions

MESetcreateMESet_ (std::string const &, MEData const &, bool _readOnly=false) const
void meSet_ (unsigned, edm::ParameterSet const &)

Protected Attributes

bool initialized_
std::vector< MESet * > MEs_
std::string name_
int verbosity_

Detailed Description

Definition at line 22 of file DQWorker.h.


Member Enumeration Documentation


Constructor & Destructor Documentation

ecaldqm::DQWorker::DQWorker ( const edm::ParameterSet ,
const edm::ParameterSet _paths,
std::string const &  _name 
)

Definition at line 18 of file DQWorker.cc.

References asciidump::at, createMESet_(), AlCaHLTBitMon_QueryRunRegistry::data, edm::ParameterSet::getUntrackedParameter(), meData, MEs_, name_, and ecaldqm::MEData::pathName.

                                                                                                   :
    name_(_name),
    MEs_(0),
    initialized_(false),
    verbosity_(0)
  {
    using namespace std;

    map<string, vector<MEData> >::iterator dItr(meData.find(name_));
    if(dItr == meData.end())
      throw cms::Exception("InvalidCall") << "MonitorElement setup data not found for " << name_ << std::endl;

    vector<MEData> const& vData(dItr->second);
    MEs_.resize(vData.size());

    for(unsigned iME(0); iME < MEs_.size(); iME++){
      MEData& data(meData[name_].at(iME));
      string fullpath(_paths.getUntrackedParameter<string>(data.pathName));

      MEs_.at(iME) = createMESet_(fullpath, data);
    }
  }
ecaldqm::DQWorker::~DQWorker ( ) [virtual]

Definition at line 41 of file DQWorker.cc.

References MEs_.

  {
    for(unsigned iME(0); iME < MEs_.size(); iME++)
      delete MEs_[iME];
  }

Member Function Documentation

virtual void ecaldqm::DQWorker::beginLuminosityBlock ( const edm::LuminosityBlock ,
const edm::EventSetup  
) [inline, virtual]
virtual void ecaldqm::DQWorker::beginRun ( const edm::Run ,
const edm::EventSetup  
) [inline, virtual]
void ecaldqm::DQWorker::bookMEs ( ) [virtual]
MESet * ecaldqm::DQWorker::createMESet_ ( std::string const &  _fullpath,
MEData const &  _data,
bool  _readOnly = false 
) const [protected]

Definition at line 70 of file DQWorker.cc.

References ecaldqm::MEData::btype, MonitorElement::DQM_KIND_REAL, MonitorElement::DQM_KIND_TH1F, MonitorElement::DQM_KIND_TH2F, MonitorElement::DQM_KIND_TPROFILE, MonitorElement::DQM_KIND_TPROFILE2D, Exception, EcalDQMBinningService::kChannel, ecaldqm::MEData::kind, EcalDQMBinningService::kReport, EcalDQMBinningService::kTrend, EcalDQMBinningService::kUser, EcalDQMBinningService::nObjType, ecaldqm::MEData::otype, and ecaldqm::MEData::yaxis.

Referenced by DQWorker(), and ecaldqm::DQWorkerClient::source_().

  {
    BinService::ObjectType otype(_data.otype);
    BinService::BinningType btype(_data.btype);
    MonitorElement::Kind kind(_data.kind);

    if(otype == BinService::nObjType)
      return new MESetNonObject(_fullpath, _data, _readOnly);

    if(otype == BinService::kChannel)
      return new MESetChannel(_fullpath, _data, _readOnly);

    if(btype == BinService::kTrend)
      return new MESetTrend(_fullpath, _data, _readOnly);

    unsigned logicalDimensions;
    switch(kind){
    case MonitorElement::DQM_KIND_REAL:
      logicalDimensions = 0;
      break;
    case MonitorElement::DQM_KIND_TH1F:
    case MonitorElement::DQM_KIND_TPROFILE:
      logicalDimensions = 1;
      break;
    case MonitorElement::DQM_KIND_TH2F:
    case MonitorElement::DQM_KIND_TPROFILE2D:
      logicalDimensions = 2;
      break;
    default:
      throw cms::Exception("InvalidCall") << "Histogram type " << kind << " not supported" << std::endl;
    }

    // example case: Ecal/TriggerPrimitives/EmulMatching/TrigPrimTask matching index
    if(logicalDimensions == 2 && _data.yaxis && btype != BinService::kUser) logicalDimensions = 1;

    // for EventInfo summary contents
    if(btype == BinService::kReport){
      if(logicalDimensions != 0)
        throw cms::Exception("InvalidCall") << "Report can only be a DQM_KIND_REAL" << std::endl;
    }

    if(btype == BinService::kUser)
      return new MESetEcal(_fullpath, _data, logicalDimensions, _readOnly);

    if(logicalDimensions == 0)
      return new MESetDet0D(_fullpath, _data, _readOnly);

    if(logicalDimensions == 1)
      return new MESetDet1D(_fullpath, _data, _readOnly);

    if(logicalDimensions == 2)
      return new MESetDet2D(_fullpath, _data, _readOnly);

    return 0;
  }
virtual void ecaldqm::DQWorker::endLuminosityBlock ( const edm::LuminosityBlock ,
const edm::EventSetup  
) [inline, virtual]

Reimplemented in ecaldqm::TowerStatusTask, and ecaldqm::DQWorkerClient.

Definition at line 31 of file DQWorker.h.

Referenced by EcalDQMonitorTask::endLuminosityBlock().

{};
virtual void ecaldqm::DQWorker::endRun ( const edm::Run ,
const edm::EventSetup  
) [inline, virtual]

Reimplemented in ecaldqm::TowerStatusTask.

Definition at line 28 of file DQWorker.h.

Referenced by EcalDQMonitorTask::endRun().

{};
const std::vector<MESet*>& ecaldqm::DQWorker::getMEs ( ) [inline]

Definition at line 41 of file DQWorker.h.

References MEs_.

{ return MEs_; }
virtual std::string const& ecaldqm::DQWorker::getName ( ) [inline, virtual]
virtual bool ecaldqm::DQWorker::isInitialized ( ) [inline, virtual]
void ecaldqm::DQWorker::meSet_ ( unsigned  ,
edm::ParameterSet const &   
) [protected]
void ecaldqm::DQWorker::reset ( void  ) [virtual]

Reimplemented in ecaldqm::DQWorkerClient.

Definition at line 55 of file DQWorker.cc.

References initialized_, and MEs_.

Referenced by EcalDQMonitorTask::beginRun().

  {
    for(unsigned iME(0); iME < MEs_.size(); iME++)
      if(MEs_[iME]) MEs_[iME]->clear();

    initialized_ = false;
  }
virtual void ecaldqm::DQWorker::setInitialized ( bool  _init) [inline, virtual]

Definition at line 38 of file DQWorker.h.

References initialized_.

Referenced by EcalDQMonitorTask::analyze().

{ initialized_ = _init; }
void ecaldqm::DQWorker::setMEData ( std::vector< MEData > &  ) [static]
virtual void ecaldqm::DQWorker::setVerbosity ( int  _verbosity) [inline, virtual]

Definition at line 39 of file DQWorker.h.

References verbosity_.

Referenced by EcalDQMonitorClient::EcalDQMonitorClient(), and EcalDQMonitorTask::EcalDQMonitorTask().

{ verbosity_ = _verbosity; }

Member Data Documentation

std::map< std::string, std::vector< MEData > > ecaldqm::DQWorker::meData [static]
std::vector<MESet*> ecaldqm::DQWorker::MEs_ [protected]

Definition at line 56 of file DQWorker.h.

Referenced by ecaldqm::IntegrityTask::beginLuminosityBlock(), ecaldqm::RawDataTask::beginLuminosityBlock(), ecaldqm::LaserClient::beginRun(), ecaldqm::TowerStatusTask::beginRun(), ecaldqm::SummaryClient::beginRun(), ecaldqm::CertificationClient::beginRun(), ecaldqm::RawDataTask::bookMEs(), ecaldqm::PresampleClient::bookMEs(), ecaldqm::OccupancyClient::bookMEs(), ecaldqm::LaserTask::bookMEs(), ecaldqm::ClusterTask::bookMEs(), ecaldqm::PedestalTask::bookMEs(), ecaldqm::TrigPrimTask::bookMEs(), ecaldqm::TestPulseTask::bookMEs(), ecaldqm::LaserClient::bookMEs(), ecaldqm::IntegrityClient::bookMEs(), ecaldqm::LedTask::bookMEs(), ecaldqm::TrigPrimClient::bookMEs(), ecaldqm::TimingClient::bookMEs(), bookMEs(), ecaldqm::IntegrityTask::bookMEs(), ecaldqm::RawDataClient::bookMEs(), ecaldqm::CertificationClient::bookMEs(), DQWorker(), ecaldqm::DQWorkerClient::fillQuality_(), getMEs(), ecaldqm::OccupancyClient::producePlots(), ecaldqm::TimingClient::producePlots(), ecaldqm::CertificationClient::producePlots(), ecaldqm::LaserClient::producePlots(), ecaldqm::SummaryClient::producePlots(), ecaldqm::SelectiveReadoutClient::producePlots(), ecaldqm::PresampleClient::producePlots(), ecaldqm::TrigPrimClient::producePlots(), reset(), ecaldqm::ClusterTask::runOnBasicClusters(), ecaldqm::TestPulseTask::runOnDigis(), ecaldqm::OccupancyTask::runOnDigis(), ecaldqm::PedestalTask::runOnDigis(), ecaldqm::LaserTask::runOnDigis(), ecaldqm::LedTask::runOnDigis(), ecaldqm::SelectiveReadoutTask::runOnDigis(), ecaldqm::PresampleTask::runOnDigis(), ecaldqm::SelectiveReadoutTask::runOnEBSrFlags(), ecaldqm::SelectiveReadoutTask::runOnEESrFlags(), ecaldqm::TrigPrimTask::runOnEmulTPs(), ecaldqm::IntegrityTask::runOnErrors(), ecaldqm::PNIntegrityTask::runOnErrors(), ecaldqm::TestPulseTask::runOnPnDigis(), ecaldqm::LaserTask::runOnPnDigis(), ecaldqm::PNPresampleTask::runOnPnDigis(), ecaldqm::LedTask::runOnPnDigis(), ecaldqm::PedestalTask::runOnPnDigis(), ecaldqm::RawDataTask::runOnRawData(), ecaldqm::TrigPrimTask::runOnRealTPs(), ecaldqm::OccupancyTask::runOnRecHits(), ecaldqm::EnergyTask::runOnRecHits(), ecaldqm::TimingTask::runOnRecHits(), ecaldqm::SelectiveReadoutTask::runOnSource(), ecaldqm::RawDataTask::runOnSource(), ecaldqm::SelectiveReadoutTask::runOnSrFlag_(), ecaldqm::ClusterTask::runOnSuperClusters(), ecaldqm::TowerStatusTask::runOnTowerStatus(), ecaldqm::OccupancyTask::runOnTPDigis(), ecaldqm::LedTask::runOnUncalibRecHits(), ecaldqm::TestPulseTask::runOnUncalibRecHits(), ecaldqm::LaserTask::runOnUncalibRecHits(), and ~DQWorker().

std::string ecaldqm::DQWorker::name_ [protected]

Definition at line 55 of file DQWorker.h.

Referenced by DQWorker(), and getName().

Definition at line 59 of file DQWorker.h.

Referenced by setVerbosity().