]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/sim/AliHLTSimulation.h
- bugfix: correct equipment ids for HLT ddl links
[u/mrichter/AliRoot.git] / HLT / sim / AliHLTSimulation.h
1 //-*- Mode: C++ -*-
2 // @(#) $Id$
3
4 #ifndef ALIHLTSIMULATION_H
5 #define ALIHLTSIMULATION_H
6 /* This file is property of and copyright by the ALICE HLT Project        * 
7  * ALICE Experiment at CERN, All rights reserved.                         *
8  * See cxx source for full Copyright notice                               */
9
10 /** @file   AliHLTSimulation.h
11     @author Matthias Richter
12     @date   
13     @brief  Binding class for HLT simulation in AliRoot
14
15 // see below for class documentation
16 // or
17 // refer to README to build package
18 // or
19 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
20                                                                           */
21 /**
22  * @defgroup alihlt_simulation HLT simulation in AliRoot
23  * This section describes the the simulation of the HLT in AliRoot.
24  */
25
26 #include "TObject.h"
27 #include "TString.h"
28 class AliRunLoader;
29 class AliHLTSystem;
30 class AliRawReader;
31
32 /**
33  * @class AliHLTSimulation
34  * Base class of HLT data processing simulations.
35  */
36 class AliHLTSimulation : public TObject {
37  public:
38   /** create an instance of the class */
39   static AliHLTSimulation* CreateInstance();
40
41   /** delete an instance */
42   static int DeleteInstance(AliHLTSimulation* pSim);
43
44   /** init simulation */
45   int Init(AliRunLoader* pRunLoader, const char* options);
46
47   /** run simulation with an instance of the run loader */
48   int Run(AliRunLoader* pRunLoader);
49
50  private:
51   /** standard constructor */
52   AliHLTSimulation();
53   /** copy constructor prohibited */
54   AliHLTSimulation(const AliHLTSimulation&);
55   /** assignment operator prohibited */
56   AliHLTSimulation& operator=(const AliHLTSimulation&);
57   /** standard destructor */
58   ~AliHLTSimulation();
59
60   /* current options */
61   TString fOptions;                                                   //!transient
62
63   /* HLT steering object */
64   AliHLTSystem* fpSystem;                                             //!transient
65
66   /* RAW reader instance for chains which need RAW data as input */
67   AliRawReader* fpRawReader;                                            //!transient
68
69   ClassDef(AliHLTSimulation, 1)
70 };
71
72 #define ALIHLTSIMULATION_LIBRARY             "libHLTsim.so"
73 #define ALIHLTSIMULATION_LIBRARY_VERSION     0
74 #define ALIHLTSIMULATION_CREATE_INSTANCE     "AliHLTSimulationCreateInstance"
75 #define ALIHLTSIMULATION_DELETE_INSTANCE     "AliHLTSimulationDeleteInstance"
76 #define ALIHLTSIMULATION_INIT                "AliHLTSimulationInit"
77 #define ALIHLTSIMULATION_RUN                 "AliHLTSimulationRun"
78 #define ALIHLTSIMULATION_GET_LIBRARY_VERSION "AliHLTSimulationGetLibraryVersion"
79
80 #ifdef __cplusplus
81 extern "C" {
82 #endif
83   typedef AliHLTSimulation* (*AliHLTSimulationCreateInstance_t)();
84   typedef int (*AliHLTSimulationDeleteInstance_t)(AliHLTSimulation* pSim);
85   typedef int (*AliHLTSimulationInit_t)(AliHLTSimulation* pSim, AliRunLoader* pRunLoader, const char* options);
86   typedef int (*AliHLTSimulationRun_t)(AliHLTSimulation* pSim, AliRunLoader* pRunLoader);
87   typedef int (*AliHLTSimulationGetLibraryVersion_t)();
88
89   /**
90    * Create an instance of the AliHLTSimulation class
91    */
92   AliHLTSimulation* AliHLTSimulationCreateInstance();
93   /**
94    * Delete an instance of the AliHLTSimulation class
95    */
96   int AliHLTSimulationDeleteInstance(AliHLTSimulation* pSim);
97   /**
98    * Set options for an instance
99    */
100   int AliHLTSimulationInit(AliHLTSimulation* pSim, AliRunLoader* pRunLoader, const char* options);
101   /**
102    * Run simulation for an instance and run loader
103    */
104   int AliHLTSimulationRun(AliHLTSimulation* pSim, AliRunLoader* pRunLoader);
105   /**
106    * Get version no of the library/class interface
107    */
108   int AliHLTSimulationGetLibraryVersion();
109 #ifdef __cplusplus
110 }
111 #endif
112
113 #endif