virtual EReturnCode StartAnalysis(); virtual EReturnCode StartRun(); virtual EReturnCode Process(TPhEvent*); virtual EReturnCode EndRun(); virtual EReturnCode EndAnalysis();In general, not all of these functions have to be implemented by all modules.
TPhModule provides a default constructor for compatibility with the ROOT system - this should not be used to create a module in user code. Instead, the standard way to instantiate a module is the following constructor:
TPhModule(const Text_t* name, const Text_t* title, TPhModuleContext* context);This provides a name and a title to the module, allowing them to be stored in a ROOT database or within the hash list of a supermodule (see below). As a convention the 'title' of the module is set automatically to the module class name, with the 'name' characterizing the specific instance. In a user macro, the creation of a module typically looks like this:
TPhVertexFinderMod *VertexFinder = new TPhVertexFinderMod("MyVertexFinder",context);Besides creating a vertex finding module named MyVertexFinder this constructor also provides the module with a pointer to a TPhModuleContext object (see below).