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 
17 
22 
24 
27 
28 #include <fstream>
29 #include <map>
30 #include <string>
31 #include <vector>
32 #include <list>
33 
34 class DTROS25Data;
35 class DTDDUData;
36 
37 
39 
40 public:
41 
43 
44  virtual ~DTDataIntegrityTask();
45 
46  void TimeHistos(std::string histoType);
47 
48  void processROS25(DTROS25Data & data, int dduID, int ros);
49  void processFED(DTDDUData & dduData, const std::vector<DTROS25Data> & rosData, int dduID);
50 
51  // log number of times the payload of each fed is unpacked
52  void fedEntry(int dduID);
53  // log number of times the payload of each fed is skipped (no ROS inside)
54  void fedFatal(int dduID);
55  // log number of times the payload of each fed is partially skipped (some ROS skipped)
56  void fedNonFatal(int dduID);
57 
58  bool eventHasErrors() const;
59  void postBeginJob();
60  void postEndJob();
61  void preProcessEvent(const edm::EventID& iEvtid, const edm::Timestamp& iTime);
62 
63 private:
64 
65  void bookHistos(const int fedMin, const int fedMax);
66  void bookHistos(std::string folder, DTROChainCoding code);
68 
69  void channelsInCEROS(int cerosId, int chMask, std::vector<int>& channels);
70  void channelsInROS(int cerosMask, std::vector<int>& channels);
71 
72  std::string topFolder(bool isFEDIntegrity) const;
73 
74  std::multimap<std::string, std::string> names;
75  std::multimap<std::string, std::string>::iterator it;
76 
78 
79  //If you want info VS time histos
81  // Plot quantities about SC
82  bool getSCInfo;
83 
84  // back-end interface
86 
88 
89  // Monitor Elements
90  // <histoType, <index , histo> >
91  std::map<std::string, std::map<int, MonitorElement*> > dduHistos;
92  // <histoType, histo> >
93  std::map<std::string, std::map<int, MonitorElement*> > rosSHistos;
94  // <histoType, <index , histo> >
95  std::map<std::string, std::map<int, MonitorElement*> > rosHistos;
96  // <histoType, <tdcID, histo> >
97  std::map<std::string, std::map<int, MonitorElement*> > robHistos;
98 
99  // standard ME for monitoring of FED integrity
104 
105  // one for all FEDS
107 
111  std::string outputFile;
112  double rob_max[25];
113 
114  //Event counter for the graphs VS time
115  int myPrevEv;
116 
117  //Monitor TTS,ROS,FIFO VS time
121 
122  // event error flag: true when errors are detected
123  // can be used for the selection of the debug stream
125 
126  std::map<int, std::set<int> > rosBxIdsPerFED;
127  std::set<int> fedBXIds;
128  std::map<int, std::set<int> > rosL1AIdsPerFED;
129 
130  // flag to toggle the creation of only the summaries (for HLT running)
131  int mode;
132  std::string fedIntegrityFolder;
133 
134 };
135 
136 
137 #endif
138 
std::map< int, std::set< int > > rosBxIdsPerFED
std::multimap< std::string, std::string > names
std::map< int, std::set< int > > rosL1AIdsPerFED
void preProcessEvent(const edm::EventID &iEvtid, const edm::Timestamp &iTime)
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 channelsInROS(int cerosMask, std::vector< int > &channels)
MonitorElement * hFEDFatal
DTROChainCoding coding
void processROS25(DTROS25Data &data, int dduID, int ros)
void bookHistosROS25(DTROChainCoding code)
std::map< std::string, std::map< int, MonitorElement * > > rosSHistos
std::map< std::string, std::map< int, MonitorElement * > > robHistos
void TimeHistos(std::string histoType)
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
DTDataIntegrityTask(const edm::ParameterSet &ps, edm::ActivityRegistry &reg)
void channelsInCEROS(int cerosId, int chMask, std::vector< int > &channels)
MonitorElement * hTTSSummary
std::set< int > fedBXIds
MonitorElement * hCorruptionSummary