Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-06-30 04:13:36

0001 #ifndef SiStripMonitorClient_SiStripBadComponentInfo_h
0002 #define SiStripMonitorClient_SiStripBadComponentInfo_h
0003 // -*- C++ -*-
0004 //
0005 // Package:     SiStripMonitorClient
0006 // Class  :     SiStripBadComponentInfo
0007 //
0008 /**\class SiStripBadComponentInfo SiStripBadComponentInfo.h
0009  DQM/SiStripMonitorCluster/interface/SiStripBadComponentInfo.h
0010 
0011  Description:
0012       Checks the # of SiStrip FEDs from DAQ
0013  Usage:
0014     <usage>
0015 
0016 */
0017 //
0018 //          Author:  Suchandra Dutta
0019 //         Created:  Fri Jan 26 10:00:00 CET 2018
0020 //
0021 
0022 #include <string>
0023 
0024 #include "DQMServices/Core/interface/DQMEDHarvester.h"
0025 #include "FWCore/Framework/interface/EventSetup.h"
0026 #include "FWCore/Framework/interface/LuminosityBlock.h"
0027 #include "FWCore/Framework/interface/Run.h"
0028 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0029 #include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h"
0030 
0031 #include "CalibFormats/SiStripObjects/interface/SiStripQuality.h"
0032 #include "Geometry/Records/interface/TrackerTopologyRcd.h"
0033 #include "DQMServices/Core/interface/DQMStore.h"
0034 #include "CalibTracker/SiStripQuality/interface/SiStripQualityWithFromFedErrorsHelper.h"
0035 
0036 #include <fstream>
0037 #include <iostream>
0038 #include <map>
0039 #include <string>
0040 #include <vector>
0041 
0042 class SiStripBadComponentInfo : public DQMEDHarvester {
0043 public:
0044   /// Constructor
0045   SiStripBadComponentInfo(edm::ParameterSet const& ps);
0046   ~SiStripBadComponentInfo() override;
0047 
0048   static void fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
0049     edm::ParameterSetDescription desc;
0050     SiStripQualityWithFromFedErrorsHelper::fillDescription(desc);
0051     descriptions.add("siStripBadComponentInfo", desc);
0052   }
0053 
0054 protected:
0055   void endRun(edm::Run const&, edm::EventSetup const&) override;
0056   void dqmEndJob(DQMStore::IBooker&,
0057                  DQMStore::IGetter&) override;  // performed in the endJob
0058 
0059 private:
0060   void checkBadComponents(edm::EventSetup const& eSetup);
0061   void bookBadComponentHistos(DQMStore::IBooker& ibooker, DQMStore::IGetter& igetter);
0062   void fillBadComponentMaps(const SiStripQuality* siStripQuality);
0063   void fillBadComponentMaps(int xbin, int component, SiStripQuality::BadComponent const& BC);
0064   void createSummary(MonitorElement* me, const std::map<std::pair<int, int>, float>& map);
0065 
0066   MonitorElement* badAPVME_;
0067   MonitorElement* badFiberME_;
0068   MonitorElement* badStripME_;
0069 
0070   std::map<std::pair<int, int>, float> mapBadAPV;
0071   std::map<std::pair<int, int>, float> mapBadFiber;
0072   std::map<std::pair<int, int>, float> mapBadStrip;
0073 
0074   bool bookedStatus_;
0075   int nSubSystem_;
0076 
0077   edm::ESGetToken<TrackerTopology, TrackerTopologyRcd> tTopoToken_;
0078   std::unique_ptr<TrackerTopology> tTopo_;
0079   SiStripQualityWithFromFedErrorsHelper withFedErrHelper_;
0080 };
0081 #endif