00001 #ifndef TVMUONEVENTGENERATOR_H_ 00002 #define TVMUONEVENTGENERATOR_H_ 00003 00004 #include <vector> 00005 #include <map> 00006 #include "TDetectorPulse.h" 00007 #include "TMuonEvent.h" 00008 #include "TMEGeneratorOptions.h" 00009 #include "definitions.h" 00010 #include "IdGenerator.h" 00011 00012 class TVMuonEventGenerator{ 00013 public: 00014 TVMuonEventGenerator(const char* name,TMEGeneratorOptions* opts): 00015 fDebug(false),fGenerator(name,opts->StringDescription()){ 00016 if(opts && opts->GetFlag("debug")) fDebug=true; 00017 }; 00018 virtual ~TVMuonEventGenerator(){}; 00019 00020 public: 00021 virtual int ProcessPulses(MuonEventList& muonEventsOut,const SourceDetPulseMap& detectorPulsesIn)=0; 00022 const IDs::generator& GetGenerator()const{return fGenerator;} 00023 00024 protected: 00025 bool Debug()const {return fDebug;}; 00026 private: 00027 bool fDebug; 00028 IDs::generator fGenerator; 00029 }; 00030 00031 #endif //TVMUONEVENTGENERATOR_H_