CMS 3D CMS Logo

DTDataIntegrityTask.h
Go to the documentation of this file.
1 #ifndef DTDataIntegrityTask_H
2 #define DTDataIntegrityTask_H
3 
14 
19 
23 
25 
27 
29 
30 #include <fstream>
31 #include <map>
32 #include <string>
33 #include <vector>
34 #include <list>
35 
36 class DTROS25Data;
37 class DTDDUData;
39 
41 
42 public:
43 
45 
46  virtual ~DTDataIntegrityTask();
47 
48  void TimeHistos(DQMStore::IBooker &, std::string histoType);
49 
50  void processROS25(DTROS25Data & data, int dduID, int ros);
51  void processFED(DTDDUData & dduData, const std::vector<DTROS25Data> & rosData, int dduID);
52 
53  // log number of times the payload of each fed is unpacked
54  void fedEntry(int dduID);
55  // log number of times the payload of each fed is skipped (no ROS inside)
56  void fedFatal(int dduID);
57  // log number of times the payload of each fed is partially skipped (some ROS skipped)
58  void fedNonFatal(int dduID);
59 
60  bool eventHasErrors() const;
61 
62  void beginLuminosityBlock(const edm::LuminosityBlock& ls, const edm::EventSetup& es) override;
63  void endLuminosityBlock(const edm::LuminosityBlock& ls, const edm::EventSetup& es) override;
64 
65  void analyze(const edm::Event& e, const edm::EventSetup& c) override;
66 
67 protected:
68 
69  void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
70 
71 private:
72 
73  void bookHistos(DQMStore::IBooker &, const int fedMin, const int fedMax);
76 
77  void channelsInCEROS(int cerosId, int chMask, std::vector<int>& channels);
78  void channelsInROS(int cerosMask, std::vector<int>& channels);
79 
80  std::string topFolder(bool isFEDIntegrity) const;
81 
82  std::multimap<std::string, std::string> names;
83  std::multimap<std::string, std::string>::iterator it;
84 
86 
87  //If you want info VS time histos
89  // Plot quantities about SC
90  bool getSCInfo;
91 
92  int nevents;
93 
95 
96  // Monitor Elements
98  // <histoType, <index , histo> >
99  std::map<std::string, std::map<int, MonitorElement*> > dduHistos;
100  // <histoType, histo> >
101  std::map<std::string, std::map<int, MonitorElement*> > rosSHistos;
102  // <histoType, <index , histo> >
103  std::map<std::string, std::map<int, MonitorElement*> > rosHistos;
104  // <histoType, <tdcID, histo> >
105  std::map<std::string, std::map<int, MonitorElement*> > robHistos;
106 
107  // standard ME for monitoring of FED integrity
112 
113  // one for all FEDS
115 
116  //time histos for DDU/ROS
117  std::map<std::string, std::map<int, DTTimeEvolutionHisto*> > dduTimeHistos;
118  std::map<std::string, std::map<int, DTTimeEvolutionHisto*> > rosTimeHistos;
119 
121 
126  double rob_max[25];
127 
128  int FEDIDmin;
129  int FEDIDMax;
130 
131 
132  //Event counter for the graphs VS time
133  int myPrevEv;
134 
135  //Monitor TTS,ROS,FIFO VS time
139 
140  // event error flag: true when errors are detected
141  // can be used for the selection of the debug stream
143 
144  std::map<int, std::set<int> > rosBxIdsPerFED;
145  std::set<int> fedBXIds;
146  std::map<int, std::set<int> > rosL1AIdsPerFED;
147 
148  // flag to toggle the creation of only the summaries (for HLT running)
149  int mode;
151 
152  // The label to retrieve the digis
154 
156 
157 };
158 
159 
160 #endif
161 
162 
163 /* Local Variables: */
164 /* show-trailing-whitespace: t */
165 /* truncate-lines: t */
166 /* End: */
std::map< int, std::set< int > > rosBxIdsPerFED
std::multimap< std::string, std::string > names
std::map< int, std::set< int > > rosL1AIdsPerFED
std::map< std::string, std::map< int, MonitorElement * > > dduHistos
std::multimap< std::string, std::string >::iterator it
void processFED(DTDDUData &dduData, const std::vector< DTROS25Data > &rosData, int dduID)
MonitorElement * hFEDNonFatal
void bookHistos(DQMStore::IBooker &, const int fedMin, const int fedMax)
void TimeHistos(DQMStore::IBooker &, std::string histoType)
std::map< std::string, std::map< int, DTTimeEvolutionHisto * > > dduTimeHistos
void channelsInROS(int cerosMask, std::vector< int > &channels)
MonitorElement * hFEDFatal
DTROChainCoding coding
edm::EDGetTokenT< DTROS25Collection > ros25Token
DTDataIntegrityTask(const edm::ParameterSet &ps)
void processROS25(DTROS25Data &data, int dduID, int ros)
void beginLuminosityBlock(const edm::LuminosityBlock &ls, const edm::EventSetup &es) override
void analyze(const edm::Event &e, const edm::EventSetup &c) override
void endLuminosityBlock(const edm::LuminosityBlock &ls, const edm::EventSetup &es) override
std::map< std::string, std::map< int, MonitorElement * > > rosSHistos
std::map< std::string, std::map< int, MonitorElement * > > robHistos
MonitorElement * nEventMonitor
def ls(path, rec=False)
Definition: eostools.py:348
std::string topFolder(bool isFEDIntegrity) const
MonitorElement * hFEDEntry
std::map< std::string, std::map< int, MonitorElement * > > rosHistos
edm::ParameterSet parameters
void channelsInCEROS(int cerosId, int chMask, std::vector< int > &channels)
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
void bookHistosROS25(DQMStore::IBooker &, DTROChainCoding code)
MonitorElement * hTTSSummary
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
std::map< std::string, std::map< int, DTTimeEvolutionHisto * > > rosTimeHistos
std::set< int > fedBXIds
MonitorElement * hCorruptionSummary
edm::EDGetTokenT< DTDDUCollection > dduToken
Definition: Run.h:42