CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10_patch1/src/DQM/EcalBarrelMonitorTasks/interface/RawDataTask.h

Go to the documentation of this file.
00001 #ifndef RawDataTask_H
00002 #define RawDataTask_H
00003 
00004 #include "DQM/EcalCommon/interface/DQWorkerTask.h"
00005 
00006 #include "DataFormats/FEDRawData/interface/FEDRawDataCollection.h"
00007 #include "DataFormats/EcalRawData/interface/EcalRawDataCollections.h"
00008 
00009 namespace ecaldqm {
00010 
00011   class RawDataTask : public DQWorkerTask {
00012   public:
00013     RawDataTask(const edm::ParameterSet &, const edm::ParameterSet &);
00014     ~RawDataTask();
00015 
00016     void bookMEs();
00017 
00018     void beginLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &);
00019     void beginEvent(const edm::Event &, const edm::EventSetup &);
00020 
00021     void analyze(const void*, Collections);
00022 
00023     void runOnSource(const FEDRawDataCollection &, Collections);
00024     void runOnRawData(const EcalRawDataCollection &, Collections);
00025 
00026     enum MESets {
00027       kEventTypePreCalib, // h1f
00028       kEventTypeCalib, // h1f
00029       kEventTypePostCalib, // h1f
00030       kCRC, // h1f
00031       kRunNumber, // h1f
00032       kOrbit, // h1f
00033       kTriggerType, // h1f
00034       kL1ADCC, // h1f
00035       kL1AFE, // h1f
00036       //      kL1AFEMap, // h2f
00037       kL1ATCC, // h1f
00038       kL1ASRP, // h1f
00039       kBXDCC, // h1f
00040       kBXFE, // h1f
00041       kBXTCC, // h1f
00042       kBXSRP, // h1f
00043       kDesyncByLumi, // h1f
00044       kDesyncTotal, // h1f
00045       kFEStatus, // h1f
00046       kFEByLumi, // h1f
00047       kFEDEntries,
00048       kFEDFatal,
00049       nMESets
00050     };
00051 
00052     enum Constants {
00053       nEventTypes = 25
00054     };
00055 
00056     static void setMEData(std::vector<MEData>&);
00057 
00058   private:
00059     int hltTaskMode_; // 0 -> Do not produce FED plots; 1 -> Only produce FED plots; 2 -> Do both
00060     std::string hltTaskFolder_;
00061     int run_;
00062     int l1A_;
00063     int orbit_;
00064     int bx_;
00065     short triggerType_;
00066     int feL1Offset_;
00067 
00068   };
00069 
00070   inline void RawDataTask::analyze(const void* _p, Collections _collection){
00071     switch(_collection){
00072     case kSource:
00073       runOnSource(*static_cast<const FEDRawDataCollection*>(_p), _collection);
00074       break;
00075     case kEcalRawData:
00076       runOnRawData(*static_cast<const EcalRawDataCollection*>(_p), _collection);
00077       break;
00078     default:
00079       break;
00080     }
00081   }
00082 
00083 }
00084 
00085 #endif
00086