CMS 3D CMS Logo

Public Types | Public Member Functions | Static Public Member Functions | Private Attributes

ecaldqm::IntegrityTask Class Reference

#include <IntegrityTask.h>

Inheritance diagram for ecaldqm::IntegrityTask:
ecaldqm::DQWorkerTask ecaldqm::DQWorker

List of all members.

Public Types

enum  MESets {
  kByLumi, kTotal, kGain, kChId,
  kGainSwitch, kBlockSize, kTowerId, kFEDNonFatal,
  nMESets
}

Public Member Functions

void analyze (const void *, Collections)
void beginLuminosityBlock (const edm::LuminosityBlock &, const edm::EventSetup &)
void bookMEs ()
 IntegrityTask (const edm::ParameterSet &, const edm::ParameterSet &)
void runOnErrors (const DetIdCollection &, Collections)
void runOnErrors (const EcalElectronicsIdCollection &, Collections)
 ~IntegrityTask ()

Static Public Member Functions

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

Private Attributes

std::string hltTaskFolder_
int hltTaskMode_

Detailed Description

Definition at line 11 of file IntegrityTask.h.


Member Enumeration Documentation

Enumerator:
kByLumi 
kTotal 
kGain 
kChId 
kGainSwitch 
kBlockSize 
kTowerId 
kFEDNonFatal 
nMESets 

Reimplemented from ecaldqm::DQWorker.

Definition at line 25 of file IntegrityTask.h.


Constructor & Destructor Documentation

data refman pasoursint CMSSW_5_3_10_patch2 src DQM EcalBarrelMonitorTasks src IntegrityTask cc ecaldqm::IntegrityTask::IntegrityTask ( const edm::ParameterSet _params,
const edm::ParameterSet _paths 
)

Definition at line 8 of file IntegrityTask.cc.

References edm::ParameterSet::getUntrackedParameter(), edm::ParameterSet::getUntrackedParameterSet(), ecaldqm::kBlockSizeErrors, ecaldqm::kChIdErrors, ecaldqm::kGainErrors, ecaldqm::kGainSwitchErrors, ecaldqm::kLumiSection, ecaldqm::kTowerIdErrors, and scaleCards::path.

  {
    collectionMask_ = 
      (0x1 << kLumiSection) |
      (0x1 << kGainErrors) |
      (0x1 << kChIdErrors) |
      (0x1 << kGainSwitchErrors) |
      (0x1 << kTowerIdErrors) |
      (0x1 << kBlockSizeErrors);

    edm::ParameterSet const& commonParams(_params.getUntrackedParameterSet("Common"));

    hltTaskMode_ = commonParams.getUntrackedParameter<int>("hltTaskMode");
    hltTaskFolder_ = commonParams.getUntrackedParameter<std::string>("hltTaskFolder");

    if(hltTaskMode_ != 0 && hltTaskFolder_.size() == 0)
        throw cms::Exception("InvalidConfiguration") << "HLTTask mode needs a folder name";

    if(hltTaskMode_ != 0){
      std::string path;
      std::map<std::string, std::string> replacements;
      replacements["hlttask"] = hltTaskFolder_;

      MEs_[kFEDNonFatal]->name(replacements);
    }
  }

ecaldqm::IntegrityTask::~IntegrityTask ( )

Definition at line 38 of file IntegrityTask.cc.

  {
  }


Member Function Documentation

void ecaldqm::IntegrityTask::analyze ( const void *  _p,
Collections  _collection 
) [inline, virtual]

Reimplemented from ecaldqm::DQWorkerTask.

Definition at line 44 of file IntegrityTask.h.

References ecaldqm::kBlockSizeErrors, ecaldqm::kChIdErrors, ecaldqm::kGainErrors, ecaldqm::kGainSwitchErrors, ecaldqm::kTowerIdErrors, and runOnErrors().

                                                                           {
    switch(_collection){
    case kGainErrors:
    case kChIdErrors:
    case kGainSwitchErrors:
      runOnErrors(*static_cast<const DetIdCollection*>(_p), _collection);
      break;
    case kTowerIdErrors:
    case kBlockSizeErrors:
      runOnErrors(*static_cast<const EcalElectronicsIdCollection*>(_p), _collection);
      break;
    default:
      break;
    }
  }
