4 #ifndef ALIHLTOFFLINEINTERFACE_H
5 #define ALIHLTOFFLINEINTERFACE_H
6 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
7 * See cxx source for full Copyright notice */
9 /** @file AliHLTOfflineInterface.h
10 @author Matthias Richter
12 @brief the HLT interface to AliRoot
23 /******************************************************************************/
26 * @class AliHLTOfflineInterface
27 * The class implements the basic interface to the AliRoot objects during
29 * It serves as a base class for offline source and sink interface components
30 * and provides access methods for the AliRunLoader, AliRawReader and AliESD
31 * objects. The AliRunLoader and the AliRawReader are fixed during one run,
32 * while the AliESD object will be changed from event to event.<br>
33 * \em Note: The digits and clusters trees are not available through this
34 * interface class as they are completetly detector (AliLoader) dependend.
36 * @note This class is only used for the @ref alihlt_system.
38 * @ingroup alihlt_system
40 class AliHLTOfflineInterface : public TObject {
42 /** standard constructor */
43 AliHLTOfflineInterface();
45 * @param pRunLoader pointer to AliRoot run loader
46 * @param pRawReader pointer to AliRoot raw reader
48 AliHLTOfflineInterface(AliRunLoader* pRunLoader, AliRawReader* pRawReader);
49 /** not a valid copy constructor, defined according to effective C++ style */
50 AliHLTOfflineInterface(const AliHLTOfflineInterface&);
51 /** not a valid assignment op, but defined according to effective C++ style */
52 AliHLTOfflineInterface& operator=(const AliHLTOfflineInterface&);
54 virtual ~AliHLTOfflineInterface();
57 * Get the AliRoot run loader.
59 const AliRunLoader* GetRunLoader() const;
62 * Get the AliRoot raw reader
64 const AliRawReader* GetRawReader() const;
67 * Set AliRoot ESD for the current event.
69 int SetESD(Int_t eventNo, AliESD* pESD);
74 AliESD* GetESD() const;
77 * Set AliRoot external params.
79 * @param runLoader the AliRoot runloader
80 * @param rawReader the AliRoot RawReader
81 * @return neg. error code if failed
83 int SetParams(AliRunLoader* runLoader, AliRawReader* rawReader);
86 * Reset AliRoot internal params.
91 * Set AliRoot external params.
92 * This method works on the global list.
93 * @param runLoader the AliRoot runloader
94 * @param rawReader the AliRoot RawReader
95 * @return neg. error code if failed
97 static int SetParamsToComponents(AliRunLoader* runLoader, AliRawReader* rawReader);
100 * Fill ESD for one event.
101 * Fill the ESD with the previously reconstructed data. It must be implmented
102 * by the child class.
103 * @param runLoader the AliRoot runloader
104 * @param esd an AliESD instance
105 * @return neg. error code if failed
107 virtual int FillESD(AliRunLoader* runLoader, AliESD* esd)=0;
110 * Fill ESD for one event.
111 * The FillESD method of all active AliHLTOfflineDataSink's is called in
112 * order to fill the ESD with the previously reconstructed data. This method
113 * works on the global list.
114 * @param runLoader the AliRoot runloader
115 * @param esd an AliESD instance
116 * @return neg. error code if failed
118 static int FillComponentESDs(AliRunLoader* runLoader, AliESD* esd);
121 * Reset AliRoot internal params of all active components.
122 * This method works on the global list.
124 static int ResetComponents();
128 * Register an OfflineInterface.
129 * @param me instance of AliHLTOfflineInterface
130 * @return neg. error code if failed
132 static int Register(AliHLTOfflineInterface* me);
135 * Unregister an OfflineInterface.
136 * @param me instance of AliHLTOfflineInterface
137 * @return neg. error code if failed
139 static int Unregister(AliHLTOfflineInterface* me);
142 /** the list of active interfaces */
143 static TList fgList; // see above
145 /** the current object link (list position) */
146 static TObjLink* fgCurrentLnk; // see above
148 /** AliRoot run loader instance */
149 AliRunLoader* fpRunLoader; //! transient
150 /** AliRoot raw reader instance */
151 AliRawReader* fpRawReader; //! transient
152 /** AliRoot HLT ESD instance */
153 AliESD* fpESD; //! transient
155 ClassDef(AliHLTOfflineInterface, 1);