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 */
10 /// @file AliHLTMisc.h
11 /// @author Matthias Richter
13 /// @brief Definition of various glue functions implemented in dynamically
17 #include "AliHLTStdIncludes.h"
21 class AliHLTComponentDataType;
23 class AliHLTMisc : public TObject {
29 static T* LoadInstance(const T* dummy, const char* classname, const char* library);
31 static AliHLTMisc& Instance();
33 virtual int InitCDB(const char* cdbpath);
35 virtual int SetCDBRunNo(int runNo);
37 virtual AliCDBEntry* LoadOCDBEntry(const char* path, int runNo=-1, int version = -1, int subVersion = -1);
39 virtual TObject* ExtractObject(AliCDBEntry* entry);
41 virtual int InitMagneticField() const;
44 static AliHLTMisc* fgInstance;
46 ClassDef(AliHLTMisc, 0)
49 #define ALIHLTMISC_LIBRARY "libHLTrec.so"
50 #define ALIHLTMISC_INIT_CDB "AliHLTMiscInitCDB"
51 #define ALIHLTMISC_SET_CDB_RUNNO "AliHLTMiscSetCDBRunNo"
58 * Init the CDB access for the running instance.
59 * The method is used from the C wrapper interface utilized by the on-line
60 * framework. The path of the (H)CDB is set to the specified path.<br>
61 * When running from AliRoot, the CDB path is set in the startup of the
63 * If cdbpath is nil or empty and the CDB is not already initialized, the
64 * CDB storage is set to local://$ALICE_ROOT/OCDB and the run no to 0.
65 * @param cdbpath path to the CDB
66 * @return neg. error code if failed
67 * @note function implemented in libHLTrec
69 int AliHLTMiscInitCDB(const char* cdbpath);
70 typedef int (*AliHLTMiscInitCDB_t)(const char* cdbpath);
73 * Init the Run no for the CDB access.
74 * @param runNo the run no
75 * @return neg. error code if failed
76 * @note function implemented in libHLTrec
78 int AliHLTMiscSetCDBRunNo(int runNo);
79 typedef int (*AliHLTMiscSetCDBRunNo_t)(int runNo);
85 // direct printout of data type struct
86 ostream &operator<<(ostream &str, const AliHLTComponentDataType&);