-// $Id:$
+// $Id$
/**************************************************************************
* This file is property of and copyright by the ALICE HLT Project *
* ALICE Experiment at CERN, All rights reserved. *
{
// Constructor to create readout list from AliHLTEventDDL structure.
// See header file for more details.
-
- memcpy(&fReadoutList, &list, sizeof(fReadoutList));
+ memset(&fReadoutList, 0, sizeof(fReadoutList));
+ // handle lists of different sizes, copy only the overlapping part of the list
+ fReadoutList.fCount=sizeof(fReadoutList.fList)/sizeof(AliHLTUInt32_t);
+ memcpy(&fReadoutList.fList, &list.fList, (fReadoutList.fCount<list.fCount?fReadoutList.fCount:list.fCount)*sizeof(AliHLTUInt32_t));
}
if (detNum < 3)
{
+ // the 3 ITS detectors have one word each
wordIndex = detNum;
}
else if (detNum == 3)
{
+ // 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)
{
+ // 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
+ // TPC and TOF
wordIndex = detNum + 9;
}
// This operator performs a bitwise inclusive or operation on all DDL bits.
// See header file for more details.
- assert( fReadoutList.fCount == gkAliHLTDDLListSize );
+ assert( fReadoutList.fCount == (unsigned)gkAliHLTDDLListSize );
for (Int_t i = 0; i < gkAliHLTDDLListSize; i++)
{
fReadoutList.fList[i] |= list.fReadoutList.fList[i];
// This operator performs a bitwise exclusive or (xor) operation on all DDL bits.
// See header file for more details.
- assert( fReadoutList.fCount == gkAliHLTDDLListSize );
+ assert( fReadoutList.fCount == (unsigned)gkAliHLTDDLListSize );
for (Int_t i = 0; i < gkAliHLTDDLListSize; i++)
{
fReadoutList.fList[i] ^= list.fReadoutList.fList[i];
// This operator performs a bitwise and operation on all DDL bits.
// See header file for more details.
- assert( fReadoutList.fCount == gkAliHLTDDLListSize );
+ assert( fReadoutList.fCount == (unsigned)gkAliHLTDDLListSize );
for (Int_t i = 0; i < gkAliHLTDDLListSize; i++)
{
fReadoutList.fList[i] &= list.fReadoutList.fList[i];
// This operator removes all the DDLs specified in list from this readout list.
// See header file for more details.
- assert( fReadoutList.fCount == gkAliHLTDDLListSize );
+ assert( fReadoutList.fCount == (unsigned)gkAliHLTDDLListSize );
for (Int_t i = 0; i < gkAliHLTDDLListSize; i++)
{
// Effectively apply: this = this & (~ (this & list))
//-*- Mode: C++ -*-
-// $Id:$
+// $Id$
#ifndef ALIHLTREADOUTLIST_H
#define ALIHLTREADOUTLIST_H
/* This file is property of and copyright by the ALICE HLT Project *
* \return Reference to the AliHLTEventDDL raw structure.
*/
operator AliHLTEventDDL& () { return fReadoutList; }
+
+ /**
+ * Access method to the binary buffer.
+ * \return pointer to the binary buffer.
+ */
+ AliHLTEventDDL* Buffer() { return &fReadoutList; }
+
+ /**
+ * Access to the size of the binary buffer.
+ * \return size of the binary buffer
+ */
+ unsigned BufferSize() { return sizeof(fReadoutList); }
/**
* Assignment operator performs a deep copy.
#include "AliHLTTrigger.h"
#include "AliHLTTriggerDecision.h"
+#include "AliHLTReadoutList.h"
ClassImp(AliHLTTrigger)
AliHLTTriggerDecision triggerResult(value, GetTriggerName(), fTriggerDomain, fDescription);
// Append the readout list if it contains anything.
triggerResult.TriggerDomain().Add(fReadoutList);
- fTriggerEventResult = PushBack(&triggerResult, kAliHLTDataTypeTObject|kAliHLTDataOriginOut);
- if (fTriggerEventResult == 0) fDecisionMade = true;
- return fTriggerEventResult;
+ return TriggerEvent(&triggerResult, kAliHLTDataTypeTObject|kAliHLTDataOriginOut);
}
if (fTriggerEventResult != 0) return fTriggerEventResult; // Do not do anything if a previous call failed.
fTriggerEventResult = PushBack(result, type, spec);
+ if (fTriggerEventResult) {
+ fTriggerEventResult = PushBack(result->ReadoutList().Buffer(), result->ReadoutList().BufferSize(), kAliHLTDataTypeDAQRDOUT|kAliHLTDataOriginOut);
+ }
+
if (fTriggerEventResult == 0) fDecisionMade = true;
return fTriggerEventResult;
}