CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/DQM/HcalMonitorTasks/interface/HcalDataIntegrityTask.h

Go to the documentation of this file.
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: //Electronics map -> geographic channel map
00048   std::map<uint32_t, std::vector<HcalDetId> > DCCtoCell;
00049   std::map<uint32_t, std::vector<HcalDetId> > ::iterator thisDCC;
00050 
00051  private: 
00052   //backstage accounting mechanisms for the ProblemMap
00053   static size_t iphirange; // = IPHIMAX - IPHIMIN;
00054   static size_t ietarange; // = IETAMAX - IETAMIN;
00055   std::vector<std::vector<bool> > problemhere;  // Whole HCAL
00056   std::vector<std::vector<bool> > problemHB;    //  
00057   std::vector<std::vector<bool> > problemHE;    //  
00058   std::vector<std::vector<bool> > problemHF;    // Includes ZDC?
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;  // iphi/ieta projection of all hcal cells
00064   std::vector<std::vector<uint64_t> > HBmap;    // iphi/ieta projection of hb
00065   std::vector<std::vector<uint64_t> > HEmap;    // iphi/ieta projection of he
00066   std::vector<std::vector<uint64_t> > HFmap;    // iphi/ieta projection of hf
00067   std::vector<std::vector<uint64_t> > HOmap;    // iphi/ieta projection of ho
00068   void UpdateMap();
00069 
00070   // Data accessors
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   //   int dccnum_;
00078   //int cratenum_;
00079 
00080   int prtlvl_;
00081 
00082  private:  //Monitoring elements
00083 
00084   MonitorElement* fedEntries_;
00085   MonitorElement* fedFatal_;
00086   MonitorElement* fedNonFatal_;
00087 
00088   //Member variables for reference values to be used in consistency checks.
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   //static member variables 
00101   static float DIMbin[32];
00102   
00103   const HcalElectronicsMap*    readoutMap_;
00104   edm::InputTag inputLabelRawData_;
00105   edm::InputTag inputLabelReport_;
00106 
00107 };
00108 
00109 // For crate numbers:
00110 float HcalDataIntegrityTask::DIMbin[]={ 4, 4.5, // FED 700, 701
00111                        0, 0.5, // FED 702, 703
00112                        1, 1.5, // FED 704, 705
00113                        5, 5.5, // FED 706, 707
00114                        11, 11.5, // FED 708, 709
00115                        15, 15.5, // FED 710, 711
00116                        17, 17.5, // FED 712, 713
00117                        14, 14.5, // FED 714, 715
00118                        10, 10.5, // FED 716, 717
00119                        2, 2.5, // FED 718, 719
00120                        9, 9.5, // FED 720, 721
00121                        12, 12.5, // FED 722, 723
00122                        3, 3.5, // FED 724, 725
00123                        7, 7.5, // FED 726, 727
00124                        6, 6.5, // FED 728, 729
00125                        13, 13.5 // FED 730, 731
00126 };
00127 
00128 #endif