]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
introducing functions in addition some of the operator functions since the operator...
authorrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 8 Sep 2009 21:01:24 +0000 (21:01 +0000)
committerrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 8 Sep 2009 21:01:24 +0000 (21:01 +0000)
did not behave well on the HLT cluster. Basically the operator &= and |= were not entered when using
to AliHLTReadoutList objects in the HLTGlobalTrigger to mask the readout according to the CTP classes

adding helper function to get active trigger mask from CTPData

HLT/BASE/AliHLTCTPData.cxx
HLT/BASE/AliHLTCTPData.h
HLT/BASE/AliHLTReadoutList.cxx
HLT/BASE/AliHLTReadoutList.h

index 2d45479ae3d3851bc48644d7f5f9cf9a6060a160..0a3b5186aeb8f75575e54d0948bbbd32a8170fd6 100644 (file)
@@ -215,6 +215,20 @@ int AliHLTCTPData::InitCTPTriggerClasses(const char* ctpString)
   return 0;
 }
 
+AliHLTUInt64_t AliHLTCTPData::ActiveTriggers(const AliHLTComponentTriggerData& trigData)
+{
+  // extract active triggers from the trigger data
+  if (trigData.fDataSize != sizeof(AliHLTEventTriggerData)) return (AliHLTUInt64_t)0;
+
+  // trigger mask is 50 bit wide and is stored in word 5 and 6 of the CDH
+  AliHLTEventTriggerData* evtData=reinterpret_cast<AliHLTEventTriggerData*>(trigData.fData);
+  AliHLTUInt64_t triggerMask=evtData->fCommonHeader[6]&0x3ffff;
+  triggerMask<<=32;
+  triggerMask|=evtData->fCommonHeader[5];
+  return triggerMask;
+}
+
 bool AliHLTCTPData::EvaluateCTPTriggerClass(const char* expression, AliHLTComponentTriggerData& trigData) const
 {
   // see header file for function documentation
index 4cfc95a0fa225117688714838597d76befd219b9..7c07818faab202c4ace190cd76bce438f29ca85f 100644 (file)
@@ -69,6 +69,9 @@ class AliHLTCTPData: public TNamed, public AliHLTLogging
    */
   int InitCTPTriggerClasses(const char* ctpString);
 
+  /// etract the active trigger mask from the trigger data
+  static AliHLTUInt64_t ActiveTriggers(const AliHLTComponentTriggerData& trigData);
+
   /**
    * Evaluate an expression of trigger class ids with respect to the trigger mask.
    */
index 08545c1e8661b9a84fe253f2981c58e49c36ecf0..2d04a4fe591782c9ef5729e750929c3372e6ddb8 100644 (file)
@@ -414,6 +414,14 @@ AliHLTReadoutList& AliHLTReadoutList::operator |= (const AliHLTReadoutList& list
 {
   // 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++)
@@ -428,6 +436,15 @@ AliHLTReadoutList& AliHLTReadoutList::operator ^= (const AliHLTReadoutList& list
 {
   // 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++)
@@ -442,7 +459,16 @@ AliHLTReadoutList& AliHLTReadoutList::operator &= (const AliHLTReadoutList& list
 {
   // 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++)
   {
@@ -451,7 +477,6 @@ AliHLTReadoutList& AliHLTReadoutList::operator &= (const AliHLTReadoutList& list
   return *this;
 }
 
-
 AliHLTReadoutList& AliHLTReadoutList::operator -= (const AliHLTReadoutList& list)
 {
   // This operator removes all the DDLs specified in list from this readout list.
index 7a1f7a0766100ac9c3730ac0b95c2afd83d802d5..3686f77db1fd752072f96ee82ef9df0598e759b9 100644 (file)
@@ -240,6 +240,9 @@ class AliHLTReadoutList : public TNamed
    * \return  A reference to this object.
    */
   AliHLTReadoutList& operator |= (const AliHLTReadoutList& list);
+
+  /// same as operator |=
+  AliHLTReadoutList& OrEq(const AliHLTReadoutList& list);
   
   /**
    * This operator performs a bitwise exclusive or (xor) operation on all DDL
@@ -248,6 +251,9 @@ class AliHLTReadoutList : public TNamed
    * \return  A reference to this object.
    */
   AliHLTReadoutList& operator ^= (const AliHLTReadoutList& list);
+
+  /// same as operator ^=
+  AliHLTReadoutList& XorEq(const AliHLTReadoutList& list);
   
   /**
    * This operator performs a bitwise and operation on all DDL bits between
@@ -256,6 +262,9 @@ class AliHLTReadoutList : public TNamed
    * \return  A reference to this object.
    */
   AliHLTReadoutList& operator &= (const AliHLTReadoutList& list);
+
+  /// same as operator &=
+  AliHLTReadoutList& AndEq(const AliHLTReadoutList& list);
   
   /**
    * This operator performs the effective operation of "this and (this xor list)".