CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_2_SLHC2_patch1/src/DQM/EcalBarrelMonitorTasks/src/PNIntegrityTask.cc

Go to the documentation of this file.
00001 #include "../interface/PNIntegrityTask.h"
00002 
00003 #include "FWCore/Utilities/interface/Exception.h"
00004 
00005 namespace ecaldqm {
00006 
00007   PNIntegrityTask::PNIntegrityTask(const edm::ParameterSet &_params, const edm::ParameterSet& _paths) :
00008     DQWorkerTask(_params, _paths, "PNIntegrityTask")
00009   {
00010     collectionMask_ = 
00011       (0x1 << kMEMTowerIdErrors) |
00012       (0x1 << kMEMBlockSizeErrors) |
00013       (0x1 << kMEMChIdErrors) |
00014       (0x1 << kMEMGainErrors);
00015   }
00016 
00017   PNIntegrityTask::~PNIntegrityTask()
00018   {
00019   }
00020 
00021   void
00022   PNIntegrityTask::runOnErrors(const EcalElectronicsIdCollection &_ids, Collections _collection)
00023   {
00024     MESets set(nMESets);
00025 
00026     switch(_collection){
00027     case kMEMTowerIdErrors:
00028       set = kMEMTowerId;
00029       break;
00030     case kMEMBlockSizeErrors:
00031       set = kMEMBlockSize;
00032       break;
00033     case kMEMChIdErrors:
00034       set = kMEMChId;
00035       break;
00036     case kMEMGainErrors:
00037       set = kMEMGain;
00038       break;
00039     default:
00040       return;
00041     }
00042 
00043     for(EcalElectronicsIdCollection::const_iterator idItr(_ids.begin()); idItr != _ids.end(); ++idItr){
00044       if(MEs_[set]) MEs_[set]->fill(*idItr);
00045     }
00046   }
00047 
00048   /*static*/
00049   void
00050   PNIntegrityTask::setMEData(std::vector<MEData>& _data)
00051   {
00052     _data[kMEMChId] = MEData("MEMChId", BinService::kChannel, BinService::kCrystal, MonitorElement::DQM_KIND_TH1F);
00053     _data[kMEMGain] = MEData("MEMGain", BinService::kChannel, BinService::kCrystal, MonitorElement::DQM_KIND_TH1F);
00054     _data[kMEMBlockSize] = MEData("MEMBlockSize", BinService::kChannel, BinService::kCrystal, MonitorElement::DQM_KIND_TH1F);
00055     _data[kMEMTowerId] = MEData("MEMTowerId", BinService::kChannel, BinService::kCrystal, MonitorElement::DQM_KIND_TH1F);
00056   }
00057 
00058   DEFINE_ECALDQM_WORKER(PNIntegrityTask);
00059 }
00060 
00061