]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/rec/AliHLTReconstructor.h
deleting unused variable
[u/mrichter/AliRoot.git] / HLT / rec / AliHLTReconstructor.h
index d58be1f612fbd72454f1df9b8d793edaee540455..a97d1898ca4ebb8d30c81837098b9bf9520c04b8 100644 (file)
@@ -1,4 +1,5 @@
-// @(#) $Id$
+//-*- Mode: C++ -*-
+// $Id$
 
 #ifndef ALIHLTRECONSTRUCTOR_H
 #define ALIHLTRECONSTRUCTOR_H
@@ -6,40 +7,52 @@
 //* ALICE Experiment at CERN, All rights reserved.                         *
 //* See cxx source for full Copyright notice                               *
 
-/** @file   AliHLTReconstructor.h
-    @author Matthias Richter
-    @date   
-    @brief  Binding class for HLT simulation in AliRoot
-*/
+//  @file   AliHLTReconstructor.h
+//  @author Matthias Richter
+//  @date   
+//  @brief  Binding class for HLT reconstruction in AliRoot
+//          Implements bot the interface to run HLT chains embedded into
+//          AliReconstruction and the unpacking and treatment of HLTOUT
 
 #include "AliReconstructor.h"
-#include "AliHLTReconstructorBase.h"
 
 class AliHLTSystem;
 class AliRawReader;
 class AliESDEvent;
 class AliHLTOUT;
 class AliHLTEsdManager;
+class AliHLTPluginBase;
 /**
  * @defgroup alihlt_aliroot_reconstruction AliRoot reconstruction.
  *
+ * @section alihlt_aliroot_reconstruction_intro General Remarks
  * Like all other ALICE detectors, HLT utilizes the AliReconstruction interface
  * to implement a plugin for the AliRoot reconstruction. The reconstructor can be
  * used to
- * - run HLT analysis chains in the AliRoot reconstruction <br>
- *   This option is mainly intended for the development and debugging cycle. HLT
- *   chains can be defined by means of AliHLTConfiguration and can be run either
- *   stand-alone or embedded into the AliReconstruction cycle.
- * - run the default analysis chains <br>
- *   HLT modules can define default analysis chains to be run during AliRoot
- *   reconstruction.
- * - handle the HLTOUT data<br>
- *   The HLT output stream contains multiple data blocks produced by the various
- *   components of the HLT chain. Each block might need different and even
- *   detector specific processing, like e.g. the processing of ESD objects or the
- *   handling of compressed data.
+ * -# run HLT analysis chains in the AliRoot reconstruction <br>
+ *    This option is mainly intended for the <em>development and debugging cycle</em>. 
+ *    HLT chains can be defined by means of AliHLTConfiguration and can be run either
+ *    stand-alone or embedded into the AliReconstruction cycle.
+ * -# run the default analysis chains <br>
+ *    HLT modules can define default analysis chains to be run during AliRoot
+ *    reconstruction.
+ * -# handle the HLTOUT data<br>
+ *    The HLT output stream contains multiple data blocks produced by the various
+ *    components of the HLT chain. Each block might need different and even
+ *    detector specific processing, like e.g. the processing of ESD objects or the
+ *    handling of compressed data.
+ *
+ * @section alihlt_aliroot_reconstruction_steering Steering
+ * The AliHLTReconstructor provides the main interface for the reconstruction. 
+ * The handling of the HLTOUT data is described in AliRawReaderHLT.
+ *
+ * @section alihlt_aliroot_reconstruction_examples Examples
+ * @subsection alihlt_aliroot_reconstruction_examples_reco Run chains
+ * - @ref tut_reconstruction
+ *
+ * @subsection alihlt_aliroot_reconstruction_examples_hltout Handle HLTOUT
+ * - @ref tut_alirawreaderhlt
  *
- * The AliHLTReconstructor provides the main interface for this group.
  * @ingroup alihlt_system
  */
 
@@ -72,6 +85,12 @@ class AliHLTEsdManager;
  *     level can be a hex number encoding the @ref AliHLTComponentLogSeverity
  * \li alilog=off <br>
  *     disables the logging of HLT log messages through <tt>AliLog</tt> <br>
+ * \li ignore-hltout <br>
+ *     ignore data from the HLTOUT data links
+ * \li ignore-ctp <br>
+ *     ignore CTP trigger setup
+ * \li esdmanager=<option> <br>
+ *     options passed to the AliHLTEsdManager
  *
  * For further information on the AliRoot reconstruction refer to the AliRoot
  * documentation, namely <tt>AliReconstruction</tt>.
@@ -112,18 +131,28 @@ class AliHLTEsdManager;
  *
  * @subsection sec_alihltreconstructor_hltout_esd ESD HLTOUT data
  * The framework implements a standard handling of ESD data
- * blocks of type ::kAliHLTDataTypeESDTree {ESD_TREE:ANY}. \em ANY can be
+ * blocks of type ::kAliHLTDataTypeESDObject {ALIESDV0:ANY} and 
+ * ::kAliHLTDataTypeESDTree {ESD_TREE:ANY}. Please note that the V0 refers to
+ * a foreseen version number, not the AliESDV0 class. \em ANY can be
  * any detector origin. Each ESD block contains the data of only one event,
