]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/BASE/AliHLTDataTypes.h
corrected trigger structs to comply with PubSub
[u/mrichter/AliRoot.git] / HLT / BASE / AliHLTDataTypes.h
index ac05d9ff8534be5689125cf6e1a819a858296db4..d9e1cc5366e5d12e41fce13317e9a6214eff0249 100644 (file)
  *   2       introduced June 07, enhanced/cleaned/arranged structure
  *   3       2007-11-15 RAW DDL data type added; some inconsistencies fixed
  *           ('void' and 'any' origins); added signed HLT basic data types
+ *           2007-11-23 origin defines have become variables in conjunction
+ *           to be used with the operator| (AliHLTComponentDataType)
+ *           2007-11-24 added trigger structs and ESD tree data type
  */
 #define ALIHLT_DATA_TYPES_VERSION 3
 
 //////////////////////////////////////////////////////////////////////////
 //
-// HLT data origin defines
+// HLT data origin variables.
+//
+// By converting from defines to variables, the origins can be used with
+// the operator|
+//
+// AliHLTComponentDataType dt;
+// dt = kAliHLTDataTypeDDLRaw | gkAliHLTDataOriginTPC;
 //
 //////////////////////////////////////////////////////////////////////////
 
@@ -47,25 +56,25 @@ const int kAliHLTComponentDataTypefOriginSize=4;
 # define kAliHLTAnyDataOrigin "***"
 
 /** HLT out */
-# define kAliHLTDataOriginOut     {'H','L','T',' '}
+extern const char kAliHLTDataOriginOut[kAliHLTComponentDataTypefOriginSize];
 
 /** HLT/PubSub private internal */
-# define kAliHLTDataOriginPrivate {'P','R','I','V'}
+extern const char kAliHLTDataOriginPrivate[kAliHLTComponentDataTypefOriginSize];
 
 /** TPC */
-# define kAliHLTDataOriginTPC     {'T','P','C',' '}
+extern const char kAliHLTDataOriginTPC[kAliHLTComponentDataTypefOriginSize];
 
 /** PHOS */
-# define kAliHLTDataOriginPHOS    {'P','H','O','S'}
+extern const char kAliHLTDataOriginPHOS[kAliHLTComponentDataTypefOriginSize];
 
 /** MUON */
-# define kAliHLTDataOriginMUON    {'M','U','O','N'}
+extern const char kAliHLTDataOriginMUON[kAliHLTComponentDataTypefOriginSize];
 
 /** TRD */
-# define kAliHLTDataOriginTRD     {'T','R','D',' '}
+extern const char kAliHLTDataOriginTRD[kAliHLTComponentDataTypefOriginSize];
 
 /** ITS */
-# define kAliHLTDataOriginITS     {'I','T','S',' '}
+extern const char kAliHLTDataOriginITS[kAliHLTComponentDataTypefOriginSize];
 
 //////////////////////////////////////////////////////////////////////////
 //
@@ -109,6 +118,11 @@ const int kAliHLTComponentDataTypefIDsize=8;
  */
 # define kAliHLTEventDataTypeID    {'E','V','E','N','T','T','Y','P'}
 
+/** ESD data block
+ * an AliESD object of varying origin
+ */
+# define kAliHLTESDTreeDataTypeID      {'E','S','D','_','T','R','E','E'}
+
 using namespace std;
 
 extern "C" {
@@ -231,17 +245,6 @@ extern "C" {
     AliHLTUInt32_t fSpecification;
   };
 
-  /**
-   * @struct AliHLTComponentTriggerData
-   * Trigger data, not yet defined
-   */
-  struct AliHLTComponentTriggerData
-  {
-    AliHLTUInt32_t fStructSize;
-    AliHLTUInt32_t fDataSize;
-    void* fData;
-  };
-
   /**
    * @struct AliHLTComponentEventDoneData
    * 
@@ -265,6 +268,18 @@ extern "C" {
     AliHLTUInt32_t fRunType;
   };
 
+  //////////////////////////////////////////////////////////////////////////
+  //
+  // Trigger meta information
+  //
+  //////////////////////////////////////////////////////////////////////////
+
+  /** field size of fAttribute */
+  static const int gkAliHLTBlockDAttributeCount = 8;
+
+  /** field size of fCommonHeader */
+  static const int gkAliHLTCommonHeaderCount = 8;
+
   /** size of the DDL list */
   static const int gkAliHLTDDLListSize = 29;
 
@@ -272,6 +287,9 @@ extern "C" {
    * @struct AliHLTEventDDL
    * DDL list event.
    * The struct is send with the DDLLIST event.
+   * Used in the trigger structure for internal apperance of 
+   * the DLLs as well as for the HLT readout list send to DAQ 
+   * ( as DataType : kAliHLTDataTypeDDL )
    */
   struct AliHLTEventDDL
   {
@@ -279,6 +297,29 @@ extern "C" {
     AliHLTUInt32_t fList[gkAliHLTDDLListSize];
   };
 
+  /**
+   * @struct AliHLTEventTriggerData
+   */
+  struct AliHLTEventTriggerData
+  {
+    AliHLTUInt8_t  fAttributes[gkAliHLTBlockDAttributeCount]; 
+    AliHLTUInt64_t fHLTStatus; // Bit field 
+    AliHLTUInt32_t fCommonHeaderWordCnt;
+    AliHLTUInt32_t fCommonHeader[gkAliHLTCommonHeaderCount]; 
+    AliHLTEventDDL fReadoutList;
+  };
+
+  /**
+   * @struct AliHLTComponentTriggerData
+   * Trigger data
+   */
+  struct AliHLTComponentTriggerData
+  {
+    AliHLTUInt32_t fStructSize;
+    AliHLTUInt32_t fDataSize;
+    void* fData;
+  };
+
   //////////////////////////////////////////////////////////////////////////
   //
   // HLT Event Type Specification
@@ -358,9 +399,12 @@ extern "C" {
   /** Event type specification */
   extern const AliHLTComponentDataType kAliHLTDataTypeEvent;
 
-/** RAW DDL data specification, data publisher will set type id and origin correctly */
+  /** RAW DDL data specification, origin is 'any', data publisher origin correctly */
   extern const AliHLTComponentDataType kAliHLTDataTypeDDLRaw;
 
+  /** ESD Tree data specification, origin is 'any' */
+  extern const AliHLTComponentDataType kAliHLTDataTypeESDTree;
+
   //////////////////////////////////////////////////////////////////////////
   //
   // FXS subscriber meta information
@@ -443,5 +487,12 @@ inline bool operator!=( const AliHLTComponentDataType& dt1, const AliHLTComponen
     return false;
     }
 
+inline AliHLTComponentDataType operator|(const AliHLTComponentDataType srcdt, const char origin[kAliHLTComponentDataTypefOriginSize])
+    {
+    AliHLTComponentDataType dt=srcdt;
+    for ( int i = 0; i < kAliHLTComponentDataTypefOriginSize; i++ )
+      dt.fOrigin[i]=origin[i];
+    return dt;
+    }
 
 #endif