]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/BASE/AliHLTDataTypes.h
- added libPHOSshuttle to PHOS libraries
[u/mrichter/AliRoot.git] / HLT / BASE / AliHLTDataTypes.h
index d9e1cc5366e5d12e41fce13317e9a6214eff0249..518661084c361e1bd253d02076b7937c9dd9d433 100644 (file)
  *           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
+ *   4       Component configuration and DCS update events added
+ *           gkAliHLTDDLListSize set from 29 to 30 according to new PubSub
+ *           specs
+ *   5       Data types for Run and Event summary, and for monitoring added
  */
-#define ALIHLT_DATA_TYPES_VERSION 3
+#define ALIHLT_DATA_TYPES_VERSION 5
 
 //////////////////////////////////////////////////////////////////////////
 //
@@ -118,11 +122,88 @@ const int kAliHLTComponentDataTypefIDsize=8;
  */
 # define kAliHLTEventDataTypeID    {'E','V','E','N','T','T','Y','P'}
 
+/** ComponentConfiguration event
+ * - payload contains the CDB path as string
+ */
+# define kAliHLTComConfDataTypeID  {'C','O','M','_','C','O','N','F'}
+
+/** DCS value update event
+ * - payload contains string of relevant detectors
+ */
+# define kAliHLTUpdtDCSDataTypeID  {'U','P','D','T','_','D','C','S'}
+
 /** ESD data block
  * an AliESD object of varying origin
+ * The 'V0' at the end allows a versioning
+ */
+# define kAliHLTESDObjectDataTypeID    {'A','L','I','E','S','D','V','0'}
+
+/** ESD tree data block
+ * TTree with an AliESD object of varying origin
  */
 # define kAliHLTESDTreeDataTypeID      {'E','S','D','_','T','R','E','E'}
 
