code cleanup, delete some backward compatibility code and call functions of AliHLTSys...
authorrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 8 Apr 2010 07:01:52 +0000 (07:01 +0000)
committerrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 8 Apr 2010 07:01:52 +0000 (07:01 +0000)
the code concerned old AliRoot version where the HLT/rec was not part of the HLT build system
long in the past

HLT/rec/AliHLTReconstructor.cxx
HLT/rec/AliHLTReconstructor.h

index 5e79d6668fc9711a14f704b9d70de83f8fe1a43e..9689dfa745bdfa1a696c55e07b76b329fbc6c0db 100644 (file)
 //* provided "as is" without express or implied warranty.                  *
 //**************************************************************************
 
-/** @file   AliHLTReconstructor.cxx
-    @author Matthias Richter
-    @date   
-    @brief  Binding class for HLT reconstruction in AliRoot. */
+//  @file   AliHLTReconstructor.cxx
+//  @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 <TSystem.h>
 #include <TObjString.h>
 
 class AliCDBEntry;
 
+/** ROOT macro for the implementation of ROOT specific class methods */
 ClassImp(AliHLTReconstructor)
 
 AliHLTReconstructor::AliHLTReconstructor()
-  : 
-  AliReconstructor(),
-  fFctProcessHLTOUT(NULL),
-  fpEsdManager(NULL),
-  fpPluginBase(new AliHLTPluginBase)
+  : AliReconstructor()
+  , fpEsdManager(NULL)
+  , fpPluginBase(new AliHLTPluginBase)
   , fFlags(0)
 { 
   //constructor
 }
 
 AliHLTReconstructor::AliHLTReconstructor(const char* options)
-  : 
-  AliReconstructor(),
-  fFctProcessHLTOUT(NULL),
-  fpEsdManager(NULL),
-  fpPluginBase(new AliHLTPluginBase)
+  : AliReconstructor()
+  , fpEsdManager(NULL)
+  , fpPluginBase(new AliHLTPluginBase)
   , fFlags(0)
 { 
   //constructor
@@ -190,16 +189,8 @@ void AliHLTReconstructor::Init()
   }
 
   if (!pSystem->CheckStatus(AliHLTSystem::kReady)) {
-    typedef int (*AliHLTSystemSetOptions)(AliHLTSystem* pInstance, const char* options);
-    gSystem->Load("libHLTinterface.so");
-    AliHLTSystemSetOptions pFunc=(AliHLTSystemSetOptions)(gSystem->DynFindSymbol("libHLTinterface.so", "AliHLTSystemSetOptions"));
-    if (pFunc) {
-      if ((pFunc)(pSystem, option.Data())<0) {
+    if (pSystem->ScanOptions(option.Data())<0) {
       AliError("error setting options for HLT system");
-      return;  
-      }
-    } else if (option.Length()>0) {
-      AliError(Form("version of HLT system does not support the options \'%s\'", option.Data()));
       return;
     }
     if ((pSystem->Configure())<0) {
@@ -208,9 +199,6 @@ void AliHLTReconstructor::Init()
     }
   }
 
-  gSystem->Load("libHLTinterface.so");
-  fFctProcessHLTOUT=(void (*)())gSystem->DynFindSymbol("libHLTinterface.so", "AliHLTSystemProcessHLTOUT");
-
   fpEsdManager=AliHLTEsdManager::New();
   fpEsdManager->SetOption(esdManagerOptions.Data());
 
@@ -471,13 +459,10 @@ void AliHLTReconstructor::ProcessHLTOUT(AliHLTOUT* pHLTOUT, AliESDEvent* esd, bo
     }
   }
 
-  if (fFctProcessHLTOUT) {
-    typedef int (*AliHLTSystemProcessHLTOUT)(AliHLTSystem* pInstance, AliHLTOUT* pHLTOUT, AliESDEvent* esd);
-    AliHLTSystemProcessHLTOUT pFunc=(AliHLTSystemProcessHLTOUT)fFctProcessHLTOUT;
-    if ((pFunc)(pSystem, pHLTOUT, esd)<0) {
-      AliError("error processing HLTOUT");
-    }
+  if (pSystem->ProcessHLTOUT(pHLTOUT, esd)<0) {
+    AliError("error processing HLTOUT");
   }
+
   if (bVerbose) {
     AliInfo("HLT ESD content:");
     esd->Print();
index 4db5e6a740837284d5dd558dffd5932fb9ed5f6a..8adc7c181a4d1d030c05f012a033e3aac36179d3 100644 (file)
@@ -1,4 +1,5 @@
-// @(#) $Id$
+//-*- Mode: C++ -*-
+// $Id$
 
 #ifndef ALIHLTRECONSTRUCTOR_H
 #define ALIHLTRECONSTRUCTOR_H
@@ -6,11 +7,12 @@
 //* 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"
 
@@ -312,9 +314,6 @@ private:
   /** 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
 
@@ -325,7 +324,7 @@ private:
 
   static const char* fgkCalibStreamerInfoEntry; //! OCDB path
 
-  ClassDef(AliHLTReconstructor, 7)   // class for the HLT reconstruction
+  ClassDef(AliHLTReconstructor, 8)   // class for the HLT reconstruction
 
 };