+ if (!fgpInstance) GetInstance();
+ if (fgpInstance) return fgpInstance->VirtListOfTriggeredDetectors(detectorPattern);
+ return NULL;
+}
+
+UInt_t AliHLTDAQ::DetectorPattern(const char *detectorList)
+{
+ // see header file for class documentation
+ if (!fgpInstance) GetInstance();
+ if (fgpInstance) return fgpInstance->VirtDetectorPattern(detectorList);
+ return 0;
+}
+
+const char *AliHLTDAQ::OfflineModuleName(const char *detectorName)
+{
+ // see header file for class documentation
+ if (!fgpInstance) GetInstance();
+ if (fgpInstance) return fgpInstance->VirtOfflineModuleName(detectorName);
+ return NULL;
+}
+const char *AliHLTDAQ::OfflineModuleName(Int_t detectorID)
+{
+ // see header file for class documentation
+ if (!fgpInstance) GetInstance();
+ if (fgpInstance) return fgpInstance->VirtOfflineModuleName(detectorID);
+ return NULL;
+}
+
+const char *AliHLTDAQ::OnlineName(const char *detectorName)
+{
+ // see header file for class documentation
+ if (!fgpInstance) GetInstance();
+ if (fgpInstance) return fgpInstance->VirtOnlineName(detectorName);
+ return NULL;
+}
+const char *AliHLTDAQ::OnlineName(Int_t detectorID)
+{
+ // see header file for class documentation
+ if (!fgpInstance) GetInstance();
+ if (fgpInstance) return fgpInstance->VirtOnlineName(detectorID);
+ return NULL;
+}
+
+string AliHLTDAQ::HLTOrigin(const char *detectorName)
+{
+ // get HLT origin from detector name
+ return HLTOrigin(DetectorID(detectorName));
+}
+
+string AliHLTDAQ::HLTOrigin(Int_t detectorID)
+{
+ // get HLT origin from detector ID
+ string origin;
+ if (detectorID>=0 && (unsigned)detectorID<sizeof(fgkOriginMapping)/sizeof(const char*)) {
+ origin.append(fgkOriginMapping[detectorID], kAliHLTComponentDataTypefOriginSize);
+ }
+ return origin;
+}
+
+string AliHLTDAQ::HLTSpecificationFromDdlID(Int_t ddlID)
+{
+ // get the HLT data specification from equipment id
+ string result = "";
+ Int_t ddlIndex=0;
+ Int_t detectorID = DetectorIDFromDdlID(ddlID, ddlIndex);
+ if (detectorID < 0)
+ return result;
+ Int_t TPCID = DetectorID("TPC");
+ const int strtmplength=11;
+ char strtmp[strtmplength];
+ memset(strtmp, 0, strtmplength);
+ if (detectorID == TPCID) {
+ int partition;
+ int slice;
+ if (ddlID < 840) {
+ partition = ddlID % 2;
+ slice = (ddlID - 768) / 2;
+ } else {
+ partition = (ddlID % 4) + 2;
+ slice = (ddlID - 840) / 4;
+ }
+ snprintf(strtmp, strtmplength, "0x%02x%02x%02x%02x", slice, slice, partition, partition);
+ result = strtmp;
+ }
+ else if (detectorID == DetectorID("TOF")) {
+ AliHLTLogging log;
+ log.Logging(kHLTLogWarning, "AliHLTDAQ::HLTSpecificationFromDdlID", "HLT Analysis", "Mapping of data specification not implemented for TOF");
+ }
+ else { // default
+ snprintf(strtmp, strtmplength, "0x%08x", 0x1 << ddlIndex);
+ result = strtmp;
+ }
+ return result;
+}
+
+Int_t AliHLTDAQ::DdlIDFromHLTBlockData(const char dataorigin[kAliHLTComponentDataTypefOriginSize], UInt_t specification)
+{
+ // get the DDL ID (global equipment ID) from HLT origin and data specification
+ Int_t detectorID=DetectorIDFromHLTOrigin(dataorigin);
+ if (detectorID<0) return -1;
+ Int_t ddlID=DdlIDOffset(detectorID);
+ if (ddlID<0) return -1;
+
+ if (detectorID == DetectorID("TPC")) {
+ int minPartition= specification &0xff;
+ int maxPartition=(specification>>8) &0xff;
+ int minSlice =(specification>>16)&0xff;
+ int maxSlice =(specification>>24)&0xff;
+ if (minPartition<0 || minPartition>5 ||
+ maxPartition<0 || maxPartition>5 ||
+ minSlice<0 || minSlice>35 ||
+ maxSlice<0 || maxSlice>35) {
+ AliHLTLogging log;
+ log.Logging(kHLTLogError, "AliHLTDAQ::DdlID", "HLT Analysis", "invalid data specification 0x%08x", specification);
+ return -1;
+ }
+ else if (minPartition!=maxPartition ||
+ minSlice!=maxSlice) {
+ AliHLTLogging log;
+ log.Logging(kHLTLogError, "AliHLTDAQ::DdlID", "HLT Analysis", "ambiguous data specification 0x%08x", specification);
+ return -1;
+ }
+ if (minPartition<2) ddlID+=2*minSlice+minPartition; // inner sector
+ else ddlID+=4*minSlice+(minPartition-2)+72; // outer sector
+ }
+ else if (detectorID == DetectorID("TOF")) {