Go to the documentation of this file.00001 #ifndef _SiPixelDataQuality_h_
00002 #define _SiPixelDataQuality_h_
00003
00004 #include "DQMServices/Core/interface/MonitorElement.h"
00005
00006 #include "DQM/SiPixelMonitorClient/interface/SiPixelConfigParser.h"
00007 #include "DQM/SiPixelMonitorClient/interface/SiPixelConfigWriter.h"
00008 #include "DQM/SiPixelMonitorClient/interface/SiPixelActionExecutor.h"
00009 #include "DQM/SiPixelMonitorClient/interface/SiPixelLayoutParser.h"
00010
00011 #include "FWCore/Framework/interface/Event.h"
00012 #include "FWCore/Framework/interface/EventSetup.h"
00013 #include "FWCore/Framework/interface/ESHandle.h"
00014 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00015
00016 #include "DataFormats/SiPixelDigi/interface/PixelDigi.h"
00017 #include "DataFormats/Common/interface/DetSetVector.h"
00018 #include "CondFormats/DataRecord/interface/SiPixelFedCablingMapRcd.h"
00019 #include "CondFormats/SiPixelObjects/interface/DetectorIndex.h"
00020 #include "CondFormats/SiPixelObjects/interface/SiPixelFedCablingMap.h"
00021 #include "CondFormats/SiPixelObjects/interface/SiPixelFrameConverter.h"
00022
00023 #include "xgi/Utils.h"
00024 #include "xgi/Method.h"
00025
00026 #include "TCanvas.h"
00027 #include "TPaveText.h"
00028 #include "TF1.h"
00029 #include "TH2F.h"
00030 #include "TGaxis.h"
00031
00032 #include <fstream>
00033 #include <sstream>
00034 #include <map>
00035 #include <vector>
00036 #include <string>
00037 #include <map>
00038 #include <boost/cstdint.hpp>
00039
00040 class DQMStore;
00041 class SiPixelEDAClient;
00042 class SiPixelWebInterface;
00043 class SiPixelHistoPlotter;
00044 class SiPixelDataQuality {
00045
00046 public:
00047
00048 SiPixelDataQuality( bool offlineXMLfile);
00049 ~SiPixelDataQuality();
00050
00051 int getDetId( MonitorElement * mE) ;
00052
00053 void bookGlobalQualityFlag (DQMStore * bei,
00054 bool Tier0Flag,
00055 int nFEDs);
00056
00057 void computeGlobalQualityFlag (DQMStore * bei,
00058 bool init,
00059 int nFEDs,
00060 bool Tier0Flag);
00061
00062 void computeGlobalQualityFlagByLumi (DQMStore * bei,
00063 bool init,
00064 int nFEDs,
00065 bool Tier0Flag,
00066 int nEvents_lastLS_);
00067
00068 void fillGlobalQualityPlot (DQMStore * bei,
00069 bool init,
00070 edm::EventSetup const & eSetup,
00071 int nFEDs,
00072 bool Tier0Flag,
00073 int lumisec);
00074
00075 private:
00076
00077 bool offlineXMLfile_;
00078
00079
00080 TH2F * allmodsMap;
00081 TH2F * errmodsMap;
00082 TH2F * goodmodsMap;
00083 TH1D * allmodsVec;
00084 TH1D * errmodsVec;
00085 TH1D * goodmodsVec;
00086 int count;
00087 int errcount;
00088 bool gotDigis;
00089
00090 int objectCount_;
00091 bool DONE_;
00092
00093
00094 ofstream myfile_;
00095 int nevents_;
00096 bool endOfModules_;
00097 edm::ESHandle<SiPixelFedCablingMap> theCablingMap;
00098
00099
00100 MonitorElement * SummaryReportMap;
00101 MonitorElement * SummaryPixel;
00102 MonitorElement * SummaryBarrel;
00103 MonitorElement * SummaryEndcap;
00104 float qflag_;
00105 int allMods_, errorMods_, barrelMods_, endcapMods_;
00106
00107
00108 MonitorElement * FEDErrReportMap;
00109 MonitorElement * NErrorsBarrel;
00110 MonitorElement * NErrorsEndcap;
00111 MonitorElement * NErrorsFEDs;
00112 int n_errors_barrel_, n_errors_endcap_, n_errors_pixel_;
00113 float barrel_error_flag_, endcap_error_flag_, pixel_error_flag_;
00114
00115 bool digiStatsBarrel, clusterStatsBarrel, trackStatsBarrel;
00116 int digiCounterBarrel, clusterCounterBarrel, trackCounterBarrel;
00117 bool digiStatsEndcap, clusterStatsEndcap, trackStatsEndcap;
00118 int digiCounterEndcap, clusterCounterEndcap, trackCounterEndcap;
00119
00120
00121 MonitorElement * NDigisBarrel;
00122 MonitorElement * NDigisEndcap;
00123 MonitorElement * DigiChargeBarrel;
00124 MonitorElement * DigiChargeEndcap;
00125
00126
00127 MonitorElement * ClusterSizeBarrel;
00128 MonitorElement * ClusterSizeEndcap;
00129 MonitorElement * ClusterChargeBarrel;
00130 MonitorElement * ClusterChargeEndcap;
00131 MonitorElement * NClustersBarrel;
00132 MonitorElement * NClustersEndcap;
00133
00134
00135 MonitorElement * NPixelTracks;
00136
00137 int count1;
00138 int count2;
00139 int count3;
00140 int count4;
00141 int count5;
00142 int count6;
00143
00144 int timeoutCounter_;
00145 int modCounter_;
00146 int lastLS_;
00147 float lasterrmods_[40];
00148 float lastallmods_[40];
00149
00150 };
00151 #endif