]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/SampleLib/AliHLTAgentSample.h
HLT base
[u/mrichter/AliRoot.git] / HLT / SampleLib / AliHLTAgentSample.h
1 // @(#) $Id$
2
3 #ifndef ALIHLTAGENTSAMPLE_H
4 #define ALIHLTAGENTSAMPLE_H
5 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
6  * See cxx source for full Copyright notice                               */
7
8 /** @file   AliHLTAgentSample.h
9     @author Matthias Richter
10     @date   
11     @brief  Agent of the libAliHLTSample library
12 */
13
14 #include "AliHLTModuleAgent.h"
15
16 /**
17  * @class AliHLTAgentSample
18  * This is the agent for the AliHLTSample library.<br>
19  * The AliHLTSample library illustrates usage of the HLT framework. The
20  * agent provides information on the features of the sample components
21  * and the configuration which should be run during AliRoot reconstruction.
22  *
23  * The sample agent implements all interface function provided by @ref
24  * AliHLTModuleAgent :
25  * - @ref CreateConfigurations <br>
26  *   The method gets an instance of the AliHLTConfigurationHanler to add
27  *   configurations, e.g. 
28  *   <pre>
29  *   handler->CreateConfiguration("my-puplisher"  , "FilePublisher", NULL , "data.bin");
30  *   ...
31  *   handler->CreateConfiguration("my-analysis-chain"  , "FileWriter", "my-processor" , "my arguments");
32  *   </pre>
33  * - @ref GetLocalRecConfigurations <br>
34  *   returns a string of blank separated configurations to be run during
35  *   local event reconstruction.
36  *   <pre>
37  *   return "my-data-sink my-analysis-chain";
38  *   </pre>
39  * - @ref GetRequiredComponentLibraries <br>
40  *   returns a string of blank separated libraries which have to be loaded
41  *   in addition
42  *   <pre>
43  *   return "libAliHLTUtil.so";
44  *   </pre>
45  * - not implemented are the in iterface methods
46  *   - @ref AliHLTModuleAgent::GetEventRecConfigurations
47  *   - @ref AliHLTModuleAgent::RegisterComponents
48  *
49  * In order to hook the sample library up to the HLT system on global object
50  * @ref gAliHLTAgentSample of the agent is defined in the source code.
51  * 
52  * @ingroup alihlt_system
53  */
54 class AliHLTAgentSample : public AliHLTModuleAgent {
55  public:
56   /**
57    * standard constructor. The agent is automatically registered in the
58    * global agent manager
59    */
60   AliHLTAgentSample();
61   /** destructor */
62   virtual ~AliHLTAgentSample();
63
64   /**
65    * Register all configurations belonging to the sample library with the
66    * AliHLTConfigurationHandler. The agent can adapt the configurations
67    * to be registered to the current AliRoot setup by checking the
68    * runloader.
69    * @param handler      the configuration handler
70    * @param runloader    AliRoot runloader
71    * @return neg. error code if failed
72    */
73   int CreateConfigurations(AliHLTConfigurationHandler* handler,
74                            AliRunLoader* runloader=NULL) const;
75
76   /**
77    * Get the top configurations for local event reconstruction.
78    * A top configuration describes a processing chain. It can simply be
79    * described by the last configuration(s) in the chain. 
80    * The agent can adapt the configurations to be registered to the current
81    * AliRoot setup by checking the runloader.
82    * @param runloader  [in] AliRoot runloader
83    * @return string containing the top configurations separated by blanks
84    */
85   const char* GetLocalRecConfigurations(AliRunLoader* runloader=NULL) const;
86
87   /**
88    * Component libraries which the configurations of this agent depend on.
89    * @return list of component libraries as a blank-separated string.
90    */
91   const char* GetRequiredComponentLibraries() const;
92
93  protected:
94
95  private:
96   /** file name of the generated test data*/
97   static const char* fgkAliHLTAgentSampleData;                      //!transient
98
99   /** file name of the output file */
100   static const char* fgkAliHLTAgentSampleOut;                       //!transient
101
102   /** ROOT specific member definition */
103   ClassDef(AliHLTAgentSample, 1);
104 };
105
106 #endif