File indexing completed on 2024-04-06 12:08:41
0001 #ifndef SiStripMonitorClient_SiStripBadComponentInfo_h
0002 #define SiStripMonitorClient_SiStripBadComponentInfo_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
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
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;
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