]>
Commit | Line | Data |
---|---|---|
7c4d1228 | 1 | //-*- Mode: C++ -*- |
2 | // $Id$ | |
3 | ||
4 | #ifndef ALIHLTDAQ_H | |
5 | #define ALIHLTDAQ_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 | ||
eb8e9901 | 10 | /// @file AliHLTDAQ.h |
11 | /// @author Matthias Richter | |
12 | /// @date 24.10.2008 | |
13 | /// @brief Virtual Interface to the AliDAQ class. | |
14 | /// | |
7c4d1228 | 15 | |
16 | #include "Rtypes.h" | |
eb8e9901 | 17 | #include <string> |
7c4d1228 | 18 | |
19 | /** | |
20 | * Virtual interface to the AliDAQ class. | |
21 | * In order to keep the libHLTbase free of AliRoot dependencies, the | |
22 | * implementation has been separated from libHLTbase. | |
23 | * Implementation in libHLTrec. | |
eb8e9901 | 24 | * |
25 | * @author Matthias.Richter@ift.uib.no | |
26 | * @ingroup alihlt_system | |
7c4d1228 | 27 | */ |
28 | class AliHLTDAQ { | |
29 | public: | |
30 | AliHLTDAQ(); | |
31 | virtual ~AliHLTDAQ(); | |
84221957 | 32 | static Int_t NumberOfDetectors(); |
33 | ||
7c4d1228 | 34 | static Int_t DetectorID(const char *detectorName); |
35 | static const char *DetectorName(Int_t detectorID); | |
2ce72c0a | 36 | // Note: use specific number instead of kAliHLTComponentDataTypefOriginSize to avoid including AliHLTDataTypes.h |
37 | static Int_t DetectorIDFromHLTOrigin(const char dataorigin[4]); | |
eb8e9901 | 38 | static const char *DetectorName(const char dataorigin[4]); |
7c4d1228 | 39 | |
40 | static Int_t DdlIDOffset(const char *detectorName); | |
41 | static Int_t DdlIDOffset(Int_t detectorID); | |
42 | ||
43 | static const char *DetectorNameFromDdlID(Int_t ddlID, Int_t &ddlIndex); | |
44 | static Int_t DetectorIDFromDdlID(Int_t ddlID, Int_t &ddlIndex); | |
45 | ||
46 | static Int_t DdlID(const char *detectorName, Int_t ddlIndex); | |
47 | static Int_t DdlID(Int_t detectorID, Int_t ddlIndex); | |
48 | static const char *DdlFileName(const char *detectorName, Int_t ddlIndex); | |
49 | static const char *DdlFileName(Int_t detectorID, Int_t ddlIndex); | |
50 | ||
51 | static Int_t NumberOfDdls(const char *detectorName); | |
52 | static Int_t NumberOfDdls(Int_t detectorID); | |
53 | ||
84221957 | 54 | static const char *ListOfTriggeredDetectors(UInt_t detectorPattern); |
55 | static UInt_t DetectorPattern(const char *detectorList); | |
56 | ||
57 | static const char *OfflineModuleName(const char *detectorName); | |
58 | static const char *OfflineModuleName(Int_t detectorID); | |
59 | ||
60 | static const char *OnlineName(const char *detectorName); | |
61 | static const char *OnlineName(Int_t detectorID); | |
62 | ||
eb8e9901 | 63 | static std::string HLTOrigin(const char *detectorName); |
64 | static std::string HLTOrigin(Int_t detectorID); | |
41f65320 | 65 | |
66 | static std::string HLTSpecificationFromDdlID(Int_t ddlID); | |
2ce72c0a | 67 | // Note: use specific number instead of kAliHLTComponentDataTypefOriginSize to avoid including AliHLTDataTypes.h |
68 | static Int_t DdlIDFromHLTBlockData(const char dataorigin[4], UInt_t specification); | |
eb8e9901 | 69 | |
7c4d1228 | 70 | static AliHLTDAQ* GetInstance(); |
71 | ||
72 | private: | |
84221957 | 73 | virtual Int_t VirtNumberOfDetectors()=0; |
74 | ||
7c4d1228 | 75 | virtual Int_t VirtDetectorID(const char *detectorName)=0; |
76 | virtual const char *VirtDetectorName(Int_t detectorID)=0; | |
77 | ||
78 | virtual Int_t VirtDdlIDOffset(const char *detectorName)=0; | |
79 | virtual Int_t VirtDdlIDOffset(Int_t detectorID)=0; | |
80 | ||
81 | virtual const char *VirtDetectorNameFromDdlID(Int_t ddlID, Int_t &ddlIndex)=0; | |
82 | virtual Int_t VirtDetectorIDFromDdlID(Int_t ddlID, Int_t &ddlIndex)=0; | |
83 | ||
84 | virtual Int_t VirtDdlID(const char *detectorName, Int_t ddlIndex)=0; | |
85 | virtual Int_t VirtDdlID(Int_t detectorID, Int_t ddlIndex)=0; | |
86 | virtual const char *VirtDdlFileName(const char *detectorName, Int_t ddlIndex)=0; | |
87 | virtual const char *VirtDdlFileName(Int_t detectorID, Int_t ddlIndex)=0; | |
88 | ||
89 | virtual Int_t VirtNumberOfDdls(const char *detectorName)=0; | |
90 | virtual Int_t VirtNumberOfDdls(Int_t detectorID)=0; | |
91 | ||
84221957 | 92 | virtual const char *VirtListOfTriggeredDetectors(UInt_t detectorPattern)=0; |
93 | virtual UInt_t VirtDetectorPattern(const char *detectorList)=0; | |
94 | ||
95 | virtual const char *VirtOfflineModuleName(const char *detectorName)=0; | |
96 | virtual const char *VirtOfflineModuleName(Int_t detectorID)=0; | |
97 | ||
98 | virtual const char *VirtOnlineName(const char *detectorName)=0; | |
99 | virtual const char *VirtOnlineName(Int_t detectorID)=0; | |
100 | ||
7c4d1228 | 101 | /** global instance */ |
102 | static AliHLTDAQ* fgpInstance; //! | |
103 | ||
104 | /** the name of the actual implementation */ | |
105 | static const char* fgkImplName; //! | |
106 | ||
107 | /** the library of the implementation */ | |
108 | static const char* fgkImplLibrary; //! | |
eb8e9901 | 109 | |
110 | /// mapping between HLT data origin and AliDAQ detector number | |
111 | static const char* fgkOriginMapping[]; //! | |
7c4d1228 | 112 | }; |
113 | ||
114 | #endif //AliHLTDAQ |