1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
|
#ifndef DTDataIntegrityROSOffline_H
#define DTDataIntegrityROSOffline_H
/** \class DTDataIntegrityROSOffline
*
* Class for DT Data Integrity.
*
*
* \author Marco Zanetti (INFN Padova), Gianluca Cerminara (INFN Torino)
*
*/
#include "EventFilter/DTRawToDigi/interface/DTROChainCoding.h"
#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "DQMServices/Core/interface/DQMStore.h"
#include "DQMServices/Core/interface/DQMEDAnalyzer.h"
#include "DataFormats/DTDigi/interface/DTControlData.h"
#include <fstream>
#include <map>
#include <string>
#include <vector>
#include <list>
class DTROS25Data;
class DTDDUData;
class DTDataIntegrityROSOffline : public DQMEDAnalyzer {
public:
DTDataIntegrityROSOffline(const edm::ParameterSet& ps);
~DTDataIntegrityROSOffline() override;
void processROS25(DTROS25Data& data, int dduID, int ros);
void processFED(DTDDUData& dduData, const std::vector<DTROS25Data>& rosData, int dduID);
// log number of times the payload of each fed is unpacked
void fedEntry(int dduID);
// log number of times the payload of each fed is skipped (no ROS inside)
void fedFatal(int dduID);
// log number of times the payload of each fed is partially skipped (some ROS skipped)
void fedNonFatal(int dduID);
void analyze(const edm::Event& e, const edm::EventSetup& c) override;
protected:
void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;
private:
void bookHistos(DQMStore::IBooker&, const int fedMin, const int fedMax);
void bookHistos(DQMStore::IBooker&, std::string folder, DTROChainCoding code);
void bookHistosROS25(DQMStore::IBooker&, DTROChainCoding code);
void channelsInCEROS(int cerosId, int chMask, std::vector<int>& channels);
void channelsInROS(int cerosMask, std::vector<int>& channels);
std::string topFolder(bool isFEDIntegrity) const;
// Plot quantities about SC
bool getSCInfo;
int nevents;
// Monitor Elements
MonitorElement* nEventMonitor;
// <histoType, <index , histo> >
std::map<std::string, std::map<int, MonitorElement*> > fedHistos;
// <histoType, histo> >
std::map<std::string, std::map<int, MonitorElement*> > summaryHistos;
// <histoType, <index , histo> >
std::map<std::string, std::map<int, MonitorElement*> > rosHistos;
// standard ME for monitoring of FED integrity
MonitorElement* hFEDEntry;
MonitorElement* hFEDFatal;
MonitorElement* hFEDNonFatal;
MonitorElement* hCorruptionSummary;
// one for all FEDS
MonitorElement* hTTSSummary;
int neventsFED;
int neventsROS;
// Number of ROS per FED
const int nROS = 12;
int FEDIDmin;
int FEDIDmax;
// event error flag: true when errors are detected
// can be used for the selection of the debug stream
bool eventErrorFlag;
std::map<int, std::set<int> > rosBxIdsPerFED;
std::set<int> fedBXIds;
std::map<int, std::set<int> > rosL1AIdsPerFED;
std::string fedIntegrityFolder;
// The label to retrieve the digis
edm::EDGetTokenT<DTDDUCollection> dduToken;
edm::EDGetTokenT<DTROS25Collection> ros25Token;
};
#endif
/* Local Variables: */
/* show-trailing-whitespace: t */
/* truncate-lines: t */
/* End: */
|