00001 #ifndef MAKEANALYSEDPULSES_H__ 00002 #define MAKEANALYSEDPULSES_H__ 00003 00004 #include <string> 00005 #include <vector> 00006 #include <map> 00007 00008 #include "BaseModule.h" 00009 #include "TGlobalData.h" 00010 #include "TSetupData.h" 00011 #include "ModulesOptions.h" 00012 #include "TAPGeneratorOptions.h" 00013 #include "definitions.h" 00014 00015 class TVAnalysedPulseGenerator; 00016 class TPulseIsland; 00017 class TAnalysedPulse; 00018 00019 class MakeAnalysedPulses : public BaseModule{ 00020 typedef std::vector<TVAnalysedPulseGenerator*> ChannelGenerators_t; 00021 00022 public: 00023 MakeAnalysedPulses(modules::options* opts); 00024 ~MakeAnalysedPulses(); 00025 00026 bool AddGenerator(const std::string& detector,std::string generatorType,TAPGeneratorOptions* opts=NULL); 00027 bool ParseGeneratorList(std::string generatorList, const std::vector<std::string>&); 00028 00029 void SetAnalysedPulseMap(StringAnalPulseMap& aMap){fAnalysedPulseMap=&aMap;} 00030 private: 00031 virtual int ProcessEntry(TGlobalData *gData, const TSetupData* gSetup); 00032 virtual int BeforeFirstEntry(TGlobalData* gData, const TSetupData* setup); 00033 virtual int AfterLastEntry(TGlobalData* gData,const TSetupData* setup){return 0;}; 00034 00035 void CalibratePulses(const TVAnalysedPulseGenerator* generator, AnalysedPulseList& theAnalysedPulses)const; 00036 00037 ChannelGenerators_t fGenerators; 00038 StringAnalPulseMap* fAnalysedPulseMap; 00039 std::string fSlowGeneratorType; 00040 std::string fFastGeneratorType; 00041 std::vector<std::string> fChannelsToAnalyse; 00042 modules::options* fOptions; 00043 TAPGeneratorOptions* fDefaultOpts; 00044 00045 }; 00046 00047 #endif // MAKEANALYSEDPULSES_H__