MCheckOffsetAndSat.hh
Go to the documentation of this file.00001
00047 #ifndef __MCHECKOFFSETANDSAT__
00048 #define __MCHECKOFFSETANDSAT__
00049
00050 #include "QModule.hh"
00051 #include "QCuore.hh"
00052 #include <vector>
00053 #include <ctime>
00054 #include "QOutputFileHandler.hh"
00055 #include "ChannelManager.hh"
00056 #include "QVector.hh"
00057 #include "QMatrix.hh"
00058 class TGraph;
00059 class TH1F;
00060
00061 class MCheckOffsetAndSat: public QModule {
00062
00063 public:
00068 MCheckOffsetAndSat(QSequence*);
00069
00070
00071
00072
00073
00074 virtual ~MCheckOffsetAndSat();
00079 virtual void Init();
00084 virtual QEvent* Do(QEvent*);
00085
00086
00087
00088
00089 virtual void Done();
00090
00091 private:
00092
00093
00094
00095 void CreateReference();
00096 void SetReference(char * VariableName, const QVector & VariableValue);
00097 double TruncatedRMS(const QVector & vector, double KeepRMS);
00098 TH1F* createHisto(char *name, char* title, int bins, int min, int max, int iFloor, char* yaxis);
00099
00100 std::string fOutRootFileName;
00101 std::string fOutTxtFileName;
00102 std::string fOutReferenceDir;
00103 bool fFirstEvent;
00104 QOutputFileHandler* fOutputHandler;
00105 ChannelManager* fChannelManager;
00106 double fMinBaseline;
00107 double fDistanceToMaxBaseline;
00108 time_t fDeltaTimeMaxAboveH;
00109 double fMaxRange;
00110 double fMaxBaselineFrequency;
00111 double fBaselineWarningLevel;
00112 double fSaturationWarningLevel;
00113 std::vector<QVector> fChannelsBaseline;
00114 std::vector<QVector> fChannelsBaselineRMS;
00115 std::vector<QVector> fChannelsAmplitudes;
00116 std::vector<QVector> fChannelsAmplitudesH1;
00117 std::vector<QVector> fChannelsAmplitudesH2;
00118 std::vector<QVector> fChannelsAmplitudesH3;
00119 std::vector<QVector> fTimes;
00120 std::vector<QVector> fSaturatedHighTimes;
00121 std::vector<QVector> fSaturatedStabTimes;
00122 std::vector<int> fSaturated;
00123 std::vector<int> fSaturatedHighHeaterFlag;
00124 std::vector<int> fSaturatedStabHeaterFlag;
00125 std::vector<int> fCounterUnderLThreshold;
00126 std::vector<int> fCounterAboveHThreshold;
00127 std::vector<int> fGlobalCounterUnderLThreshold;
00128 std::vector<int> fGlobalCounterAboveHThreshold;
00129 std::vector<bool> fUnderflowNoticed;
00130 std::vector<double> fTimePassLThresh;
00131 std::vector<double> fTimePassHThresh;
00132 int fLastChannel;
00133 QVector fAverageBaseline;
00134 QVector fAverageBaselineRMS;
00135 QVector fAveragePS;
00136 QVector fBaselFluctuation;
00137 int fRun;
00138
00139 };
00140 #endif
00141