]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/BASE/AliHLTDataTypes.h
From Magali: small modifications.
[u/mrichter/AliRoot.git] / HLT / BASE / AliHLTDataTypes.h
index 076a1d4a8b07a312e3f31120a5df79271ede7611..943faedda1e11cd7a91c50532e0f4ca0704d748c 100644 (file)
  *           kAliHLTMCObjectDataType added
  *           kAliHLTDataOriginOffline added
  *           kAliHLTDataOriginHLT added
+ *  11       extended AliHLTComponentStatistics: one more member to store the
+ *           cycle time between events per component.
+ *  12       added common data type id 'CLUSTERS'
+ *           added data type 'ECSPARAM' for the full ECS parameter string to
+ *           be sebt during SOR
+ *           added kAliHLTDataTypeTrackMC (TRACK_MC) data type
+ *           added data types (note: interface version stays the same
+ *                 kAliHLTDataTypeDAQRDOUT (DAQRDOUT)
+ *                 kAliHLTDataTypeTriggerDecision (TRIG_DEC)
+ *                 kAliHLTDataTypeGlobalTrigger (GLOBTRIG)
+ *                 kAliHLTDataTypeStreamerInfo (ROOTSTRI)
  */
-#define ALIHLT_DATA_TYPES_VERSION 10
+#define ALIHLT_DATA_TYPES_VERSION 12
 
 //////////////////////////////////////////////////////////////////////////
 //
@@ -192,6 +203,13 @@ const int kAliHLTComponentDataTypefIDsize=8;
  */
 # define kAliHLTDDLRawDataTypeID   {'D','D','L','_','R','A','W',' '}
 
+/** CLUSTERS data
+ * Common data type for the output of cluster finders, the exact
+ * format depends on the origin (detector)
+ * @ingroup alihlt_component_datatypes
+ */
+# define kAliHLTClustersDataTypeID {'C','L','U','S','T','E','R','S'}
+
 /** calibration data for file exchange subscriber 
  * @ingroup alihlt_component_datatypes
  */
@@ -221,12 +239,24 @@ const int kAliHLTComponentDataTypefIDsize=8;
  */
 # define kAliHLTDDLDataTypeID      {'D','D','L','L','I','S','T',' '}
 
+/** DAQ readout list 
+ * @ingroup alihlt_component_datatypes
+ */
+# define kAliHLTDAQRDOUTDataTypeID "DAQRDOUT"
+
 /** EventType event 
  * - empty payload, specification gives eventType
  * @ingroup alihlt_component_datatypes
  */
 # define kAliHLTEventDataTypeID    {'E','V','E','N','T','T','Y','P'}
 
+/** ECS parameter event 
+ * - sent during the SOR event by the framework
+ * - contains the full ECS parameter string
+ * @ingroup alihlt_component_datatypes
+ */
+# define kAliHLTECSParamDataTypeID {'E','C','S','P','A','R','A','M'}
+
 /** ComponentConfiguration event
  * - payload contains the CDB path as string
  * @ingroup alihlt_component_datatypes
@@ -306,6 +336,18 @@ const int kAliHLTComponentDataTypefIDsize=8;
  */
 # define kAliHLTRunSummaryDataTypeID          {'R','U','N','S','U','M','M','A'}
 
+/** Trigger decision
+ * - origin : kAliHLTDataOriginOut ( HLT )
+ * @ingroup alihlt_component_datatypes
+ */
+# define kAliHLTTriggerDecisionDataTypeID     {'T','R','I','G','_','D','E','C'}
+
+/** Global trigger decision
+ * - origin : kAliHLTDataOriginOut ( HLT )
+ * @ingroup alihlt_component_datatypes
+ */
+# define kAliHLTGlobalTriggerDataTypeID       {'G','L','O','B','T','R','I','G'}
+
 /** Block Statistics
  * - small block statistics info added to the data stream by
  *   the component base class
@@ -328,6 +370,13 @@ const int kAliHLTComponentDataTypefIDsize=8;
  */
 #define kAliHLTTObjectDataTypeID              {'R','O','O','T','T','O','B','J'}
 
+/** ROOT streamer info
+ * - used for the transmission of streamer info for objects in the HLTOUT
+ * - origin kAliHLTDataOriginOut ( HLT )
+ * @ingroup alihlt_component_datatypes
+ */
+#define kAliHLTStreamerInfoDataTypeID         {'R','O','O','T','S','T','R','I'}
+
 /** ROOT TObjArray
  * - a TObjArray exported from the HLT analysis
  * - varying origin
@@ -364,11 +413,30 @@ const int kAliHLTComponentDataTypefIDsize=8;
  */
 #define kAliHLTTrackDataTypeID                {'H','L','T','T','R','A','C','K'}
 
+/** Track Monte Carlo information
+ * @ingroup alihlt_component_datatypes
+ */
+#define kAliHLTTrackMCDataTypeID              {'T','R','A','C','K','_','M','C'}
+
 /** TClonesArray of AliExternalTrackParam
  * @ingroup alihlt_component_datatypes
  */
 #define kAliHLTExternalTrackParamDataTypeID   {'T','C','A','E','X','T','T','R'}
 
+/** HLT Jet
+ * - Struct for jets based on AliHLTJETJets
+ * - varying origin
+ * @ingroup alihlt_component_datatypes
+ */
+#define kAliHLTJetDataTypeID                  {'H','L','T','J','E','T','V','0'}
+
+/** dEdx  data
+ * Common data type for the dEdx 
+ * format depends on the origin (detector)
+ * @ingroup alihlt_component_datatypes
+ */
+# define kAliHLTdEdxDataTypeID {'D','E','D','X',' ',' ',' ',' '}
+
 using namespace std;
 
 extern "C" {
@@ -446,11 +514,11 @@ extern "C" {
    */
   struct AliHLTComponentEventData
   {
-    AliHLTUInt32_t fStructSize;
-    AliHLTEventID_t fEventID;
-    AliHLTUInt32_t fEventCreation_s;
-    AliHLTUInt32_t fEventCreation_us;
-    AliHLTUInt32_t fBlockCnt;
+    AliHLTUInt32_t fStructSize;        /// Size of this structure in bytes.
+    AliHLTEventID_t fEventID;          /// 64 bit event ID number.
+    AliHLTUInt32_t fEventCreation_s;   /// Event creation time in seconds (Should be added to fEventCreation_us*1e6).
+    AliHLTUInt32_t fEventCreation_us;  /// Fractional event creation time in micro seconds.
+    AliHLTUInt32_t fBlockCnt;          /// The number of raw data blocks received by the component.
   };
 
   /**
@@ -460,9 +528,9 @@ extern "C" {
    */
   struct AliHLTComponentShmData
   {
-    AliHLTUInt32_t fStructSize;
-    AliHLTUInt32_t fShmType;
-    AliHLTUInt64_t fShmID;
+    AliHLTUInt32_t fStructSize;  /// Size of this structure in bytes.
+    AliHLTUInt32_t fShmType;     /// The type code of the shared memory.
+    AliHLTUInt64_t fShmID;       /// The shared memory identifier.
   };
 
   /**
@@ -486,9 +554,9 @@ extern "C" {
    */
   struct AliHLTComponentDataType
   {
-    AliHLTUInt32_t fStructSize;
-    char fID[kAliHLTComponentDataTypefIDsize];                      //!
-    char fOrigin[kAliHLTComponentDataTypefOriginSize];              //!
+    AliHLTUInt32_t fStructSize;                            /// Size of this structure in bytes.
+    char fID[kAliHLTComponentDataTypefIDsize];             /// Data type identifier.
+    char fOrigin[kAliHLTComponentDataTypefOriginSize];     /// Subsystem or detector origin of the data.
   };
 
   /**
@@ -505,19 +573,19 @@ extern "C" {
    */
   struct AliHLTComponentBlockData
   {
-    /* size and version of the struct */
+    /** size and version of the struct */
     AliHLTUInt32_t fStructSize;
-    /* shared memory key, ignored by processing components */
+    /** shared memory key, ignored by processing components */
     AliHLTComponentShmData fShmKey;
-    /* offset of output data relative to the output buffer */
+    /** offset of output data relative to the output buffer */
     AliHLTUInt32_t fOffset;
-    /* start of the data for input data blocks, fOffset to be ignored*/
+    /** start of the data for input data blocks, fOffset to be ignored*/
     void* fPtr;
-    /* size of the data block */
+    /** size of the data block */
     AliHLTUInt32_t fSize;
-    /* data type of the data block */
+    /** data type of the data block */
     AliHLTComponentDataType fDataType;
-    /* data specification of the data block */
+    /** data specification of the data block */
     AliHLTUInt32_t fSpecification;
   };
 
@@ -527,9 +595,9 @@ extern "C" {
    */
   struct AliHLTComponentEventDoneData
   {
-    AliHLTUInt32_t fStructSize;
-    AliHLTUInt32_t fDataSize;
-    void* fData;
+    AliHLTUInt32_t fStructSize;   /// Size of this structure in bytes.
+    AliHLTUInt32_t fDataSize;     /// Size of the data section (following this data member) in bytes.
+    void* fData;                  /// Start of the data section.
   };
 
   /**
@@ -549,9 +617,9 @@ extern "C" {
    */
   struct AliHLTRunDesc
   {
-    AliHLTUInt32_t fStructSize;
-    AliHLTUInt32_t fRunNo;
-    AliHLTUInt32_t fRunType;
+    AliHLTUInt32_t fStructSize;   /// Size of this structure in bytes.
+    AliHLTUInt32_t fRunNo;        /// The run number for the current active run.
+    AliHLTUInt32_t fRunType;      /// The HLT run type.
   };
 
   /**
@@ -562,18 +630,22 @@ extern "C" {
    * fLevel is retrieved from incoming block statistics and incremented. 
    * Incoming block statistics are appended to the newly added one if
    * --enable-compstat=full has been chosen.
+   *
+   * ChangeLog:
+   *   2009-01-14 fComponentCycleTime added
    */
   struct AliHLTComponentStatistics
   {
-    AliHLTUInt32_t fStructSize;
-    AliHLTUInt32_t fLevel;
-    AliHLTUInt32_t fId;
-    AliHLTUInt32_t fTime;
-    AliHLTUInt32_t fCTime;
-    AliHLTUInt32_t fInputBlockCount;
-    AliHLTUInt32_t fTotalInputSize;
-    AliHLTUInt32_t fOutputBlockCount;
-    AliHLTUInt32_t fTotalOutputSize;
+    AliHLTUInt32_t fStructSize;           /// Size of this structure in bytes.
+    AliHLTUInt32_t fLevel;                /// Indicates from which processing stage this information is from.
+    AliHLTUInt32_t fId;                   /// Unique identifier for the chain based on CRC code.
+    AliHLTUInt32_t fTime;                 /// Real wall time used to process the data (micro seconds).
+    AliHLTUInt32_t fCTime;                /// CPU time used to process the data (micro seconds).
+    AliHLTUInt32_t fInputBlockCount;      /// Number of input data blocks.
+    AliHLTUInt32_t fTotalInputSize;       /// Total size in bytes of input data.
+    AliHLTUInt32_t fOutputBlockCount;     /// Number of output data blocks.
+    AliHLTUInt32_t fTotalOutputSize;      /// Total size in bytes of output data.
+    AliHLTUInt32_t fComponentCycleTime;   /// Real wall time indicating the start of the data processing (micro seconds).
   };
 
   /**
@@ -590,6 +662,7 @@ extern "C" {
    */
   struct AliHLTComponentTableEntry
   {
+    /** Size of this structure in bytes. */
     AliHLTUInt32_t fStructSize;
     /** size of the array of parent ids */
     AliHLTUInt16_t fNofParents;
@@ -627,8 +700,8 @@ extern "C" {
    */
   struct AliHLTEventDDL
   {
-    AliHLTUInt32_t fCount;
-    AliHLTUInt32_t fList[gkAliHLTDDLListSize];
+    AliHLTUInt32_t fCount;                       /// Indicates the number of words in fList.
+    AliHLTUInt32_t fList[gkAliHLTDDLListSize];   /// The list of DDL enable/disable bits.
   };
 
   /**
@@ -636,11 +709,11 @@ extern "C" {
    */
   struct AliHLTEventTriggerData
   {
-    AliHLTUInt8_t  fAttributes[gkAliHLTBlockDAttributeCount]; 
-    AliHLTUInt64_t fHLTStatus; // Bit field 
-    AliHLTUInt32_t fCommonHeaderWordCnt;
-    AliHLTUInt32_t fCommonHeader[gkAliHLTCommonHeaderCount]; 
-    AliHLTEventDDL fReadoutList;
+    AliHLTUInt8_t  fAttributes[gkAliHLTBlockDAttributeCount];  /// List of data block attibutes.
+    AliHLTUInt64_t fHLTStatus; /// Bit field 
+    AliHLTUInt32_t fCommonHeaderWordCnt;  /// Number of words in fCommonHeader.
+    AliHLTUInt32_t fCommonHeader[gkAliHLTCommonHeaderCount];  /// The common header words.
+    AliHLTEventDDL fReadoutList;   /// The readout list structure.
   };
 
   /**
@@ -649,9 +722,9 @@ extern "C" {
    */
   struct AliHLTComponentTriggerData
   {
-    AliHLTUInt32_t fStructSize;
-    AliHLTUInt32_t fDataSize;
-    void* fData;
+    AliHLTUInt32_t fStructSize;  /// Size of this structure in bytes.
+    AliHLTUInt32_t fDataSize;    /// Size of the data section (following this data member) in bytes.
+    void* fData;                 /// Start of the data section.
   };
 
   //////////////////////////////////////////////////////////////////////////
@@ -766,6 +839,18 @@ extern "C" {
    */
   extern const AliHLTComponentDataType kAliHLTDataTypeDDL;
 
+  /** DAQ readout list 
+   * @ingroup alihlt_component_datatypes
+   */
+  extern const AliHLTComponentDataType kAliHLTDataTypeDAQRDOUT;
+
+  /** CLUSTERS data
+   * Common data type for the output of cluster finders, the exact
+   * format depends on the origin (detector)
+   * @ingroup alihlt_component_datatypes
+   */
+  extern const AliHLTComponentDataType kAliHLTDataTypeClusters;
+
   /** SOR data type 
    * @ingroup alihlt_component_datatypes
    */
@@ -786,6 +871,13 @@ extern "C" {
    */
   extern const AliHLTComponentDataType kAliHLTDataTypeEvent;
 
+  /** ECS parameter event 
+   * - sent during the SOR event by the framework
+   * - contains the full ECS parameter string
+   * @ingroup alihlt_component_datatypes
+   */
+  extern const AliHLTComponentDataType kAliHLTDataTypeECSParam; // {ECSPARAM:PRIV}
+
   /** Configuration event data type 
    * @ingroup alihlt_component_datatypes
    */
@@ -846,11 +938,23 @@ extern "C" {
    */
   extern const AliHLTComponentDataType kAliHLTDataTypeRunStatistics;
 
-  /** Event summary 
+  /** Run summary 
    * @ingroup alihlt_component_datatypes
    */
   extern const AliHLTComponentDataType kAliHLTDataTypeRunSummary;
 
+  /** Trigger decision
+   * - origin : kAliHLTDataOriginOut ( HLT )
+   * @ingroup alihlt_component_datatypes
+   */
+  extern const AliHLTComponentDataType kAliHLTDataTypeTriggerDecision;   // {TRIG_DEC:HLT }
+
+  /** Global trigger decision
+   * - origin : kAliHLTDataOriginOut ( HLT )
+   * @ingroup alihlt_component_datatypes
+   */
+  extern const AliHLTComponentDataType kAliHLTDataTypeGlobalTrigger;     // {GLOBTRIG:HLT }
+
   /** Component block statistics
    * @ingroup alihlt_component_datatypes
    */
@@ -873,6 +977,11 @@ extern "C" {
    * @ingroup alihlt_component_datatypes
    */
   extern const AliHLTComponentDataType kAliHLTDataTypeTObject;            // {ROOTTOBJ,"***"}
+
+  /** ROOT streamer info
+   * @ingroup alihlt_component_datatypes
+   */
+  extern const AliHLTComponentDataType kAliHLTDataTypeStreamerInfo;       // {ROOTSTRI,HLT }
                                                                                        
   /** ROOT TObjArray 
    * @ingroup alihlt_component_datatypes
@@ -901,12 +1010,37 @@ extern "C" {
    * barrel tracks and detector tracks get names 'DETTracks'
    * @ingroup alihlt_component_datatypes
    */  
-  extern const AliHLTComponentDataType kAliHLTDataTypeTrack;             // {HLTTRACK,"***"}
+  extern const AliHLTComponentDataType kAliHLTDataTypeTrack;              // {HLTTRACK,"***"}
+
+  /** Track Monte Carlo information
+   */
+  extern const AliHLTComponentDataType kAliHLTDataTypeTrackMC;            // {TRACK_MC,"***"}
 
   /** TClonesArray of AliExternalTrackParam
    * @ingroup alihlt_component_datatypes
    */  
-  extern const AliHLTComponentDataType kAliHLTDataTypeExternalTrackParam;// {TCAEXTTR,"***"}
+  extern const AliHLTComponentDataType kAliHLTDataTypeExternalTrackParam; // {TCAEXTTR,"***"}
+
+  /** Container containing jets (AliHLTJETJets)
+   * Containing TClonesArray of AliAODJets 
+   * @ingroup alihlt_component_datatypes
+   */  
+  extern const AliHLTComponentDataType kAliHLTDataTypeJet;                // {HLTJETV0,"***"}
+  
+  /** Container of ITS tracks
+   * @ingroup alihlt_component_datatypes
+   */  
+  extern const AliHLTComponentDataType fgkITSTracksDataType;
+
+  /** Container of calorimeter clusters
+   * @ingroup alihlt_component_datatypes
+   */  
+  extern const AliHLTComponentDataType kAliHLTDataTypeCaloCluster; 
+
+  /** Container of dEdx
+   * @ingroup alihlt_component_datatypes
+   */
+  extern const AliHLTComponentDataType kAliHLTDataTypedEdx;
 
   //////////////////////////////////////////////////////////////////////////
   //
@@ -921,11 +1055,11 @@ extern "C" {
   /** Header in front of the data payload, in order to sent data to the FXS. */
   struct AliHLTFXSHeader
   {
-    AliHLTUInt32_t fHeaderVersion;
-    AliHLTUInt32_t fRunNumber;
-    char fOrigin[gkAliHLTFXSHeaderfOriginSize];
-    char fFileID[gkAliHLTFXSHeaderfFileIDSize];
-    char fDDLNumber[gkAliHLTFXSHeaderfDDLNumberSize];
+    AliHLTUInt32_t fHeaderVersion;   /// HLT software version number.
+    AliHLTUInt32_t fRunNumber;       /// The current run number.
+    char fOrigin[gkAliHLTFXSHeaderfOriginSize];   /// The detector from which the FXS data is received.
+    char fFileID[gkAliHLTFXSHeaderfFileIDSize];   /// File identifier for the stored data.
+    char fDDLNumber[gkAliHLTFXSHeaderfDDLNumberSize];  /// The DDL bits.
   };  
 
   //////////////////////////////////////////////////////////////////////////
@@ -955,20 +1089,16 @@ extern "C" {
     /** size of the structure */
     AliHLTUInt32_t fStructSize;
 
-    /** the component parameter given by the framework on creation
-     */
+    /** the component parameter given by the framework on creation */
     void* fParam;
 
-    /** allocated memory
-     */
+    /** allocated memory */
     void* (*fAllocMemoryFunc)( void* param, unsigned long size );
 
-    /** allocate an EventDoneData structure.
-     */
+    /** allocate an EventDoneData structure. */
     int (*fGetEventDoneDataFunc)( void* param, AliHLTEventID_t eventID, unsigned long size, AliHLTComponentEventDoneData** edd );
 
-    /** logging callback
-     */
+    /** logging callback */
     AliHLTfctLogging fLoggingFunc;
   };
 #if 0
@@ -1143,7 +1273,7 @@ inline AliHLTComponentDataType AliHLTComponentDataTypeInitializer(const char id[
 {
   AliHLTComponentDataType dt=kAliHLTVoidDataType;
   int i=0;
-  for (i = 0; i < kAliHLTComponentDataTypefIDsize; i++)
+  for (i = 0; i < kAliHLTComponentDataTypefIDsize && id[i]!=0; i++)
     dt.fID[i]=id[i];
   for (i = 0; i < kAliHLTComponentDataTypefOriginSize && origin[i]!=0; i++ )
     dt.fOrigin[i]=origin[i];