Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:07:45

0001 #ifndef DQM_L1TMonitor_L1TMP7ZeroSupp_h
0002 #define DQM_L1TMonitor_L1TMP7ZeroSupp_h
0003 
0004 #include "DataFormats/FEDRawData/interface/FEDHeader.h"
0005 //#include "DataFormats/FEDRawData/interface/FEDNumbering.h"
0006 #include "DataFormats/FEDRawData/interface/FEDRawDataCollection.h"
0007 #include "DataFormats/FEDRawData/interface/FEDTrailer.h"
0008 
0009 #include "EventFilter/L1TRawToDigi/interface/AMC13Spec.h"
0010 #include "EventFilter/L1TRawToDigi/interface/Block.h"
0011 
0012 #include "DQMServices/Core/interface/DQMEDAnalyzer.h"
0013 #include "DQMServices/Core/interface/DQMStore.h"
0014 
0015 #include "FWCore/Framework/interface/Event.h"
0016 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0017 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0018 #include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h"
0019 #include "FWCore/ParameterSet/interface/ParameterSetDescription.h"
0020 
0021 class L1TMP7ZeroSupp : public DQMEDAnalyzer {
0022 public:
0023   L1TMP7ZeroSupp(const edm::ParameterSet& ps);
0024   ~L1TMP7ZeroSupp() override;
0025   static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
0026 
0027 protected:
0028   void bookHistograms(DQMStore::IBooker&, const edm::Run&, const edm::EventSetup&) override;
0029   void analyze(const edm::Event& e, const edm::EventSetup& c) override;
0030 
0031 private:
0032   void bookCapIdHistograms(DQMStore::IBooker& ibooker, const unsigned int& id);
0033 
0034   // Add additional bins only before NBINLABELS
0035   enum binlabels {
0036     EVTS = 0,
0037     EVTSGOOD,
0038     EVTSBAD,
0039     BLOCKS,
0040     ZSBLKSGOOD,
0041     ZSBLKSBAD,
0042     ZSBLKSBADFALSEPOS,
0043     ZSBLKSBADFALSENEG,
0044     BXBLOCKS,
0045     ZSBXBLKSGOOD,
0046     ZSBXBLKSBAD,
0047     ZSBXBLKSBADFALSEPOS,
0048     ZSBXBLKSBADFALSENEG,
0049     NBINLABELS
0050   };
0051   enum ratioBinlabels {
0052     REVTS = 0,
0053     RBLKS,
0054     RBLKSFALSEPOS,
0055     RBLKSFALSENEG,
0056     RBXBLKS,
0057     RBXBLKSFALSEPOS,
0058     RBXBLKSFALSENEG,
0059     RNBINLABELS
0060   };
0061 
0062   edm::EDGetTokenT<FEDRawDataCollection> fedDataToken_;
0063   bool zsEnabled_;
0064   std::vector<int> fedIds_;
0065   std::vector<std::vector<int>> masks_;
0066 
0067   // header and trailer sizes in chars
0068   int slinkHeaderSize_;
0069   int slinkTrailerSize_;
0070   int amc13HeaderSize_;
0071   int amc13TrailerSize_;
0072   int amcHeaderSize_;
0073   int amcTrailerSize_;
0074   int newZsFlagMask_;
0075   int zsFlagMask_;
0076   int dataInvFlagMask_;
0077 
0078   int maxFedReadoutSize_;
0079 
0080   bool checkOnlyCapIdsWithMasks_;
0081 
0082   std::string monitorDir_;
0083   bool verbose_;
0084 
0085   static const unsigned int maxMasks_;
0086 
0087   std::vector<unsigned int> definedMaskCapIds_;
0088 
0089   std::map<unsigned int, MonitorElement*> zeroSuppValMap_;
0090   std::map<unsigned int, MonitorElement*> errorSummaryNumMap_;
0091   std::map<unsigned int, MonitorElement*> errorSummaryDenMap_;
0092   std::map<unsigned int, MonitorElement*> readoutSizeNoZSMap_;
0093   std::map<unsigned int, MonitorElement*> readoutSizeZSMap_;
0094   std::map<unsigned int, MonitorElement*> readoutSizeZSExpectedMap_;
0095   MonitorElement* capIds_;
0096 };
0097 
0098 #endif