+/** HW Address selection data block
+ * - a selection list for 16 bit HW addresses
+ * - varying origin
+ */
+# define kAliHLTHwAddr16DataTypeID     {'H','W','A','D','D','R','1','6'}
+
+/** Event Statistics
+ * - event statistics for given detectors
+ * - varying origin
+ */
+# define kAliHLTEventStatisticsDataTypeID     {'E','V','_','S','T','A','T','I'}
+
+/** Event Summary
+ * - event summary
+ * - origin : kAliHLTDataOriginOut ( HLT )
+ */
+# define kAliHLTEventSummaryDataTypeID        {'E','V','_','S','U','M','M','A'}
+
+/** Run Statistics
+ * - run statistics for given detectors
+ * - varying origin
+ */
+# define kAliHLTRunStatisticsDataTypeID       {'R','U','N','S','T','A','T','I'}
+
+/** Run Summary
+ * - run summary
+ * - origin : kAliHLTDataOriginOut ( HLT )
+ */
+# define kAliHLTRunSummaryDataTypeID          {'R','U','N','S','U','M','M','A'}
+
+/** general ROOT TObject
+ * - a general TObject exported from the HLT analysis
+ * - varying origin
+ */
+#define kAliHLTTObjectDataTypeID              {'R','O','O','T','T','O','B','J'}
+
+/** ROOT TObjArray
+ * - a TObjArray exported from the HLT analysis
+ * - varying origin
+ */
+#define kAliHLTTObjArrayDataTypeID            {'R','O','O','T','O','B','A','R'}
+
+/** ROOT TTree
+ * - a TTree object exported from the HLT analysis
+ * - varying origin
+ */
+#define kAliHLTTTreeDataTypeID                {'R','O','O','T','T','R','E','E'}
+
+/** ROOT histogram
+ * - a histogram object exported from the HLT analysis
+ * - class derives from TH1 (directly or indirectly) and inherits all common functionality
+ * - varying origin
+ */
+#define kAliHLTHistogramDataTypeID            {'R','O','O','T','H','I','S','T'}
+
+/** ROOT TNtuple
+ * - a TNtupl object exported from the HLT analysis
+ * - varying origin
+ */
+#define kAliHLTTNtupleDataTypeID              {'R','O','O','T','T','U','P','L'}
+
 using namespace std;
 
 extern "C" {
@@ -160,16 +241,32 @@ extern "C" {
   //
   //////////////////////////////////////////////////////////////////////////
 
-  enum AliHLTComponentLogSeverity { 
+  /**
+   * Logging severities of the HLT
+   */
+  enum AliHLTComponentLogSeverity {
+    /** no logging */
     kHLTLogNone      = 0,
+    /** benchmark messages */
     kHLTLogBenchmark = 0x1,
+    /** debug messages */
     kHLTLogDebug     = 0x2,
+    /** info messages */
     kHLTLogInfo      = 0x4,
+    /** warning messages */
     kHLTLogWarning   = 0x8,
+    /** error messages */
     kHLTLogError     = 0x10,
+    /** fatal error messages */
     kHLTLogFatal     = 0x20,
-    kHLTLogAll       = 0x3f,
-    kHLTLogDefault   = 0x3d 
+    /** few important messages not to be filtered out.
+     * redirected to kHLTLogInfo in AliRoot
+     */
+    kHLTLogImportant = 0x40,
+    /** special value to enable all messages */
+    kHLTLogAll       = 0x7f,
+    /** the default logging filter */
+    kHLTLogDefault   = 0x79
 };
 
   //////////////////////////////////////////////////////////////////////////
@@ -275,13 +372,16 @@ extern "C" {
   //////////////////////////////////////////////////////////////////////////
 
   /** field size of fAttribute */
-  static const int gkAliHLTBlockDAttributeCount = 8;
+  const int gkAliHLTBlockDAttributeCount = 8;
 
   /** field size of fCommonHeader */
-  static const int gkAliHLTCommonHeaderCount = 8;
+   const int gkAliHLTCommonHeaderCount = 8;
 
   /** size of the DDL list */
-  static const int gkAliHLTDDLListSize = 29;
+  const int gkAliHLTDDLListSize = 30;
+
+  /** Number of Trigger Classes of CTP in CDH */
+  const int gkNCTPTriggerClasses = 50;
 
   /**
    * @struct AliHLTEventDDL
@@ -327,23 +427,27 @@ extern "C" {
   //////////////////////////////////////////////////////////////////////////
 
   /** Unknown eventType specification */
-  static const AliHLTUInt32_t gkAliEventTypeUnknown = ~(AliHLTUInt32_t)0;
+  const AliHLTUInt32_t gkAliEventTypeUnknown = ~(AliHLTUInt32_t)0;
   /** SOR eventType specification */ 
-  static const AliHLTUInt32_t gkAliEventTypeStartOfRun=1;
+  const AliHLTUInt32_t gkAliEventTypeStartOfRun=1;
   /** Data eventType specification */
-  static const AliHLTUInt32_t gkAliEventTypeData=2;
+  const AliHLTUInt32_t gkAliEventTypeData=2;
   /** EOR eventType specification */ 
-  static const AliHLTUInt32_t gkAliEventTypeEndOfRun=4;
+  const AliHLTUInt32_t gkAliEventTypeEndOfRun=4;
   /** Corrupt eventType specification */
-  static const AliHLTUInt32_t gkAliEventTypeCorruptID=8;
+  const AliHLTUInt32_t gkAliEventTypeCorruptID=8;
   /** Calibration eventType specification */ 
-  static const AliHLTUInt32_t gkAliEventTypeCalibration=16;
+  const AliHLTUInt32_t gkAliEventTypeCalibration=16;
   /** DataReplay eventType specification */
-  static const AliHLTUInt32_t gkAliEventTypeDataReplay=32;
+  const AliHLTUInt32_t gkAliEventTypeDataReplay=32;
+  /** Configuration eventType specification */
+  const AliHLTUInt32_t gkAliEventTypeConfiguration=34;
+  /** Update DCS eventType specification */
+  const AliHLTUInt32_t gkAliEventTypeReadPreprocessor=35;
   /** Tick eventType specification */ 
-  static const AliHLTUInt32_t gkAliEventTypeTick=64;
+  const AliHLTUInt32_t gkAliEventTypeTick=64;
   /** Max eventType specification */ 
-  static const AliHLTUInt32_t gkAliEventTypeMax=64;
+  const AliHLTUInt32_t gkAliEventTypeMax=64;
 
   //////////////////////////////////////////////////////////////////////////
   //
@@ -399,21 +503,66 @@ extern "C" {
   /** Event type specification */
   extern const AliHLTComponentDataType kAliHLTDataTypeEvent;
 
+  /** Configuration event data type */
+  extern const AliHLTComponentDataType kAliHLTDataTypeComConf;
+
+  /** DCS value update event */
+  extern const AliHLTComponentDataType kAliHLTDataTypeUpdtDCS;
+
   /** RAW DDL data specification, origin is 'any', data publisher origin correctly */
   extern const AliHLTComponentDataType kAliHLTDataTypeDDLRaw;
 
+  /** ESD object data specification, origin is 'any' */
+  extern const AliHLTComponentDataType kAliHLTDataTypeESDObject;
+
   /** ESD Tree data specification, origin is 'any' */
   extern const AliHLTComponentDataType kAliHLTDataTypeESDTree;
 
+  /** 16 bit Hardware address selection data specification, origin is 'any' */
+  extern const AliHLTComponentDataType kAliHLTDataTypeHwAddr16;
+
+  /** Event statistics */
+  extern const AliHLTComponentDataType kAliHLTDataTypeEventStatistics;
+
+  /** Event summary */
+  extern const AliHLTComponentDataType kAliHLTDataTypeEventSummary;
+
+  /** Event statistics */
+  extern const AliHLTComponentDataType kAliHLTDataTypeRunStatistics;
+
+  /** Event summary */
+  extern const AliHLTComponentDataType kAliHLTDataTypeRunSummary;
+
+  //////////////////////////////////////////////////////////////////////////
+  //
+  // Data Types for Monitoring objects
+  //
+  //////////////////////////////////////////////////////////////////////////
+
+  /** general ROOT TObject */
+  extern const AliHLTComponentDataType kAliHLTDataTypeTObject;            // {ROOTTOBJ,"***"}
+                                                                                       
+  /** ROOT TObjArray */                                                                        
+  extern const AliHLTComponentDataType kAliHLTDataTypeTObjArray;         // {ROOTOBAR,"***"}
+                                                                                       
+  /** ROOT TTree */                                                                    
+  extern const AliHLTComponentDataType kAliHLTDataTypeTTree;             // {ROOTTREE,"***"}
+                                                                                       
+  /** ROOT TH1 (can be used for all histograms, they derive from TH1) */               
+  extern const AliHLTComponentDataType kAliHLTDataTypeHistogram;         // {ROOTHIST,"***"}
+                                                                                       
+  /** ROOT TNtuple */                                                                  
+  extern const AliHLTComponentDataType kAliHLTDataTypeTNtuple;           // {ROOTTUPL,"***"}
+
   //////////////////////////////////////////////////////////////////////////
   //
   // FXS subscriber meta information
   //
   //////////////////////////////////////////////////////////////////////////
 
-  static const int gkAliHLTFXSHeaderfOriginSize = 4;
-  static const int gkAliHLTFXSHeaderfFileIDSize = 128;
-  static const int gkAliHLTFXSHeaderfDDLNumberSize = 64;
+  const int gkAliHLTFXSHeaderfOriginSize = 4;
+  const int gkAliHLTFXSHeaderfFileIDSize = 128;
+  const int gkAliHLTFXSHeaderfDDLNumberSize = 64;
 
   /** Header in front of the data payload, in order to sent data to the FXS. */
   struct AliHLTFXSHeader
@@ -466,33 +615,53 @@ extern "C" {
 //////////////////////////////////////////////////////////////////////////
 
 inline bool operator==( const AliHLTComponentDataType& dt1, const AliHLTComponentDataType& dt2 )
-    {
-    for ( int i = 0; i < kAliHLTComponentDataTypefIDsize; i++ )
-       if ( dt1.fID[i] != dt2.fID[i] )
-           return false;
-    for ( int i = 0; i < kAliHLTComponentDataTypefOriginSize; i++ )
-       if ( dt1.fOrigin[i] != dt2.fOrigin[i] )
-           return false;
-    return true;
-    }
+{
+  bool any1=true, any2=true, void1=true, void2=true, match=true;
+  for ( int i = 0; i < kAliHLTComponentDataTypefOriginSize; i++ ) {
+    any1&=(dt1.fOrigin[i]==kAliHLTDataOriginAny[i]);
+    any2&=(dt2.fOrigin[i]==kAliHLTDataOriginAny[i]);
+    void1&=(dt1.fOrigin[i]==kAliHLTDataOriginVoid[i]);
+    void2&=(dt2.fOrigin[i]==kAliHLTDataOriginVoid[i]);
+    match&=dt1.fOrigin[i]==dt2.fOrigin[i];
+    if (!(match || (any2 && !void1) || (any1 && !void2)))
+      return false;
+  }
+
+  any1=true, any2=true, match=true;
+  for ( int i = 0; i < kAliHLTComponentDataTypefIDsize; i++ ) {
+    any1&=(dt1.fID[i]==kAliHLTAnyDataTypeID[i]);
+    any2&=(dt2.fID[i]==kAliHLTAnyDataTypeID[i]);
+    void1&=(dt1.fID[i]==kAliHLTVoidDataTypeID[i]);
+    void2&=(dt2.fID[i]==kAliHLTVoidDataTypeID[i]);
+    match&=dt1.fID[i]==dt2.fID[i];
+    if (!(match || (any2 && !void1) || (any1 && !void2)))
+      return false;
+  }
+  return true;
+}
 
 inline bool operator!=( const AliHLTComponentDataType& dt1, const AliHLTComponentDataType& dt2 )
-    {
-    for ( int i = 0; i < kAliHLTComponentDataTypefIDsize; i++ )
-       if ( dt1.fID[i] != dt2.fID[i] )
-           return true;
-    for ( int i = 0; i < kAliHLTComponentDataTypefOriginSize; i++ )
-       if ( dt1.fOrigin[i] != dt2.fOrigin[i] )
-           return true;
-    return false;
-    }
+{
+  return !(dt1==dt2);
+}
+
+inline bool MatchExactly( const AliHLTComponentDataType& dt1, const AliHLTComponentDataType& dt2 )
+{
+  for ( int i = 0; i < kAliHLTComponentDataTypefIDsize; i++ )
+    if ( dt1.fID[i] != dt2.fID[i] )
+      return false;
+  for ( int i = 0; i < kAliHLTComponentDataTypefOriginSize; i++ )
+    if ( dt1.fOrigin[i] != dt2.fOrigin[i] )
+      return false;
+  return true;
+}
 
 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;
-    }
+{
+  AliHLTComponentDataType dt=srcdt;
+  for ( int i = 0; i < kAliHLTComponentDataTypefOriginSize; i++ )
+    dt.fOrigin[i]=origin[i];
+  return dt;
+}
 
 #endif