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 AliRunLoader* GetRunLoader() const;
62 * Get the AliRoot raw reader
64 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 eventNo event No. \em Note: this is an internal enumeration of the
105 * @param runLoader the AliRoot runloader
106 * @param esd an AliESD instance
107 * @return neg. error code if failed
109 virtual int FillESD(int eventNo, AliRunLoader* runLoader, AliESD* esd)=0;
112 * Fill ESD for one event.
113 * The FillESD method of all active AliHLTOfflineDataSink's is called in
114 * order to fill the ESD with the previously reconstructed data. This method
115 * works on the global list.
116 * @param eventNo event No. \em Note: this is an internal enumeration of the
118 * @param runLoader the AliRoot runloader
119 * @param esd an AliESD instance
120 * @return neg. error code if failed
122 static int FillComponentESDs(int eventNo, AliRunLoader* runLoader, AliESD* esd);
125 * Reset AliRoot internal params of all active components.
126 * This method works on the global list.
128 static int ResetComponents();
132 * Register an OfflineInterface.
133 * @param me instance of AliHLTOfflineInterface
134 * @return neg. error code if failed
136 static int Register(AliHLTOfflineInterface* me);
139 * Unregister an OfflineInterface.
140 * @param me instance of AliHLTOfflineInterface
141 * @return neg. error code if failed
143 static int Unregister(AliHLTOfflineInterface* me);
146 /** the list of active interfaces */
147 static TList fgList; // see above
149 /** the current object link (list position) */
150 static TObjLink* fgCurrentLnk; // see above
152 /** global AliRoot run loader instance (for all components) */
153 static AliRunLoader* fgpRunLoader; //! transient
154 /** global AliRoot raw reader instance (for all components) */
155 static AliRawReader* fgpRawReader; //! transient
157 /** private AliRoot run loader instance */
158 AliRunLoader* fpRunLoader; //! transient
159 /** private AliRoot raw reader instance */
160 AliRawReader* fpRawReader; //! transient
161 /** AliRoot HLT ESD instance */
162 AliESD* fpESD; //! transient
164 ClassDef(AliHLTOfflineInterface, 1);