Update (Zaida)
[u/mrichter/AliRoot.git] / HLT / BASE / AliHLTDAQ.h
CommitLineData
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 */
28class 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);
eb8e9901 36 static const char *DetectorName(const char dataorigin[4]);
7c4d1228 37
38 static Int_t DdlIDOffset(const char *detectorName);
39 static Int_t DdlIDOffset(Int_t detectorID);
40
41 static const char *DetectorNameFromDdlID(Int_t ddlID, Int_t &ddlIndex);
42 static Int_t DetectorIDFromDdlID(Int_t ddlID, Int_t &ddlIndex);
43
44 static Int_t DdlID(const char *detectorName, Int_t ddlIndex);
45 static Int_t DdlID(Int_t detectorID, Int_t ddlIndex);
46 static const char *DdlFileName(const char *detectorName, Int_t ddlIndex);
47 static const char *DdlFileName(Int_t detectorID, Int_t ddlIndex);
48
49 static Int_t NumberOfDdls(const char *detectorName);
50 static Int_t NumberOfDdls(Int_t detectorID);
51
84221957 52 static const char *ListOfTriggeredDetectors(UInt_t detectorPattern);
53 static UInt_t DetectorPattern(const char *detectorList);
54
55 static const char *OfflineModuleName(const char *detectorName);
56 static const char *OfflineModuleName(Int_t detectorID);
57
58 static const char *OnlineName(const char *detectorName);
59 static const char *OnlineName(Int_t detectorID);
60
eb8e9901 61 static std::string HLTOrigin(const char *detectorName);
62 static std::string HLTOrigin(Int_t detectorID);
41f65320 63
64 static std::string HLTSpecificationFromDdlID(Int_t ddlID);
eb8e9901 65
7c4d1228 66 static AliHLTDAQ* GetInstance();
67
68 private:
84221957 69 virtual Int_t VirtNumberOfDetectors()=0;
70
7c4d1228 71 virtual Int_t VirtDetectorID(const char *detectorName)=0;
72 virtual const char *VirtDetectorName(Int_t detectorID)=0;
73
74 virtual Int_t VirtDdlIDOffset(const char *detectorName)=0;
75 virtual Int_t VirtDdlIDOffset(Int_t detectorID)=0;
76
77 virtual const char *VirtDetectorNameFromDdlID(Int_t ddlID, Int_t &ddlIndex)=0;
78 virtual Int_t VirtDetectorIDFromDdlID(Int_t ddlID, Int_t &ddlIndex)=0;
79
80 virtual Int_t VirtDdlID(const char *detectorName, Int_t ddlIndex)=0;
81 virtual Int_t VirtDdlID(Int_t detectorID, Int_t ddlIndex)=0;
82 virtual const char *VirtDdlFileName(const char *detectorName, Int_t ddlIndex)=0;
83 virtual const char *VirtDdlFileName(Int_t detectorID, Int_t ddlIndex)=0;
84
85 virtual Int_t VirtNumberOfDdls(const char *detectorName)=0;
86 virtual Int_t VirtNumberOfDdls(Int_t detectorID)=0;
87
84221957 88 virtual const char *VirtListOfTriggeredDetectors(UInt_t detectorPattern)=0;
89 virtual UInt_t VirtDetectorPattern(const char *detectorList)=0;
90
91 virtual const char *VirtOfflineModuleName(const char *detectorName)=0;
92 virtual const char *VirtOfflineModuleName(Int_t detectorID)=0;
93
94 virtual const char *VirtOnlineName(const char *detectorName)=0;
95 virtual const char *VirtOnlineName(Int_t detectorID)=0;
96
7c4d1228 97 /** global instance */
98 static AliHLTDAQ* fgpInstance; //!
99
100 /** the name of the actual implementation */
101 static const char* fgkImplName; //!
102
103 /** the library of the implementation */
104 static const char* fgkImplLibrary; //!
eb8e9901 105
106 /// mapping between HLT data origin and AliDAQ detector number
107 static const char* fgkOriginMapping[]; //!
7c4d1228 108};
109
110#endif //AliHLTDAQ