Go to the documentation of this file.00001 #ifndef DQM_SiStripMonitorHardware_SPYHistograms_HH
00002 #define DQM_SiStripMonitorHardware_SPYHistograms_HH
00003
00004 #include <sstream>
00005
00006 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00007
00008 #include "DQMServices/Core/interface/DQMStore.h"
00009 #include "DQMServices/Core/interface/MonitorElement.h"
00010
00011 #include "DQM/SiStripMonitorHardware/interface/SiStripSpyUtilities.h"
00012 #include "DQM/SiStripMonitorHardware/interface/HistogramBase.hh"
00013
00014 class SPYHistograms: public HistogramBase {
00015
00016 public:
00017
00018 struct Trends {
00019 unsigned int meanDigitalLow;
00020 };
00021
00022 struct ErrorCounters {
00023 unsigned int nNoData;
00024 unsigned int nLowRange;
00025 unsigned int nHighRange;
00026 unsigned int nMinZero;
00027 unsigned int nMaxSat;
00028 unsigned int nLowPb;
00029 unsigned int nHighPb;
00030 unsigned int nOOS;
00031
00032
00033 unsigned int nOtherPbs;
00034 unsigned int nAPVError;
00035 unsigned int nAPVAddressError;
00036 unsigned int nNegPeds;
00037 };
00038
00039
00040 struct Errors {
00041 bool hasNoData;
00042 bool hasLowRange;
00043 bool hasHighRange;
00044 bool hasMinZero;
00045 bool hasMaxSat;
00046 bool hasLowPb;
00047 bool hasHighPb;
00048 bool hasOOS;
00049 bool hasOtherPbs;
00050 bool hasErrorBit0;
00051 bool hasErrorBit1;
00052 bool hasAPVAddressError0;
00053 bool hasAPVAddressError1;
00054 bool hasNegPeds;
00055 };
00056
00057 SPYHistograms();
00058
00059 ~SPYHistograms();
00060
00061
00062 void initialise(const edm::ParameterSet& iConfig,
00063 std::ostringstream* pDebugStream
00064 );
00065
00066
00067 void bookTopLevelHistograms(DQMStore* dqm);
00068
00069
00070 void bookFEDHistograms(const unsigned int fedId,
00071 const Errors & aErr,
00072 bool doAll = false);
00073
00074 void bookAllFEDHistograms();
00075
00076 void fillCountersHistograms(const ErrorCounters & aCounter, const double aTime);
00077
00078 void fillGainHistograms(const Trends & aTrendElement, const double aTime);
00079
00080 void fillFEDHistograms(const Errors & aErr, const unsigned int aFedId);
00081
00082 void fillDetailedHistograms(const Errors & aErr,
00083 const sistrip::SpyUtilities::Frame & aFrame,
00084 const unsigned int aFedId,
00085 const unsigned int aFedChannel);
00086
00087 bool tkHistoMapEnabled(unsigned int aIndex=0){
00088 return false;
00089 };
00090
00091 TkHistoMap * tkHistoMapPointer(unsigned int aIndex=0){
00092 return 0;
00093 };
00094
00095 protected:
00096
00097 private:
00098
00099
00100
00101 HistogramConfig nNoData_;
00102 HistogramConfig nLowRange_;
00103 HistogramConfig nHighRange_;
00104 HistogramConfig nMinZero_;
00105 HistogramConfig nMaxSat_;
00106 HistogramConfig nLowPb_;
00107 HistogramConfig nHighPb_;
00108 HistogramConfig nOutOfSync_;
00109 HistogramConfig nOtherPbs_;
00110 HistogramConfig nApvErrorBit_;
00111 HistogramConfig nApvAddressError_;
00112 HistogramConfig nNegativePeds_;
00113
00114
00115 HistogramConfig nNoDatavsTime_;
00116 HistogramConfig nLowRangevsTime_;
00117 HistogramConfig nHighRangevsTime_;
00118 HistogramConfig nMinZerovsTime_;
00119 HistogramConfig nMaxSatvsTime_;
00120 HistogramConfig nLowPbvsTime_;
00121 HistogramConfig nHighPbvsTime_;
00122 HistogramConfig nOutOfSyncvsTime_;
00123 HistogramConfig nOtherPbsvsTime_;
00124 HistogramConfig nApvErrorBitvsTime_;
00125 HistogramConfig nApvAddressErrorvsTime_;
00126 HistogramConfig nNegativePedsvsTime_;
00127 HistogramConfig meanDigitalLowvsTime_;
00128
00129
00130 HistogramConfig noData_;
00131 HistogramConfig lowRange_;
00132 HistogramConfig highRange_;
00133 HistogramConfig minZero_;
00134 HistogramConfig maxSat_;
00135 HistogramConfig lowPb_;
00136 HistogramConfig highPb_;
00137 HistogramConfig outOfSync_;
00138 HistogramConfig otherPbs_;
00139 HistogramConfig apvErrorBit_;
00140 HistogramConfig apvAddressError_;
00141 HistogramConfig negativePeds_;
00142
00143 HistogramConfig frameRange_;
00144 HistogramConfig frameMin_;
00145 HistogramConfig frameMax_;
00146 HistogramConfig baseline_;
00147
00148
00149
00150 HistogramConfig noDataDetailed_;
00151 HistogramConfig lowRangeDetailed_;
00152 HistogramConfig highRangeDetailed_;
00153 HistogramConfig minZeroDetailed_;
00154 HistogramConfig maxSatDetailed_;
00155 HistogramConfig lowPbDetailed_;
00156 HistogramConfig highPbDetailed_;
00157 HistogramConfig outOfSyncDetailed_;
00158 HistogramConfig otherPbsDetailed_;
00159 HistogramConfig apvErrorBitDetailed_;
00160 HistogramConfig apvAddressErrorDetailed_;
00161 HistogramConfig negativePedsDetailed_;
00162
00163 HistogramConfig positionOfFirstHeaderBitDetailed_;
00164 HistogramConfig positionOfFirstTrailerBitDetailed_;
00165 HistogramConfig distanceHeaderTrailerDetailed_;
00166
00167 std::map<unsigned int,MonitorElement* > noDataDetailedMap_;
00168 std::map<unsigned int,MonitorElement* > lowRangeDetailedMap_;
00169 std::map<unsigned int,MonitorElement* > highRangeDetailedMap_;
00170 std::map<unsigned int,MonitorElement* > minZeroDetailedMap_;
00171 std::map<unsigned int,MonitorElement* > maxSatDetailedMap_;
00172 std::map<unsigned int,MonitorElement* > lowPbDetailedMap_;
00173 std::map<unsigned int,MonitorElement* > highPbDetailedMap_;
00174 std::map<unsigned int,MonitorElement* > outOfSyncDetailedMap_;
00175 std::map<unsigned int,MonitorElement* > otherPbsDetailedMap_;
00176 std::map<unsigned int,MonitorElement* > apvErrorBitDetailedMap_;
00177 std::map<unsigned int,MonitorElement* > apvAddressErrorDetailedMap_;
00178 std::map<unsigned int,MonitorElement* > negativePedsDetailedMap_;
00179
00180 std::map<unsigned int,MonitorElement* > positionOfFirstHeaderBitDetailedMap_;
00181 std::map<unsigned int,MonitorElement* > positionOfFirstTrailerBitDetailedMap_;
00182 std::map<unsigned int,MonitorElement* > distanceHeaderTrailerDetailedMap_;
00183
00184 std::vector<bool> histosBooked_;
00185
00186 };
00187
00188
00189
00190 #endif //DQM_SiStripMonitorHardware_SPYHistograms_HH
00191
00192