- * the ESDs are merged by the AliHLTEsdManager and written to files of the
- * naming scheme AliHLT\lt\em DET \gt ESDs.root. The first ESD block is also copied
- * to the hltEsd provided by the AliReconstruction. This is a temporary
- * solution as the handling and merging of HLT ESDs is under discussion.
- * At the time of writing (May 08) only the TPC HLT components produce ESD
- * blocks.
+ * the ESDs are merged by the AliHLTEsdManager into the hltEsd. Optionally,
+ * ESD contributions are written to files following the naming scheme
+ * AliHLT\em DET ESDs.root. This debugging feature can be enabled by option
+ * esdmanager='-writelocal -directory=dir'. The specification of target
+ * directory is optional.
+ *
  * The module agent can provide a handler for multiple ESD data blocks, e.g.
  * for merging within one event prior to the writing. Instead of the individual
  * ESDs the one provided by the handler is passed to the AliHLTEsdManager. The
  * handler is of type \link AliHLTModuleAgent::AliHLTOUTHandlerType kEsd \endlink.
+ * 
+ * A specific handler AliHLTOUTHandlerEsdBranch allows to simply merge a
+ * streamed Root object into the ESD. The class can be used as-is by just
+ * specifying the data type and specification of the relevant data block and
+ * the branch name. Alternatively, a child class can implement conversion of
+ * binary data to a Root object or merging of several data blocks into one
+ * object to be added to the ESD. \b Note: in order to create the branch at
+ * the beginning of reconstruction the hltEsd layout needs to be adjusted.
  *
  * @subsection sec_alihltreconstructor_hltout_rawreader DDL raw HLTOUT data
  * The HLT can perform selective readout and produces a reduced amount of data
@@ -145,9 +174,12 @@ class AliHLTEsdManager;
  * first stage of the offline reconstruction might need some adaptions.
  *
  * @subsection sec_alihltreconstructor_hltout_chain HLTOUT data fed into a chain
- * At the time of writing (May 08), handler type 
- * \link AliHLTModuleAgent::AliHLTOUTHandlerType kChain \endlink
- * is foreseen but not yet implemented. Has to be discussed.
+ * Handlers of type \link AliHLTModuleAgent::AliHLTOUTHandlerType kChain \endlink
+ * can execute a normal HLT chain and thus process HLTOUT data blocks by normal
+ * HLT components just as if the components were running on-line. The base class
+ * is provided by AliHLTOUTHandlerChain and can be used as it is just specifying
+ * the chain to be run.<br>
+ * Example:
  *
  * @subsection sec_alihltreconstructor_hltout_proprietary Proprietary HLTOUT data
  * This is a handler of proprietary detector data. Handlers of type 
@@ -156,6 +188,16 @@ class AliHLTEsdManager;
  * stored to files.
  *
  * @section sec_alihltreconstructor_helper Tools and helper functions
+ * Some helper functions of the AliHLTReconstruction can be used in stand-alone
+ * mode. Remember to Init() the reconstructor.
+ * <pre>
+ * {
+ * gSystem->Load("libHLTrec.so");
+ * AliHLTReconstructor rec;
+ * rec.Init();
+ * // do something
+ * }
+ * </pre>
  * @subsection sec_alihltreconstructor_hltout_standalone Stand-alone HLTOUT processing
  * - HLTOUT processing from a digit file:
  * <pre>
@@ -169,7 +211,7 @@ class AliHLTEsdManager;
  * @ingroup alihlt_aliroot_reconstruction
  * @section sec_alihltreconstructor_members Class members
  */
-class AliHLTReconstructor: public AliReconstructor, public AliHLTReconstructorBase {
+class AliHLTReconstructor: public AliReconstructor {
 public:
   /** standard constructor */
   AliHLTReconstructor();
@@ -184,6 +226,13 @@ public:
   /** init the reconstructor */
   void Init(const char* options);
 
+  void Terminate() const;
+
+  /**
+   * Build the CTP_TRIGGER_CLASSES string from CTP trigger configuration
+   */
+  int BuildCTPTriggerClassString(TString& triggerclasses) const;
+
   /**
    * This Reconstructor function is not applicable for the AliHLTReconstructor
    * as it gets a detector specific digits tree. But HLT processes all detectors.
@@ -226,7 +275,7 @@ public:
    * processed and may add additional data to the HLTOUT object. This data is then
    * treated in the same way.
    */
-  void ProcessHLTOUT(AliHLTOUT* pHLTOUT, AliESDEvent* esd) const;
+  void ProcessHLTOUT(AliHLTOUT* pHLTOUT, AliESDEvent* esd, bool bVerbose=false) const;
 
   /**
    * Process HLTOUT data.
@@ -255,19 +304,30 @@ public:
    */
   void PrintHLTOUTContent(AliHLTOUT* pHLTOUT) const;
 
+  enum {
+    /// ignore the blocks from the HLTOUT payload
+    kAliHLTReconstructorIgnoreHLTOUT = 0x1,
+    kAliHLTReconstructorIgnoreCTP = 0x2,
+    kAliHLTReconstructorLastFlag
+  };
+
 private:
   /** copy constructor prohibited */
   AliHLTReconstructor(const AliHLTReconstructor& src);
   /** assignment operator prohibited */
   AliHLTReconstructor& operator=(const AliHLTReconstructor& src);
 
-  /** function pointer: processing of HLTOUT data */
-  void* fFctProcessHLTOUT; //!transient
-
   /** ESD manger instance for this reconstruction */
   AliHLTEsdManager* fpEsdManager; //!transient
 
-  ClassDef(AliHLTReconstructor, 5)   // class for the HLT reconstruction
+  /** base class for AliRoot HLT plugins */
+  AliHLTPluginBase* fpPluginBase;                                     //!transient
+
+  UInt_t fFlags; //! transient
+
+  static const char* fgkCalibStreamerInfoEntry; //! OCDB path
+
+  ClassDef(AliHLTReconstructor, 8)   // class for the HLT reconstruction
 
 };