CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DTDataIntegrityTask.h
Go to the documentation of this file.
1 #ifndef DTDataIntegrityTask_H
2 #define DTDataIntegrityTask_H
3 
14 
20 
22 
24 
25 // #include "FWCore/ServiceRegistry/interface/ActivityRegistry.h"
27 
28 #include <fstream>
29 #include <map>
30 #include <string>
31 #include <vector>
32 #include <list>
33 
34 class DTROS25Data;
35 class DTDDUData;
37 
38 
40 
41 public:
42 
44 
45  virtual ~DTDataIntegrityTask();
46 
47  void TimeHistos(std::string histoType);
48 
49  void processROS25(DTROS25Data & data, int dduID, int ros);
50  void processFED(DTDDUData & dduData, const std::vector<DTROS25Data> & rosData, int dduID);
51 
52  // log number of times the payload of each fed is unpacked
53  void fedEntry(int dduID);
54  // log number of times the payload of each fed is skipped (no ROS inside)
55  void fedFatal(int dduID);
56  // log number of times the payload of each fed is partially skipped (some ROS skipped)
57  void fedNonFatal(int dduID);
58 
59  bool eventHasErrors() const;
60  void beginJob() override;
61  void endJob() override;
62 
63  void beginLuminosityBlock(const edm::LuminosityBlock& ls, const edm::EventSetup& es) override;
64  void endLuminosityBlock(const edm::LuminosityBlock& ls, const edm::EventSetup& es) override;
65 
66  void analyze(const edm::Event& e, const edm::EventSetup& c) override;
67 
68 private:
69 
70  void bookHistos(const int fedMin, const int fedMax);
71  void bookHistos(std::string folder, DTROChainCoding code);
73 
74  void channelsInCEROS(int cerosId, int chMask, std::vector<int>& channels);
75  void channelsInROS(int cerosMask, std::vector<int>& channels);
76 
77  std::string topFolder(bool isFEDIntegrity) const;
78 
79  std::multimap<std::string, std::string> names;
80  std::multimap<std::string, std::string>::iterator it;
81 
83 
84  //If you want info VS time histos
86  // Plot quantities about SC
87  bool getSCInfo;
88 
89  int nevents;
90 
91  // back-end interface
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  //Event counter for the graphs VS time
129  int myPrevEv;
130 
131  //Monitor TTS,ROS,FIFO VS time
135 
136  // event error flag: true when errors are detected
137  // can be used for the selection of the debug stream
139 
140  std::map<int, std::set<int> > rosBxIdsPerFED;
141  std::set<int> fedBXIds;
142  std::map<int, std::set<int> > rosL1AIdsPerFED;
143 
144  // flag to toggle the creation of only the summaries (for HLT running)
145  int mode;
147 
148  // The label to retrieve the digis
150 
152 
153 };
154 
155 
156 #endif
157 
158 
159 /* Local Variables: */
160 /* show-trailing-whitespace: t */
161 /* truncate-lines: t */
162 /* 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
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 bookHistosROS25(DTROChainCoding code)
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
void TimeHistos(std::string histoType)
MonitorElement * nEventMonitor
std::string topFolder(bool isFEDIntegrity) const
MonitorElement * hFEDEntry
std::map< std::string, std::map< int, MonitorElement * > > rosHistos
void bookHistos(const int fedMin, const int fedMax)
edm::ParameterSet parameters
void channelsInCEROS(int cerosId, int chMask, std::vector< int > &channels)
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
MonitorElement * hTTSSummary
std::map< std::string, std::map< int, DTTimeEvolutionHisto * > > rosTimeHistos
std::set< int > fedBXIds
MonitorElement * hCorruptionSummary
edm::EDGetTokenT< DTDDUCollection > dduToken