CMS 3D CMS Logo

Public Types | Public Member Functions | Static Public Member Functions

ecaldqm::PresampleTask Class Reference

#include <PresampleTask.h>

Inheritance diagram for ecaldqm::PresampleTask:
ecaldqm::DQWorkerTask ecaldqm::DQWorker

List of all members.

Public Types

enum  MESets { kPedestal, nMESets }

Public Member Functions

void analyze (const void *, Collections)
bool filterRunType (const std::vector< short > &)
 PresampleTask (const edm::ParameterSet &, const edm::ParameterSet &)
void runOnDigis (const EcalDigiCollection &)
 ~PresampleTask ()

Static Public Member Functions

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

Detailed Description

Definition at line 10 of file PresampleTask.h.


Member Enumeration Documentation

Enumerator:
kPedestal 
nMESets 

Reimplemented from ecaldqm::DQWorker.

Definition at line 21 of file PresampleTask.h.

                {
      kPedestal, // profile2d
      nMESets
    };

Constructor & Destructor Documentation

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

Definition at line 9 of file PresampleTask.cc.

References ecaldqm::kEBDigi, and ecaldqm::kEEDigi.

  {
    collectionMask_ =
      (0x1 << kEBDigi) |
      (0x1 << kEEDigi);
  }

ecaldqm::PresampleTask::~PresampleTask ( )

Definition at line 17 of file PresampleTask.cc.

  {
  }


Member Function Documentation

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

Reimplemented from ecaldqm::DQWorkerTask.

Definition at line 29 of file PresampleTask.h.

References ecaldqm::kEBDigi, ecaldqm::kEEDigi, and runOnDigis().

                                                                           {
    switch(_collection){
    case kEBDigi:
    case kEEDigi:
      runOnDigis(*static_cast<const EcalDigiCollection*>(_p));
      break;
    default:
      break;
    }
  }
bool ecaldqm::PresampleTask::filterRunType ( const std::vector< short > &  _runType) [virtual]

Reimplemented from ecaldqm::DQWorkerTask.

Definition at line 22 of file PresampleTask.cc.

References EcalDCCHeaderBlock::COSMIC, EcalDCCHeaderBlock::COSMICS_GLOBAL, EcalDCCHeaderBlock::COSMICS_LOCAL, EcalDCCHeaderBlock::MTCC, EcalDCCHeaderBlock::PHYSICS_GLOBAL, and EcalDCCHeaderBlock::PHYSICS_LOCAL.

  {
    for(int iFED(0); iFED < 54; iFED++){
      if ( _runType[iFED] == EcalDCCHeaderBlock::COSMIC ||
           _runType[iFED] == EcalDCCHeaderBlock::MTCC ||
           _runType[iFED] == EcalDCCHeaderBlock::COSMICS_GLOBAL ||
           _runType[iFED] == EcalDCCHeaderBlock::PHYSICS_GLOBAL ||
           _runType[iFED] == EcalDCCHeaderBlock::COSMICS_LOCAL ||
           _runType[iFED] == EcalDCCHeaderBlock::PHYSICS_LOCAL ) return true;
    }

    return false;
  }

void ecaldqm::PresampleTask::runOnDigis ( const EcalDigiCollection _digis)

Definition at line 37 of file PresampleTask.cc.

References edm::DataFrameContainer::begin(), edm::DataFrameContainer::end(), errorMatrix2Lands_multiChannel::id, kPedestal, timingPdfMaker::mean, and ecaldqm::DQWorker::MEs_.

Referenced by analyze().

  {
    for(EcalDigiCollection::const_iterator digiItr(_digis.begin()); digiItr != _digis.end(); ++digiItr){
      DetId id(digiItr->id());

      // EcalDataFrame is not a derived class of edm::DataFrame, but can take edm::DataFrame in the constructor
      EcalDataFrame dataFrame(*digiItr);

      float mean(0.);
      bool gainSwitch(false);

      for(int iSample(0); iSample < 3; iSample++){
        if(dataFrame.sample(iSample).gainId() != 1){
          gainSwitch = true;
          break;
        }

        mean += dataFrame.sample(iSample).adc();
      }
      if(gainSwitch) continue;

      mean /= 3.;

      MEs_[kPedestal]->fill(id, mean);
    }
  }

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