00001 #ifndef FIRSTCOMPLETE_H__ 00002 #define FIRSTCOMPLETE_H__ 00003 00004 #include "TSetupData.h" 00005 #include "TVAnalysedPulseGenerator.h" 00006 #include "definitions.h" 00007 00008 #include "TAPAlgorithms.h" 00009 #include "PulseCandidateFinder.h" 00010 00011 class FirstCompleteAPGenerator:public TVAnalysedPulseGenerator { 00012 00013 public: 00014 FirstCompleteAPGenerator(TAPGeneratorOptions* opts); 00015 virtual ~FirstCompleteAPGenerator(); 00016 00017 public: 00018 virtual int ProcessPulses( const PulseIslandList&,AnalysedPulseList&); 00019 00020 // This function should return true if this generator could break up a TPI 00021 // into more than one TAP 00022 virtual bool MayDivideTPIs(){return true;}; 00023 00024 private: 00025 void DrawPulse(int original, int pulse_timestamp, int n_pulse_samples); 00026 void MakeTAPsWithPCF(int tpi_ID,const TPulseIsland* tpi, AnalysedPulseList& analysedList); 00027 void AnalyseOneTpi(int tpi_ID,const TPulseIsland* tpi, AnalysedPulseList& analysedList); 00028 00029 // The algorithms that this generator will use 00030 const Algorithm::MaxBinAmplitude fMaxBinAmplitude; 00031 const Algorithm::ConstantFractionTime fConstantFractionTime; 00032 const Algorithm::SimpleIntegral fSimpleIntegral; 00033 00034 // The pulse candidate finder that we will use 00035 PulseCandidateFinder* fPulseCandidateFinder; 00036 00037 // A vector of sub-pulses so we don't need to declare each time we call 00038 // ProcessPulses 00039 PulseIslandList fSubPulses; 00040 }; 00041 00042 #endif //FIRSTCOMPLETE_H__