File indexing completed on 2024-04-06 12:07:07
0001 #ifndef DTDataIntegrityROSOffline_H
0002 #define DTDataIntegrityROSOffline_H
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 #include "EventFilter/DTRawToDigi/interface/DTROChainCoding.h"
0014
0015 #include "FWCore/Framework/interface/Frameworkfwd.h"
0016 #include "FWCore/Framework/interface/Event.h"
0017 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0018
0019 #include "DQMServices/Core/interface/DQMStore.h"
0020 #include "DQMServices/Core/interface/DQMEDAnalyzer.h"
0021
0022 #include "DataFormats/DTDigi/interface/DTControlData.h"
0023
0024 #include <fstream>
0025 #include <map>
0026 #include <string>
0027 #include <vector>
0028 #include <list>
0029
0030 class DTROS25Data;
0031 class DTDDUData;
0032
0033 class DTDataIntegrityROSOffline : public DQMEDAnalyzer {
0034 public:
0035 DTDataIntegrityROSOffline(const edm::ParameterSet& ps);
0036
0037 ~DTDataIntegrityROSOffline() override;
0038
0039 void processROS25(DTROS25Data& data, int dduID, int ros);
0040 void processFED(DTDDUData& dduData, const std::vector<DTROS25Data>& rosData, int dduID);
0041
0042
0043 void fedEntry(int dduID);
0044
0045 void fedFatal(int dduID);
0046
0047 void fedNonFatal(int dduID);
0048
0049 void analyze(const edm::Event& e, const edm::EventSetup& c) override;
0050
0051 protected:
0052 void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;
0053
0054 private:
0055 void bookHistos(DQMStore::IBooker&, const int fedMin, const int fedMax);
0056 void bookHistos(DQMStore::IBooker&, std::string folder, DTROChainCoding code);
0057 void bookHistosROS25(DQMStore::IBooker&, DTROChainCoding code);
0058
0059 void channelsInCEROS(int cerosId, int chMask, std::vector<int>& channels);
0060 void channelsInROS(int cerosMask, std::vector<int>& channels);
0061
0062 std::string topFolder(bool isFEDIntegrity) const;
0063
0064
0065 bool getSCInfo;
0066
0067 int nevents;
0068
0069
0070 MonitorElement* nEventMonitor;
0071
0072 std::map<std::string, std::map<int, MonitorElement*> > fedHistos;
0073
0074 std::map<std::string, std::map<int, MonitorElement*> > summaryHistos;
0075
0076 std::map<std::string, std::map<int, MonitorElement*> > rosHistos;
0077
0078
0079 MonitorElement* hFEDEntry;
0080 MonitorElement* hFEDFatal;
0081 MonitorElement* hFEDNonFatal;
0082 MonitorElement* hCorruptionSummary;
0083
0084
0085 MonitorElement* hTTSSummary;
0086
0087 int neventsFED;
0088 int neventsROS;
0089
0090
0091 const int nROS = 12;
0092
0093 int FEDIDmin;
0094 int FEDIDmax;
0095
0096
0097
0098 bool eventErrorFlag;
0099
0100 std::map<int, std::set<int> > rosBxIdsPerFED;
0101 std::set<int> fedBXIds;
0102 std::map<int, std::set<int> > rosL1AIdsPerFED;
0103
0104 std::string fedIntegrityFolder;
0105
0106
0107 edm::EDGetTokenT<DTDDUCollection> dduToken;
0108
0109 edm::EDGetTokenT<DTROS25Collection> ros25Token;
0110 };
0111
0112 #endif
0113
0114
0115
0116
0117