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"
18 #include "AliHLTDataTypes.h"
23 class AliHLTComponentDataType;
25 class AliHLTMisc : public TObject {
31 static T* LoadInstance(const T* dummy, const char* classname, const char* library);
33 static AliHLTMisc& Instance();
35 virtual int InitCDB(const char* cdbpath);
37 virtual int SetCDBRunNo(int runNo);
39 virtual AliCDBEntry* LoadOCDBEntry(const char* path, int runNo=-1, int version = -1, int subVersion = -1);
41 virtual TObject* ExtractObject(AliCDBEntry* entry);
43 virtual int InitMagneticField() const;
45 virtual AliHLTUInt64_t GetTriggerMask(AliRawReader* rawReader) const;
48 static AliHLTMisc* fgInstance;
50 ClassDef(AliHLTMisc, 0)
53 #define ALIHLTMISC_LIBRARY "libHLTrec.so"
54 #define ALIHLTMISC_INIT_CDB "AliHLTMiscInitCDB"
55 #define ALIHLTMISC_SET_CDB_RUNNO "AliHLTMiscSetCDBRunNo"
62 * Init the CDB access for the running instance.
63 * The method is used from the C wrapper interface utilized by the on-line
64 * framework. The path of the (H)CDB is set to the specified path.<br>
65 * When running from AliRoot, the CDB path is set in the startup of the
67 * If cdbpath is nil or empty and the CDB is not already initialized, the
68 * CDB storage is set to local://$ALICE_ROOT/OCDB and the run no to 0.
69 * @param cdbpath path to the CDB
70 * @return neg. error code if failed
71 * @note function implemented in libHLTrec
73 int AliHLTMiscInitCDB(const char* cdbpath);
74 typedef int (*AliHLTMiscInitCDB_t)(const char* cdbpath);
77 * Init the Run no for the CDB access.
78 * @param runNo the run no
79 * @return neg. error code if failed
80 * @note function implemented in libHLTrec
82 int AliHLTMiscSetCDBRunNo(int runNo);
83 typedef int (*AliHLTMiscSetCDBRunNo_t)(int runNo);
89 // direct printout of data type struct
90 ostream &operator<<(ostream &str, const AliHLTComponentDataType&);