00001 #ifndef DQM_HCALMONITORTASKS_HCALDATAINTEGRITYTASK_H
00002 #define DQM_HCALMONITORTASKS_HCALDATAINTEGRITYTASK_H
00003
00004 #define IETAMIN -43
00005 #define IETAMAX 43
00006 #define IPHIMIN 0
00007 #define IPHIMAX 71
00008 #define HBHE_LO_DCC 700
00009 #define HBHE_HI_DCC 717
00010 #define HF_LO_DCC 718
00011 #define HF_HI_DCC 724
00012 #define HO_LO_DCC 725
00013 #define HO_HI_DCC 731
00014
00015 #include "DQM/HcalMonitorTasks/interface/HcalBaseDQMonitor.h"
00016 #include "EventFilter/HcalRawToDigi/interface/HcalUnpacker.h"
00017 #include "DataFormats/FEDRawData/interface/FEDRawDataCollection.h"
00018 #include "CalibFormats/HcalObjects/interface/HcalDbRecord.h"
00019 #include "CalibFormats/HcalObjects/interface/HcalDbService.h"
00020
00021 #include <map>
00022
00031 class HcalDataIntegrityTask: public HcalBaseDQMonitor
00032 {
00033 public:
00034 HcalDataIntegrityTask(const edm::ParameterSet& ps);
00035 ~HcalDataIntegrityTask();
00036
00037 void setup();
00038 void processEvent(const FEDRawDataCollection& rawraw, const
00039 HcalUnpackerReport& report, const HcalElectronicsMap& emap);
00040 void unpack(const FEDRawData& raw, const HcalElectronicsMap& emap);
00041 void cleanup();
00042 void reset();
00043
00044 void beginRun(const edm::Run& run, const edm::EventSetup& c);
00045 void analyze(const edm::Event&, const edm::EventSetup&);
00046
00047 public:
00048 std::map<uint32_t, std::vector<HcalDetId> > DCCtoCell;
00049 std::map<uint32_t, std::vector<HcalDetId> > ::iterator thisDCC;
00050
00051 private:
00052
00053 static size_t iphirange;
00054 static size_t ietarange;
00055 std::vector<std::vector<bool> > problemhere;
00056 std::vector<std::vector<bool> > problemHB;
00057 std::vector<std::vector<bool> > problemHE;
00058 std::vector<std::vector<bool> > problemHF;
00059 std::vector<std::vector<bool> > problemHO;
00060 void mapHTRproblem (int dcc, int spigot) ;
00061 void mapDCCproblem(int dcc) ;
00062 void fillzoos(int bin, int dccid);
00063 std::vector<std::vector<uint64_t> > phatmap;
00064 std::vector<std::vector<uint64_t> > HBmap;
00065 std::vector<std::vector<uint64_t> > HEmap;
00066 std::vector<std::vector<uint64_t> > HFmap;
00067 std::vector<std::vector<uint64_t> > HOmap;
00068 void UpdateMap();
00069
00070
00071 std::vector<int> fedUnpackList_;
00072 std::vector<int> dccCrate_;
00073 std::vector<HcalSubdetector> dccSubdet_;
00074 int firstFED_;
00075 int lastEvtN_;
00076 int lastBCN_;
00077
00078
00079
00080 int prtlvl_;
00081
00082 private:
00083
00084 MonitorElement* fedEntries_;
00085 MonitorElement* fedFatal_;
00086 MonitorElement* fedNonFatal_;
00087
00088
00089 std::map<int, short> CDFversionNumber_list;
00090 std::map<int, short>::iterator CDFvers_it;
00091 std::map<int, short> CDFEventType_list;
00092 std::map<int, short>::iterator CDFEvT_it;
00093 std::map<int, short> CDFReservedBits_list;
00094 std::map<int, short>::iterator CDFReservedBits_it;
00095 std::map<int, short> DCCEvtFormat_list;
00096 std::map<int, short>::iterator DCCEvtFormat_it;
00097 std::map<int, short> DCCRsvdBits_list;
00098 std::map<int, short>::iterator DCCRsvdBits_it;
00099
00100
00101 static float DIMbin[32];
00102
00103 const HcalElectronicsMap* readoutMap_;
00104 edm::InputTag inputLabelRawData_;
00105 edm::InputTag inputLabelReport_;
00106
00107 };
00108
00109
00110 float HcalDataIntegrityTask::DIMbin[]={ 4, 4.5,
00111 0, 0.5,
00112 1, 1.5,
00113 5, 5.5,
00114 11, 11.5,
00115 15, 15.5,
00116 17, 17.5,
00117 14, 14.5,
00118 10, 10.5,
00119 2, 2.5,
00120 9, 9.5,
00121 12, 12.5,
00122 3, 3.5,
00123 7, 7.5,
00124 6, 6.5,
00125 13, 13.5
00126 };
00127
00128 #endif