init fixed after chenges by Cvetan; scanning of options moved to AliHLTSystem
authorrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 28 Sep 2007 12:22:20 +0000 (12:22 +0000)
committerrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 28 Sep 2007 12:22:20 +0000 (12:22 +0000)
HLT/src/AliHLTReconstructor.cxx
HLT/src/AliHLTReconstructor.h

index ef331b3c8c39b02540a0bff2f9ecaad619543921..a205994c67c47e66f9bfcfd92182925f7fa5f3cc 100644 (file)
@@ -81,29 +81,6 @@ AliHLTReconstructor::AliHLTReconstructor(Bool_t doTracker, Bool_t doHough)
 #endif
 }
 
-AliHLTReconstructor::AliHLTReconstructor(const AliHLTReconstructor&)
-  :
-  AliReconstructor(),
-  fDoHough(0),
-  fDoTracker(0),
-  fDoBench(0),
-  fDoCleanUp(0),
-  fpSystem(NULL)
-{
-  // not a valid copy constructor
-}
-
-AliHLTReconstructor& AliHLTReconstructor::operator=(const AliHLTReconstructor&)
-{
-  // not a valid assignment operator
-  fDoHough=0;
-  fDoTracker=0;
-  fDoBench=0;
-  fDoCleanUp=0;
-  fpSystem=NULL;
-  return *this;
-}
-
 AliHLTReconstructor::~AliHLTReconstructor()
 { 
   //destructor
@@ -138,6 +115,7 @@ void AliHLTReconstructor::Init()
   TString libs("");
   TString option = GetOption();
   TObjArray* pTokens=option.Tokenize(" ");
+  option="";
   if (pTokens) {
     int iEntries=pTokens->GetEntries();
     for (int i=0; i<iEntries; i++) {
@@ -160,7 +138,8 @@ void AliHLTReconstructor::Init()
        libs+=token;
        libs+=" ";
       } else {
-       AliWarning(Form("unknown option: %s", token.Data()));
+       if (option.Length()>0) option+=" ";
+       option+=token;
       }
     }
     delete pTokens;
@@ -179,12 +158,25 @@ void AliHLTReconstructor::Init()
     AliError("error while loading HLT libraries");
     return;
   }
-  // No run-loaders anymore...needs a fix
-//   if (!fpSystem->CheckStatus(AliHLTSystem::kReady) &&
-//       (fpSystem->Configure(runLoader))<0) {
-//     AliError("error during HLT system configuration");
-//     return;
-//   }
+
+  if (!fpSystem->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)(fpSystem, 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 ((fpSystem->Configure())<0) {
+      AliError("error during HLT system configuration");
+      return;
+    }
+  }
 }
 
 // void AliHLTReconstructor::Reconstruct(AliRunLoader* runLoader, AliRawReader* rawReader) const 
index de1547740be61cc54a78ad4694dc88306bc66b69..be6d32db85c108a817b8caf050cc1ad1a366c2e9 100644 (file)
@@ -42,10 +42,6 @@ class AliHLTReconstructor: public AliReconstructor {
 public:
   AliHLTReconstructor();
   AliHLTReconstructor(Bool_t doTracker, Bool_t doHough);
-  /** not a valid copy constructor, defined according to effective C++ style */
-  AliHLTReconstructor(const AliHLTReconstructor& src);
-  /** not a valid assignment op, but defined according to effective C++ style */
-  AliHLTReconstructor& operator=(const AliHLTReconstructor& src);
   /** destructor */
   virtual ~AliHLTReconstructor();
 
@@ -78,6 +74,11 @@ public:
 //  virtual void         FillDHLTRecPoint(AliRawReader* rawReader, Int_t nofEvent, Int_t dcCut) const;
 
 private:
+  /** copy constructor prohibited */
+  AliHLTReconstructor(const AliHLTReconstructor& src);
+  /** assignment operator prohibited */
+  AliHLTReconstructor& operator=(const AliHLTReconstructor& src);
+
 /*   void ReconstructWithConformalMapping(AliRunLoader* runLoader,Int_t iEvent) const; */
 /*   void ReconstructWithHoughTransform(AliRunLoader* runLoader,Int_t iEvent) const; */
 /*   void FillESDforConformalMapping(AliESDEvent* esd,Int_t iEvent) const; */