void ecaldqm::IntegrityTask::beginLuminosityBlock ( const edm::LuminosityBlock ,
const edm::EventSetup  
) [virtual]

Reimplemented from ecaldqm::DQWorker.

Definition at line 54 of file IntegrityTask.cc.

References kByLumi, and ecaldqm::DQWorker::MEs_.

  {
    if(MEs_[kByLumi]->isActive()) MEs_[kByLumi]->reset();
  }

void ecaldqm::IntegrityTask::bookMEs ( ) [virtual]

Reimplemented from ecaldqm::DQWorker.

Definition at line 43 of file IntegrityTask.cc.

References hltTaskMode_, kByLumi, kFEDNonFatal, and ecaldqm::DQWorker::MEs_.

  {
    if(hltTaskMode_ != 1){
      for(unsigned iME(kByLumi); iME < kFEDNonFatal; iME++)
        MEs_[iME]->book();
    }
    if(hltTaskMode_ != 0)
      MEs_[kFEDNonFatal]->book();
  }

void ecaldqm::IntegrityTask::runOnErrors ( const DetIdCollection _ids,
Collections  _collection 
)

Definition at line 60 of file IntegrityTask.cc.

References edm::EDCollection< T >::begin(), edm::EDCollection< T >::end(), lumiContext::fill, kByLumi, kChId, ecaldqm::kChIdErrors, kFEDNonFatal, kGain, ecaldqm::kGainErrors, kGainSwitch, ecaldqm::kGainSwitchErrors, kTotal, ecaldqm::DQWorker::MEs_, and nMESets.

Referenced by analyze().

  {
    MESets set(nMESets);
    switch(_collection){
    case kGainErrors:
      set = kGain;
      break;
    case kChIdErrors:
      set = kChId;
      break;
    case kGainSwitchErrors:
      set = kGainSwitch;
      break;
    default:
      return;
    }

    for(DetIdCollection::const_iterator idItr(_ids.begin()); idItr != _ids.end(); ++idItr){
      if(MEs_[set]->isActive()) MEs_[set]->fill(*idItr);
      if(MEs_[kFEDNonFatal]->isActive()) MEs_[kFEDNonFatal]->fill(*idItr);
      if(MEs_[kByLumi]->isActive()) MEs_[kByLumi]->fill(*idItr);
      if(MEs_[kTotal]->isActive()) MEs_[kTotal]->fill(*idItr);
    }
  }
  
void ecaldqm::IntegrityTask::runOnErrors ( const EcalElectronicsIdCollection _ids,
Collections  _collection 
)

Definition at line 86 of file IntegrityTask.cc.

References edm::EDCollection< T >::begin(), edm::EDCollection< T >::end(), lumiContext::fill, kBlockSize, ecaldqm::kBlockSizeErrors, kByLumi, kFEDNonFatal, kTotal, kTowerId, ecaldqm::kTowerIdErrors, ecaldqm::DQWorker::MEs_, and nMESets.

  {
    MESets set(nMESets);

    switch(_collection){
    case kTowerIdErrors:
      set = kTowerId;
      break;
    case kBlockSizeErrors:
      set = kBlockSize;
      break;
    default:
      return;
    }

    // 25 is not correct

    for(EcalElectronicsIdCollection::const_iterator idItr(_ids.begin()); idItr != _ids.end(); ++idItr){
      if(MEs_[set]->isActive()) MEs_[set]->fill(*idItr, 25.);
      if(MEs_[kFEDNonFatal]->isActive()) MEs_[kFEDNonFatal]->fill(*idItr, 25.);
      if(MEs_[kByLumi]->isActive()) MEs_[kByLumi]->fill(*idItr, 25.);
      if(MEs_[kTotal]->isActive()) MEs_[kTotal]->fill(*idItr, 25.);
    }
  }

void ecaldqm::IntegrityTask::setMEData ( std::vector< MEData > &  _data) [static]

Member Data Documentation

Definition at line 41 of file IntegrityTask.h.

Definition at line 40 of file IntegrityTask.h.

Referenced by bookMEs().