4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
7 //////////////////////////////////////////////////////////////////////////////
9 // The AliDAQ class is responsible for handling all the information about //
10 // Data Acquisition configuration. It defines the detector indexing, //
11 // the number of DDLs and LDCs per detector. //
12 // The number of LDCs per detector is used only in the simulation in order //
13 // to define the configuration of the dateStream application. Therefore the //
14 // numbers in the corresponding array can be changed without affecting the //
15 // rest of the aliroot code. //
16 // The equipment ID (DDL ID) is an integer (32-bit) number defined as: //
17 // Equipment ID = (detectorID << 8) + DDLIndex //
18 // where the detectorID is given by fgkDetectorName array and DDLIndex is //
19 // the index of the corresponding DDL inside the detector partition. //
20 // Due to DAQ/HLT limitations, the ddl indexes should be consequtive, or //
21 // at least without big gaps in between. //
22 // The sub-detector code use only this class in the simulation and reading //
23 // of the raw data. //
25 // cvetan.cheshkov@cern.ch 2006/06/09 //
27 //////////////////////////////////////////////////////////////////////////////
31 class AliDAQ: public TObject {
35 AliDAQ(const AliDAQ& source);
36 AliDAQ& operator = (const AliDAQ& source);
39 static Int_t DetectorID(const char *detectorName);
40 static const char *DetectorName(Int_t detectorID);
42 static Int_t DdlIDOffset(const char *detectorName);
43 static Int_t DdlIDOffset(Int_t detectorID);
45 static const char *DetectorNameFromDdlID(Int_t ddlID, Int_t &ddlIndex);
46 static Int_t DetectorIDFromDdlID(Int_t ddlID, Int_t &ddlIndex);
48 static Int_t DdlID(const char *detectorName, Int_t ddlIndex);
49 static Int_t DdlID(Int_t detectorID, Int_t ddlIndex);
50 static const char *DdlFileName(const char *detectorName, Int_t ddlIndex);
51 static const char *DdlFileName(Int_t detectorID, Int_t ddlIndex);
53 static Int_t NumberOfDdls(const char *detectorName);
54 static Int_t NumberOfDdls(Int_t detectorID);
56 static Float_t NumberOfLdcs(const char *detectorName);
57 static Float_t NumberOfLdcs(Int_t detectorID);
59 static void PrintConfig();
61 static const char *ListOfTriggeredDetectors(UInt_t detectorPattern);
62 static UInt_t DetectorPattern(const char *detectorList);
64 static const char *OfflineModuleName(const char *detectorName);
65 static const char *OfflineModuleName(Int_t detectorID);
67 static const char *OnlineName(const char *detectorName);
68 static const char *OnlineName(Int_t detectorID);
71 kNDetectors = 21, // Number of detectors
72 kHLTId = 30 // HLT detector index
77 static const char *fgkDetectorName[kNDetectors]; // Detector names
78 static Int_t fgkNumberOfDdls[kNDetectors]; // Number of DDLs per detector
79 static Float_t fgkNumberOfLdcs[kNDetectors]; // Number of LDCs per detector (not fixed - used only for the raw data simulation)
80 static const char* fgkOfflineModuleName[kNDetectors]; // Names of the offline modules corresponding to the detectors
81 static const char* fgkOnlineName[kNDetectors]; // Online (DAQ/ECS) detector names
83 ClassDef(AliDAQ, 3) // ALICE DAQ Configuration class