CMS 3D CMS Logo

DTDataIntegrityTask.h

Go to the documentation of this file.
00001 #ifndef DTDataIntegrityTask_H
00002 #define DTDataIntegrityTask_H
00003 
00015 #include "EventFilter/DTRawToDigi/interface/DTDataMonitorInterface.h"
00016 #include "EventFilter/DTRawToDigi/interface/DTROChainCoding.h"
00017 
00018 #include "FWCore/Framework/interface/Frameworkfwd.h"
00019 #include "FWCore/Framework/interface/Event.h"
00020 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00021 #include <FWCore/Framework/interface/LuminosityBlock.h>
00022 
00023 #include "DQMServices/Core/interface/DQMStore.h"
00024 
00025 #include "FWCore/ServiceRegistry/interface/ActivityRegistry.h"
00026 #include "DQMServices/Core/interface/MonitorElement.h"
00027 
00028 #include <fstream>
00029 #include <map>
00030 #include <string>
00031 #include <vector>
00032 #include <list>
00033 
00034 class DTROS25Data;
00035 class DTDDUData;
00036 
00037 
00038 class DTDataIntegrityTask : public DTDataMonitorInterface {
00039 
00040 public:
00041 
00042   explicit DTDataIntegrityTask( const edm::ParameterSet& ps,edm::ActivityRegistry& reg);
00043   
00044   virtual ~DTDataIntegrityTask();
00045 
00046 
00047 
00048 
00049 
00050   void TimeHistos(std::string histoType);
00051 
00052   void processROS25(DTROS25Data & data, int dduID, int ros);
00053   void processFED(DTDDUData & dduData, const std::vector<DTROS25Data> & rosData, int dduID);
00054 
00055   // log number of times the payload of each fed is unpacked 
00056   void fedEntry(int dduID);
00057   // log number of times the payload of each fed is skipped (no ROS inside)
00058   void fedFatal(int dduID);
00059   // log number of times the payload of each fed is partially skipped (some ROS skipped)
00060   void fedNonFatal(int dduID);
00061 
00062   bool eventHasErrors() const;
00063   void postBeginJob();
00064   void postEndJob();
00065   void preProcessEvent(const edm::EventID& iEvtid, const edm::Timestamp& iTime);
00066 
00067 private:
00068 
00069   void bookHistos();
00070   void bookHistos(std::string folder, DTROChainCoding code);
00071   void bookHistosROS25(DTROChainCoding code);
00072 
00073 
00074 
00075   std::string topFolder() const;
00076 
00077   std::multimap<std::string, std::string> names;
00078   std::multimap<std::string, std::string>::iterator it;
00079 
00080 
00081 
00082   edm::ParameterSet parameters;
00083 
00084   //If you want info VS time histos
00085   bool doTimeHisto;
00086   // Plot quantities about SC
00087   bool getSCInfo;
00088 
00089   // back-end interface
00090   DQMStore * dbe;
00091   
00092   DTROChainCoding coding;
00093 
00094   // Monitor Elements
00095   // <histoType, <index , histo> >    
00096   std::map<std::string, std::map<int, MonitorElement*> > dduHistos;
00097   // <histoType, histo> >    
00098   std::map<std::string, std::map<int, MonitorElement*> > rosSHistos;
00099   // <histoType, <index , histo> >    
00100   std::map<std::string, std::map<int, MonitorElement*> > rosHistos;
00101   // <histoType, <tdcID, histo> >   
00102   std::map<std::string, std::map<int, MonitorElement*> > robHistos;
00103 
00104   // standard ME for monitoring of FED integrity
00105   MonitorElement* hFEDEntry;
00106   MonitorElement* hFEDFatal;
00107   MonitorElement* hFEDNonFatal;
00108 
00109 
00110   int neventsDDU;
00111   int neventsROS25;
00112   float trigger_counter;
00113   std::string outputFile;
00114   double rob_max[25];
00115 
00116   
00117   //Event counter for the graphs VS time
00118   int myPrevEv;
00119   
00120   //Monitor TTS,ROS,FIFO VS time
00121   int myPrevTtsVal;
00122   int myPrevRosVal;
00123   int myPrevFifoVal[7];
00124   //list of pair<events, values>
00125   std::list<std::pair<int,int> > ttsVSTime;
00126   std::list<std::pair<int,int> > rosVSTime;
00127   std::list<std::pair<int,int*> > fifoVSTime;
00128  
00129   // event error flag: true when errors are detected
00130   // can be used for the selection of the debug stream
00131   bool eventErrorFlag;
00132 
00133   // flag to toggle the creation of only the summaries (for HLT running)
00134   bool hltMode;
00135 
00136 };
00137 
00138 
00139 #endif
00140 

Generated on Tue Jun 9 17:32:35 2009 for CMSSW by  doxygen 1.5.4