]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - RAW/AliDAQ.cxx
- Introducing more functions and simplified usage
[u/mrichter/AliRoot.git] / RAW / AliDAQ.cxx
index c9c6a9c138da8e3db34cf7ca0fca2a422b19e902..c8dedfb3d19c3b077146686946decde395d047b3 100644 (file)
@@ -63,6 +63,7 @@ const char* AliDAQ::fgkDetectorName[AliDAQ::kNDetectors] = {
   "ACORDE",
   "TRG",
   "EMCAL",
+  "DAQ_TEST",
   "HLT"
 };
 
@@ -86,6 +87,7 @@ Int_t AliDAQ::fgkNumberOfDdls[AliDAQ::kNDetectors] = {
   1,
   1,
   24,
+  1,
   10
 };
 
@@ -109,6 +111,7 @@ Float_t AliDAQ::fgkNumberOfLdcs[AliDAQ::kNDetectors] = {
   1,
   1,
   4,
+  1,
   5
 };
 
@@ -176,6 +179,9 @@ Int_t AliDAQ::DdlIDOffset(Int_t detectorID)
     AliErrorClass(Form("Invalid detector index: %d (%d -> %d) !",detectorID,0,kNDetectors-1));
     return -1;
   }
+  // HLT has a DDL offset = 30
+  if (detectorID == (kNDetectors-1)) return (kHLTId << 8);
+
   return (detectorID << 8);
 }
 
@@ -198,6 +204,10 @@ Int_t AliDAQ::DetectorIDFromDdlID(Int_t ddlID,Int_t &ddlIndex)
   // detector range for
   // a given input DDL ID
   Int_t detectorID = ddlID >> 8;
+
+  // HLT
+  if (detectorID == kHLTId) detectorID = kNDetectors-1;
+
   if (detectorID < 0 || detectorID >= kNDetectors) {
     AliErrorClass(Form("Invalid detector index: %d (%d -> %d) !",detectorID,0,kNDetectors-1));
     return -1;
@@ -273,7 +283,9 @@ const char *AliDAQ::DdlFileName(Int_t detectorID, Int_t ddlIndex)
   }
 
   ddlID += ddlIndex;
-  TString fileName = DetectorName(detectorID);
+  static TString fileName;
+
+  fileName = DetectorName(detectorID);
   fileName += "_";
   fileName += ddlID;
   fileName += ".ddl";