Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-04-19 09:10:14

0001 #ifndef SHERPA_Tools_Analysis_Interface_H
0002 #define SHERPA_Tools_Analysis_Interface_H
0003 
0004 #include "ATOOLS/Phys/Blob_List.H"
0005 #include "ATOOLS/Org/Getter_Function.H"
0006 
0007 namespace SHERPA {
0008   
0009   class Event_Handler;
0010 
0011   struct Analysis_Arguments {
0012     std::string m_outpath;
0013     Analysis_Arguments(const std::string outpath):
0014       m_outpath(outpath) {}
0015   };
0016 
0017   class Analysis_Interface {
0018   protected:
0019     std::string m_name;
0020     Event_Handler *p_eventhandler;
0021   public:
0022 
0023     typedef ATOOLS::Getter_Function
0024     <Analysis_Interface,Analysis_Arguments> 
0025     Analysis_Getter_Function;
0026 
0027   public:
0028 
0029     inline Analysis_Interface(const std::string &name):
0030       m_name(name) {}
0031 
0032     virtual ~Analysis_Interface();
0033 
0034     virtual bool Init() = 0;
0035     virtual bool Run(ATOOLS::Blob_List *const bl) = 0;
0036     virtual bool Finish() = 0;
0037 
0038     virtual void CleanUp();
0039     virtual bool WriteOut();
0040 
0041     virtual void ShowSyntax(const int mode);
0042     
0043     void SetEventHandler(Event_Handler *const eh) { p_eventhandler = eh; }
0044 
0045     inline std::string Name() const { return m_name; }
0046 
0047   };// end of class Analysis_Interface
0048 
0049   typedef std::vector<Analysis_Interface*> Analysis_Vector;
0050 
0051 }// end of namespace SHERPA
0052 
0053 #endif