AliHLTReadoutList::AliHLTReadoutList() :
- TObject(),
+ TNamed("AliHLTReadoutList", "Readout list object used for manipulating and storing an AliHLTEventDDL structure."),
fReadoutList()
{
// Default constructor.
AliHLTReadoutList::AliHLTReadoutList(Int_t enabledDetectors) :
- TObject(),
+ TNamed("AliHLTReadoutList", "Readout list object used for manipulating and storing an AliHLTEventDDL structure."),
fReadoutList()
{
// Constructor to select which detectors to enable for readout.
AliHLTReadoutList::AliHLTReadoutList(const char* enabledList) :
- TObject(),
+ TNamed("AliHLTReadoutList", "Readout list object used for manipulating and storing an AliHLTEventDDL structure."),
fReadoutList()
{
// Constructor to select which detectors and DDLs to enable for readout.
AliHLTReadoutList::AliHLTReadoutList(const AliHLTEventDDL& list) :
- TObject(),
+ TNamed("AliHLTReadoutList", "Readout list object used for manipulating and storing an AliHLTEventDDL structure."),
fReadoutList()
{
// Constructor to create readout list from AliHLTEventDDL structure.
AliHLTReadoutList::AliHLTReadoutList(const AliHLTReadoutList& list) :
- TObject(list),
+ TNamed(list),
fReadoutList()
{
// Copy constructor performs a deep copy.
Int_t detNum = ddlId >> 8;
Int_t ddlNum = ddlId & 0xFF;
- if (detNum < 3)
+ switch (detNum)
{
+ case 0: // SPD
+ case 1: // SDD
+ case 2: // SSD
+ if (ddlNum >= 32) return false; // only have 1 32-bit word.
// the 3 ITS detectors have one word each
wordIndex = detNum;
- }
- else if (detNum == 3)
- {
+ break;
+ case 3: // TPC
// the TPC bitfield has in total 8 words
wordIndex = detNum + (ddlNum >> 5);
- }
- else if (detNum == 4)
- {
- // the TRD bitfield starts at position 11 (3 ITS + 8 TPC)
- wordIndex = detNum + 7;
- }
- else if (detNum == 5)
- {
+ break;
+ case 4: // TRD
+ if (ddlNum >= 32) return false; // only have 1 32-bit word.
+ // the TRD bitfield starts at word 11 (3 words ITS + 8 words TPC)
+ wordIndex = 11;
+ break;
+ case 5: // TOF
+ if (ddlNum >= 3*32) return false; // only have 3 32-bit words.
// TOF has 72 DDLs, the bitfield is 3 words starting at position 12
- wordIndex = detNum + 7 + (ddlNum >> 5);
- }
- else if (detNum == 30)
- {
- // the HLT bitfield is in the last word
- wordIndex = 29;
- }
- else
- {
- // all other detectors fit into one word, the offset is due to
+ wordIndex = 12 + (ddlNum >> 5);
+ break;
+ case 6: // HMPID
+ case 7: // PHOS
+ case 8: // CPV
+ case 9: // PMD
+ case 10: // MUONTRK (MCH)
+ case 11: // MUONTRG (MTR)
+ case 12: // FMD
+ case 13: // T0
+ case 14: // V0
+ case 15: // ZDC
+ case 16: // ACORDE
+ case 17: // TRG
+ if (ddlNum >= 32) return false; // only have 1 32-bit word.
+ // all these detectors fit into one word, the offset is due to
// TPC and TOF
wordIndex = detNum + 9;
+ break;
+ case 18: // EMCAL
+ if (ddlNum >= 2*32) return false; // only have 2 32-bit words.
+ // 2 words for EMCAL + DCAL
+ wordIndex = detNum + 7;
+ wordIndex = 27 + (ddlNum >> 5);
+ break;
+ case 19: // DAQTEST
+ if (ddlNum >= 32) return false; // only have 1 32-bit word.
+ wordIndex = 29;
+ break;
+ case 30: // HLT
+ if (ddlNum >= 32) return false; // only have 1 32-bit word.
+ // the HLT bitfield is in the last word
+ wordIndex = 30;
+ break;
+ default:
+ return false;
}
- if (wordIndex < 0 or gkAliHLTDDLListSize <= wordIndex) return false;
+ if (ddlNum >= AliHLTDAQ::NumberOfDdls(detNum == 30 ? 20 : detNum)) return false;
// The bit index within the word indicated by wordIndex.
- bitIndex = (ddlId & 0xFF) % 32;
+ bitIndex = ddlNum % 32;
return true;
}
fReadoutList.fList[13] = 0xFFFFFFFF;
fReadoutList.fList[14] = 0x000000FF;
}
- if ((detector & kHMPID) != 0) fReadoutList.fList[15] = 0x00003FFF;
+ if ((detector & kHMPID) != 0) fReadoutList.fList[15] = 0x000FFFFF;
if ((detector & kPHOS) != 0) fReadoutList.fList[16] = 0x000FFFFF;
if ((detector & kCPV) != 0) fReadoutList.fList[17] = 0x000003FF;
if ((detector & kPMD) != 0) fReadoutList.fList[18] = 0x0000003F;
if ((detector & kZDC) != 0) fReadoutList.fList[24] = 0x00000001;
if ((detector & kACORDE) != 0) fReadoutList.fList[25] = 0x00000001;
if ((detector & kTRG) != 0) fReadoutList.fList[26] = 0x00000001;
- if ((detector & kEMCAL) != 0) fReadoutList.fList[27] = 0x00FFFFFF;
- if ((detector & kDAQTEST) != 0) fReadoutList.fList[28] = 0x00000001;
- if ((detector & kHLT) != 0) fReadoutList.fList[29] = 0x000003FF;
+ if ((detector & kEMCAL) != 0)
+ {
+ fReadoutList.fList[27] = 0xFFFFFFFF;
+ fReadoutList.fList[28] = 0x00003FFF;
+ }
+ if ((detector & kDAQTEST) != 0) fReadoutList.fList[29] = 0x00000001;
+ if ((detector & kHLT) != 0) fReadoutList.fList[30] = 0x000003FF;
}
if ((detector & kZDC) != 0) fReadoutList.fList[24] = 0x00000000;
if ((detector & kACORDE) != 0) fReadoutList.fList[25] = 0x00000000;
if ((detector & kTRG) != 0) fReadoutList.fList[26] = 0x00000000;
- if ((detector & kEMCAL) != 0) fReadoutList.fList[27] = 0x00000000;
- if ((detector & kDAQTEST) != 0) fReadoutList.fList[28] = 0x00000000;
- if ((detector & kHLT) != 0) fReadoutList.fList[29] = 0x00000000;
+ if ((detector & kEMCAL) != 0)
+ {
+ fReadoutList.fList[27] = 0x00000000;
+ fReadoutList.fList[28] = 0x00000000;
+ }
+ if ((detector & kDAQTEST) != 0) fReadoutList.fList[29] = 0x00000000;
+ if ((detector & kHLT) != 0) fReadoutList.fList[30] = 0x00000000;
}
result &= fReadoutList.fList[13] == 0xFFFFFFFF;
result &= fReadoutList.fList[14] == 0x000000FF;
}
- if ((detector & kHMPID) != 0) result &= fReadoutList.fList[15] == 0x00003FFF;
+ if ((detector & kHMPID) != 0) result &= fReadoutList.fList[15] == 0x000FFFFF;
if ((detector & kPHOS) != 0) result &= fReadoutList.fList[16] == 0x000FFFFF;
if ((detector & kCPV) != 0) result &= fReadoutList.fList[17] == 0x000003FF;
if ((detector & kPMD) != 0) result &= fReadoutList.fList[18] == 0x0000003F;
if ((detector & kZDC) != 0) result &= fReadoutList.fList[24] == 0x00000001;
if ((detector & kACORDE) != 0) result &= fReadoutList.fList[25] == 0x00000001;
if ((detector & kTRG) != 0) result &= fReadoutList.fList[26] == 0x00000001;
- if ((detector & kEMCAL) != 0) result &= fReadoutList.fList[27] == 0x00FFFFFF;
- if ((detector & kDAQTEST) != 0) result &= fReadoutList.fList[28] == 0x00000001;
- if ((detector & kHLT) != 0) result &= fReadoutList.fList[29] == 0x000003FF;
+ 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] == 0x000003FF;
return result;
}
{
// This operator performs a bitwise inclusive or operation on all DDL bits.
// See header file for more details.
+ this->OrEq(list);
+ return *this;
+}
+
+AliHLTReadoutList& AliHLTReadoutList::OrEq(const AliHLTReadoutList& list)
+{
+ // a bitwise inclusive or operation on all DDL bits.
+ // See header file for more details.
assert( fReadoutList.fCount == (unsigned)gkAliHLTDDLListSize );
for (Int_t i = 0; i < gkAliHLTDDLListSize; i++)
{
// This operator performs a bitwise exclusive or (xor) operation on all DDL bits.
// See header file for more details.
+
+ this->XorEq(list);
+ return *this;
+}
+
+AliHLTReadoutList& AliHLTReadoutList::XorEq(const AliHLTReadoutList& list)
+{
+ // bitwise exclusive or (xor) operation on all DDL bits.
+ // See header file for more details.
assert( fReadoutList.fCount == (unsigned)gkAliHLTDDLListSize );
for (Int_t i = 0; i < gkAliHLTDDLListSize; i++)
{
// This operator performs a bitwise and operation on all DDL bits.
// See header file for more details.
-
+
+ this->AndEq(list);
+ return *this;
+}
+
+AliHLTReadoutList& AliHLTReadoutList::AndEq(const AliHLTReadoutList& list)
+{
+ // bitwise and operation on all DDL bits.
+ // See header file for more details.
+
assert( fReadoutList.fCount == (unsigned)gkAliHLTDDLListSize );
for (Int_t i = 0; i < gkAliHLTDDLListSize; i++)
{
return *this;
}
-
AliHLTReadoutList& AliHLTReadoutList::operator -= (const AliHLTReadoutList& list)
{
// This operator removes all the DDLs specified in list from this readout list.
readoutlist.fReadoutList.fList[12] = 0xFFFFFFFF & (~fReadoutList.fList[12]);
readoutlist.fReadoutList.fList[13] = 0xFFFFFFFF & (~fReadoutList.fList[13]);
readoutlist.fReadoutList.fList[14] = 0x000000FF & (~fReadoutList.fList[14]);
- readoutlist.fReadoutList.fList[15] = 0x00003FFF & (~fReadoutList.fList[15]);
+ readoutlist.fReadoutList.fList[15] = 0x000FFFFF & (~fReadoutList.fList[15]);
readoutlist.fReadoutList.fList[16] = 0x000FFFFF & (~fReadoutList.fList[16]);
readoutlist.fReadoutList.fList[17] = 0x000003FF & (~fReadoutList.fList[17]);
readoutlist.fReadoutList.fList[18] = 0x0000003F & (~fReadoutList.fList[18]);
readoutlist.fReadoutList.fList[24] = 0x00000001 & (~fReadoutList.fList[24]);
readoutlist.fReadoutList.fList[25] = 0x00000001 & (~fReadoutList.fList[25]);
readoutlist.fReadoutList.fList[26] = 0x00000001 & (~fReadoutList.fList[26]);
- readoutlist.fReadoutList.fList[27] = 0x00FFFFFF & (~fReadoutList.fList[27]);
- readoutlist.fReadoutList.fList[28] = 0x00000001 & (~fReadoutList.fList[28]);
- readoutlist.fReadoutList.fList[29] = 0x000003FF & (~fReadoutList.fList[29]);
+ 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] = 0x000003FF & (~fReadoutList.fList[30]);
return readoutlist;
}