* TCPDumpSubscriber for the Common Data Header (CDH) and readout
* list information.
* 17 New CDH v3 (10 32bit words, 100 trigger classes, etc.)
+ * 18 Added AD detector in AliHLTEventDDLV2
*/
-#define ALIHLT_DATA_TYPES_VERSION 17
+#define ALIHLT_DATA_TYPES_VERSION 18
//////////////////////////////////////////////////////////////////////////
//
/** size of the DDL list after DCAL added to EMCAL */
const int gkAliHLTDDLListSizeV1 = 31;
+ /** size of the DDL list with AD */
+ const int gkAliHLTDDLListSizeV2 =32;
+
/** size of the DDL list */
- const int gkAliHLTDDLListSize = gkAliHLTDDLListSizeV1;
+ const int gkAliHLTDDLListSize = gkAliHLTDDLListSizeV2;
/** Number of Trigger Classes of CTP in CDH */
const int gkNCTPTriggerClassesV2 = 50;
AliHLTUInt32_t fList[gkAliHLTDDLListSizeV1]; /// The list of DDL enable/disable bits.
};
+ /**
+ * @struct AliHLTEventDDLV2
+ * DDL list event structure with extra word for AD bits.
+ */
+ struct AliHLTEventDDLV2
+ {
+ AliHLTUInt32_t fCount; /// Indicates the number of words in fList.
+ AliHLTUInt32_t fList[gkAliHLTDDLListSizeV2]; /// The list of DDL enable/disable bits.
+ };
+
/**
* @typedef AliHLTEventDDL
* Current used default version of the AliHLTEventDDL structure.
*/
- typedef AliHLTEventDDLV1 AliHLTEventDDL;
+ typedef AliHLTEventDDLV2 AliHLTEventDDL;
/**
* @struct AliHLTEventTriggerData
AliHLTEventDDL fReadoutList; /// The default readout list structure.
AliHLTEventDDLV0 fReadoutListV0; /// Access to the old version of the readout list structure.
AliHLTEventDDLV1 fReadoutListV1; /// Access to the readout list structure with DCAL included.
+ AliHLTEventDDLV2 fReadoutListV2; /// Access to the readout list structure with AD included.
};
};
case kTRG: return "kTRG";
case kEMCAL: return "kEMCAL";
case kDAQTEST: return "kDAQTEST";
+ case kAD: return "kAD";
case kHLT: return "kHLT";
case kALLDET: return "kALLDET";
default: return "UNKNOWN!";
if (str == "TRG") enabledDetectors |= kTRG;
if (str == "EMCAL") enabledDetectors |= kEMCAL;
if (str == "DAQTEST") enabledDetectors |= kDAQTEST;
+ if (str == "AD") enabledDetectors |= kAD;
if (str == "HLT") enabledDetectors |= kHLT;
if (str == "ALL") enabledDetectors |= kALLDET;
}
// the overlapping part of the list.
if (list.fCount == (unsigned)gkAliHLTDDLListSizeV0)
{
- memcpy(&fReadoutList.fList[0], &list.fList[0], sizeof(AliHLTUInt32_t)*28);
- memcpy(&fReadoutList.fList[29], &list.fList[28], sizeof(AliHLTUInt32_t)*2);
+ memcpy(&fReadoutList.fList[0], &list.fList[0], sizeof(AliHLTUInt32_t)*28); //up to EMCAL
+ //fReadoutList.fList[28] = 0x0; //by construction
+ fReadoutList.fList[29] = list.fList[28]; //DAQTEST
+ fReadoutList.fList[30] = 0x0; //AD
+ fReadoutList.fList[31] = list.fList[29]; //HLT
}
else if (list.fCount == (unsigned)gkAliHLTDDLListSizeV1)
+ {
+ memcpy(&fReadoutList.fList[0], &list.fList[0], sizeof(AliHLTUInt32_t)*30); //up to DAQTEST
+ fReadoutList.fList[31] = list.fList[30]; //HLT
+ fReadoutList.fList[30] = 0x0; //AD
+ }
+ else if (list.fCount == (unsigned)gkAliHLTDDLListSizeV2)
{
memcpy(&fReadoutList, &list, sizeof(AliHLTEventDDL));
}
#if 1 // ROOT_SVN_REVISION < 9999 //FIXME: after fixed https://savannah.cern.ch/bugs/?69241
// Check if we need to convert to new format and do so.
- if (fReadoutList.fCount == (unsigned)gkAliHLTDDLListSizeV0)
+ if (fReadoutList.fCount != (unsigned)gkAliHLTDDLListSize)
{
fReadoutList.fCount = gkAliHLTDDLListSize;
}
if (ddlNum >= 32) return false; // only have 1 32-bit word.
wordIndex = 29;
break;
- case 30: // HLT
+ case 20: // AD
if (ddlNum >= 32) return false; // only have 1 32-bit word.
- // the HLT bitfield is in the last word
+ // 1 word for AD, 1 DDL
wordIndex = 30;
break;
+ case 31: // HLT
+ if (ddlNum >= 32) return false; // only have 1 32-bit word.
+ // the HLT bitfield is in the last word
+ wordIndex = 31;
+ break;
default:
return false;
}
- if (ddlNum >= AliHLTDAQ::NumberOfDdls(detNum == 30 ? 20 : detNum)) return false;
+ if (ddlNum >= AliHLTDAQ::NumberOfDdls(detNum == 31 ? 20 : detNum)) return false;
// The bit index within the word indicated by wordIndex.
bitIndex = ddlNum % 32;
--wordIndex;
}
}
+ else if ( fReadoutList.fCount == (unsigned)gkAliHLTDDLListSizeV1 )
+ {
+ if (wordIndex == 30) { return kFALSE; } //there is no AD in V1
+ if (wordIndex == 31) { wordIndex = 30; } //HLT is at word 30 in V1
+ }
#endif
return ((fReadoutList.fList[wordIndex] >> bitIndex) & 0x1) == 0x1;
#if 1 // ROOT_SVN_REVISION < 9999 //FIXME: after fixed https://savannah.cern.ch/bugs/?69241
// Check if we need to convert to new format and do so.
- if (fReadoutList.fCount == (unsigned)gkAliHLTDDLListSizeV0)
+ if (fReadoutList.fCount != (unsigned)gkAliHLTDDLListSize)
{
AliHLTEventDDL copy = fReadoutList;
FillStruct(copy);
fReadoutList.fList[28] = 0x00003FFF;
}
if ((detector & kDAQTEST) != 0) fReadoutList.fList[29] = 0x00000001;
- if ((detector & kHLT) != 0) fReadoutList.fList[30] = 0x0FFFFFFF;
+ if ((detector & kAD) != 0) fReadoutList.fList[30] = 0x00000001;
+ if ((detector & kHLT) != 0) fReadoutList.fList[31] = 0x0FFFFFFF;
}
#if 1 // ROOT_SVN_REVISION < 9999 //FIXME: after fixed https://savannah.cern.ch/bugs/?69241
// Check if we need to convert to new format and do so.
- if (fReadoutList.fCount == (unsigned)gkAliHLTDDLListSizeV0)
+ if (fReadoutList.fCount != (unsigned)gkAliHLTDDLListSize)
{
AliHLTEventDDL copy = fReadoutList;
FillStruct(copy);
fReadoutList.fList[28] = 0x00000000;
}
if ((detector & kDAQTEST) != 0) fReadoutList.fList[29] = 0x00000000;
- if ((detector & kHLT) != 0) fReadoutList.fList[30] = 0x00000000;
+ if ((detector & kAD) != 0) fReadoutList.fList[30] = 0x00000000;
+ if ((detector & kHLT) != 0) fReadoutList.fList[31] = 0x00000000;
}
if ((detector & kDAQTEST) != 0) result &= fReadoutList.fList[28] == 0x00000001;
if ((detector & kHLT) != 0) result &= fReadoutList.fList[29] == 0x000003FF;
}
- else
+ else if (fReadoutList.fCount == (unsigned)gkAliHLTDDLListSizeV1)
+ {
+ if ((detector & kEMCAL) != 0)
+ {
+ result &= fReadoutList.fList[27] == 0xFFFFFFFF;
+ result &= fReadoutList.fList[28] == 0x00003FFF;
+ }
+ if ((detector & kDAQTEST) != 0) result &= fReadoutList.fList[29] == 0x00000001;
+ if ((detector & kHLT) != 0) result &= fReadoutList.fList[30] == 0x0FFFFFFF;
+ }
+ else if (fReadoutList.fCount == (unsigned)gkAliHLTDDLListSizeV2)
#endif
{
if ((detector & kEMCAL) != 0)
result &= fReadoutList.fList[28] == 0x00003FFF;
}
if ((detector & kDAQTEST) != 0) result &= fReadoutList.fList[29] == 0x00000001;
- if ((detector & kHLT) != 0) result &= fReadoutList.fList[30] == 0x0FFFFFFF;
+ if ((detector & kAD) != 0) result &= fReadoutList.fList[30] == 0x00000001;
+ if ((detector & kHLT) != 0) result &= fReadoutList.fList[31] == 0x0FFFFFFF;
}
return result;
if ((detector & kDAQTEST) != 0) result &= fReadoutList.fList[28] == 0x00000000;
if ((detector & kHLT) != 0) result &= fReadoutList.fList[29] == 0x00000000;
}
- else
-#endif
+ else if (fReadoutList.fCount == (unsigned)gkAliHLTDDLListSizeV1)
{
if ((detector & kEMCAL) != 0)
{
if ((detector & kDAQTEST) != 0) result &= fReadoutList.fList[29] == 0x00000000;
if ((detector & kHLT) != 0) result &= fReadoutList.fList[30] == 0x00000000;
}
+ else if (fReadoutList.fCount == (unsigned)gkAliHLTDDLListSizeV2)
+#endif
+ {
+ if ((detector & kEMCAL) != 0)
+ {
+ result &= fReadoutList.fList[27] == 0x00000000;
+ result &= fReadoutList.fList[28] == 0x00000000;
+ }
+ if ((detector & kDAQTEST) != 0) result &= fReadoutList.fList[29] == 0x00000000;
+ if ((detector & kAD) != 0) result &= fReadoutList.fList[30] == 0x00000000;
+ if ((detector & kHLT) != 0) result &= fReadoutList.fList[31] == 0x00000000;
+ }
return result;
}
case kZDC: return 24;
case kACORDE: return 25;
case kTRG: return 26;
- case kEMCAL: return 27;
- case kDAQTEST: return 29;
- case kHLT: return 30;
+ case kEMCAL: return 27;
+ case kDAQTEST: return 29; //V0:28
+ case kAD: return 30;
+ case kHLT: return 31; //V0:29 V1:30
default: return -1;
}
}
case kTRG: return 1;
case kEMCAL: return 2;
case kDAQTEST: return 1;
+ case kAD: return 1;
case kHLT: return 1;
default: return 0;
}
case 27: return kEMCAL;
case 28: return kEMCAL;
case 29: return kDAQTEST;
- case 30: return kHLT;
+ case 30: return kAD;
+ case 31: return kHLT;
default: return kNoDetector;
}
}
if (startAfter < kDAQTEST and fReadoutList.fList[28] != 0x00000000) return kDAQTEST;
if (startAfter < kHLT and fReadoutList.fList[29] != 0x00000000) return kHLT;
}
- else
-#endif
+ else if (fReadoutList.fCount == (unsigned)gkAliHLTDDLListSizeV1)
{
if (startAfter < kEMCAL and fReadoutList.fList[28] != 0x00000000) return kEMCAL;
if (startAfter < kDAQTEST and fReadoutList.fList[29] != 0x00000000) return kDAQTEST;
if (startAfter < kHLT and fReadoutList.fList[30] != 0x00000000) return kHLT;
}
+ else if (fReadoutList.fCount == (unsigned)gkAliHLTDDLListSizeV2)
+#endif
+ {
+ if (startAfter < kEMCAL and fReadoutList.fList[28] != 0x00000000) return kEMCAL;
+ if (startAfter < kDAQTEST and fReadoutList.fList[29] != 0x00000000) return kDAQTEST;
+ if (startAfter < kAD and fReadoutList.fList[30] != 0x00000000) return kAD;
+ if (startAfter < kHLT and fReadoutList.fList[31] != 0x00000000) return kHLT;
+ }
return kNoDetector;
}
if (nonefound) cout << " none";
cout << endl;
}
+ printf("readout list in hex:");
+ for (unsigned int i=0; i<fReadoutList.fCount; i++)
+ {
+ printf(" %x", fReadoutList.fList[i]);
+ }
+ printf("\n");
}
readoutlist.fReadoutList.fList[27] = 0x00FFFFFF & (~fReadoutList.fList[27]);
readoutlist.fReadoutList.fList[28] = 0x00000000;
readoutlist.fReadoutList.fList[29] = 0x00000001 & (~fReadoutList.fList[28]);
- readoutlist.fReadoutList.fList[30] = 0x000003FF & (~fReadoutList.fList[29]);
+ readoutlist.fReadoutList.fList[30] = 0x00000000;
+ readoutlist.fReadoutList.fList[31] = 0x000003FF & (~fReadoutList.fList[29]);
}
- else
+ else if (fReadoutList.fCount == (unsigned)gkAliHLTDDLListSizeV1)
#endif
{
readoutlist.fReadoutList.fList[27] = 0xFFFFFFFF & (~fReadoutList.fList[27]);
readoutlist.fReadoutList.fList[28] = 0x00003FFF & (~fReadoutList.fList[28]);
readoutlist.fReadoutList.fList[29] = 0x00000001 & (~fReadoutList.fList[29]);
+ readoutlist.fReadoutList.fList[30] = 0x00000000;
readoutlist.fReadoutList.fList[30] = 0x0FFFFFFF & (~fReadoutList.fList[30]);
}
+ else if (fReadoutList.fCount == (unsigned)gkAliHLTDDLListSizeV2)
+ {
+ readoutlist.fReadoutList.fList[27] = 0xFFFFFFFF & (~fReadoutList.fList[27]);
+ readoutlist.fReadoutList.fList[28] = 0x00003FFF & (~fReadoutList.fList[28]);
+ readoutlist.fReadoutList.fList[29] = 0x00000001 & (~fReadoutList.fList[29]);
+ readoutlist.fReadoutList.fList[30] = 0x00000001 & (~fReadoutList.fList[30]);
+ readoutlist.fReadoutList.fList[31] = 0x0FFFFFFF & (~fReadoutList.fList[31]);
+ }
return readoutlist;
}
// Convert old structure to new version if necessary.
if (fReadoutList.fCount == (unsigned)gkAliHLTDDLListSizeV0)
{
- fReadoutList.fList[30] = fReadoutList.fList[29];
+ fReadoutList.fList[31] = fReadoutList.fList[29];
fReadoutList.fList[29] = fReadoutList.fList[28];
- fReadoutList.fList[28] = 0x0;
- fReadoutList.fCount = gkAliHLTDDLListSizeV1;
+ fReadoutList.fList[30] = 0x0;
+ fReadoutList.fCount = gkAliHLTDDLListSizeV2;
+ }
+ else if (fReadoutList.fCount == (unsigned)gkAliHLTDDLListSizeV1)
+ {
+ fReadoutList.fList[31] = fReadoutList.fList[30]; //move HLT from 30 to 31
+ fReadoutList.fList[30] = 0x0; //set AD to 0
+ fReadoutList.fCount = gkAliHLTDDLListSizeV2;
}
} else {
R__b.WriteClassBuffer(AliHLTReadoutList::Class(),this);
#pragma link C++ class AliHLTReadoutList+;
// Do nothing special with schema evolution for new versions of the readout list.
-#pragma read sourceClass="AliHLTReadoutList" version="[3-]" targetClass="AliHLTReadoutList"
+#pragma read sourceClass="AliHLTReadoutList" version="[4-]" targetClass="AliHLTReadoutList"
// For old versions we need to convert the format of the readout list into the new one.
+#pragma read sourceClass="AliHLTReadoutList" version="[3]" targetClass="AliHLTReadoutList"\
+ source="AliHLTEventDDL fReadoutList" target="fReadoutList"\
+ code="{\
+ fReadoutList.fCount = gkAliHLTDDLListSize;\
+ for (int i = 0; i<30; ++i) fReadoutList.fList[i] = onfile.fReadoutList.fList[i];\
+ fReadoutList.fList[30] = 0x0;\
+ fReadoutList.fList[31] = onfile.fReadoutList.fList[30];\
+ }"
#pragma read sourceClass="AliHLTReadoutList" version="[1-2]" targetClass="AliHLTReadoutList"\
source="AliHLTEventDDL fReadoutList" target="fReadoutList"\
code="{\
- fReadoutList.fCount = gkAliHLTDDLListSize;\
- for (int i = 0; i < 28; ++i) fReadoutList.fList[i] = onfile.fReadoutList.fList[i];\
- fReadoutList.fList[28] = 0x0;\
- for (int i = 29; i < gkAliHLTDDLListSize; ++i) fReadoutList.fList[i] = onfile.fReadoutList.fList[i-1];\
+ fReadoutList.fCount = gkAliHLTDDLListSize;\
+ for (int i = 0; i < 28; ++i) fReadoutList.fList[i] = onfile.fReadoutList.fList[i];\
+ fReadoutList.fList[28] = 0x0;\
+ fReadoutList.fList[29] = onfile.fReadoutList.fList[28];\
+ fReadoutList.fList[30] = 0x0;\
+ fReadoutList.fList[31] = onfile.fReadoutList.fList[29];\
}"
#endif // ROOT version check
#pragma link C++ struct AliHLTComponentEventData+;
#pragma link C++ struct AliHLTComponentBlockData+;
#pragma link C++ struct AliHLTComponentDataType+;
+#pragma link C++ struct AliHLTEventDDLV0+; // Only added to have proper dictionary generation and ROOT I/O for AliHLTReadoutList class.
#pragma link C++ struct AliHLTEventDDLV1+; // Only added to have proper dictionary generation and ROOT I/O for AliHLTReadoutList class.
+#pragma link C++ struct AliHLTEventDDLV2+; // Only added to have proper dictionary generation and ROOT I/O for AliHLTReadoutList class.
#pragma link C++ struct AliHLTRunDesc+;
#pragma link C++ struct AliHLTComponentStatistics+;
#pragma link C++ struct AliHLTComponentTableEntry;