File indexing completed on 2025-04-19 09:10:14
0001 #ifndef SHERPA_Tools_Userhook_Base_H
0002 #define SHERPA_Tools_Userhook_Base_H
0003
0004 #include "ATOOLS/Phys/Blob_List.H"
0005 #include "ATOOLS/Org/Getter_Function.H"
0006 #include "ATOOLS/Org/Return_Value.H"
0007 #include <string>
0008
0009 namespace SHERPA {
0010
0011 class Sherpa;
0012
0013 struct Userhook_Arguments {
0014 Sherpa* p_sherpa;
0015 Userhook_Arguments(Sherpa* const sherpa):
0016 p_sherpa(sherpa) {}
0017 };
0018
0019 class Userhook_Base {
0020 protected:
0021
0022 std::string m_name;
0023
0024 public:
0025
0026 typedef ATOOLS::Getter_Function
0027 <Userhook_Base,Userhook_Arguments> Getter_Function;
0028
0029 public:
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039 Userhook_Base(const std::string &name);
0040
0041
0042
0043
0044 virtual ~Userhook_Base();
0045
0046
0047
0048
0049
0050
0051
0052
0053 virtual ATOOLS::Return_Value::code Run(ATOOLS::Blob_List* blobs) = 0;
0054
0055
0056
0057
0058 virtual void Finish();
0059
0060
0061
0062
0063 virtual void CleanUp();
0064
0065 inline const std::string Name() { return m_name; }
0066 };
0067
0068 typedef std::vector<Userhook_Base*> Userhook_Vector;
0069
0070 }
0071
0072 #endif