]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - RAW/AliDAQ.cxx
Method to get a string with the trigger detectors is added.
[u/mrichter/AliRoot.git] / RAW / AliDAQ.cxx
index c8dedfb3d19c3b077146686946decde395d047b3..d27feb9e3404eb784fc2c0a5f761592ae9048626 100644 (file)
@@ -354,3 +354,26 @@ void AliDAQ::PrintConfig()
   printf("====================================================================\n");
 
 }
+
+const char *AliDAQ::ListOfTriggeredDetectors(Int_t detectorPattern)
+{
+  // Returns a string with the list of
+  // active detectors. The input is the
+  // trigger pattern word contained in
+  // the raw-data event header.
+
+  static TString detList;
+  detList = "";
+  for(Int_t iDet = 0; iDet < (kNDetectors-1); iDet++) {
+    if ((detectorPattern >> iDet) & 0x1) {
+      detList += fgkDetectorName[iDet];
+      detList += " ";
+    }
+  }
+
+  // Always remember HLT
+  if ((detectorPattern >> kHLTId) & 0x1) detList += fgkDetectorName[kNDetectors-1];
+
+  return detList.Data();
+}
+