]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/BASE/AliHLTComponentHandler.cxx
obsolete method removed from AliHLTLogging
[u/mrichter/AliRoot.git] / HLT / BASE / AliHLTComponentHandler.cxx
index 2e98397ca469384d01d3d960d7042ffcf4e823e3..26f42f4a8ab8dd30e6310b8105f91922ebd6eb9e 100644 (file)
@@ -38,10 +38,10 @@ using namespace std;
 #include "AliHLTSystem.h"
 
 // the standard components
-#include "AliHLTFilePublisher.h"
+// #include "AliHLTFilePublisher.h"
 #include "AliHLTFileWriter.h"
-#include "AliHLTRootFilePublisherComponent.h"
-#include "AliHLTRootFileWriterComponent.h"
+// #include "AliHLTRootFilePublisherComponent.h"
+// #include "AliHLTRootFileWriterComponent.h"
 
 /** ROOT macro for the implementation of ROOT specific class methods */
 ClassImp(AliHLTComponentHandler)
@@ -74,7 +74,13 @@ AliHLTComponentHandler::AliHLTComponentHandler(AliHLTComponentEnvironment* pEnv)
   // see header file for class documentation
   if (pEnv) {
     memcpy(&fEnvironment, pEnv, sizeof(AliHLTComponentEnvironment));
-    AliHLTLogging::Init(pEnv->fLoggingFunc);
+    if (pEnv->fLoggingFunc) {
+      // the AliHLTLogging::Init method also sets the stream output
+      // and notification handler to AliLog. This should only be done
+      // if the logging environment contains a logging function
+      // for redirection
+      AliHLTLogging::Init(pEnv->fLoggingFunc);
+    }
   }  else
     memset(&fEnvironment, 0, sizeof(AliHLTComponentEnvironment));
   AddStandardComponents();
@@ -236,7 +242,13 @@ void AliHLTComponentHandler::SetEnvironment(AliHLTComponentEnvironment* pEnv)
   // see header file for class documentation
   if (pEnv) {
     memcpy(&fEnvironment, pEnv, sizeof(AliHLTComponentEnvironment));
-    AliHLTLogging::Init(fEnvironment.fLoggingFunc);
+    if (fEnvironment.fLoggingFunc) {
+      // the AliHLTLogging::Init method also sets the stream output
+      // and notification handler to AliLog. This should only be done
+      // if the logging environment contains a logging function
+      // for redirection
+      AliHLTLogging::Init(fEnvironment.fLoggingFunc);
+    }
   }
 }
 
@@ -313,10 +325,10 @@ int AliHLTComponentHandler::AddStandardComponents()
   // see header file for class documentation
   int iResult=0;
   AliHLTComponent::SetGlobalComponentHandler(this);
-  fStandardList.push_back(new AliHLTFilePublisher);
+//   fStandardList.push_back(new AliHLTFilePublisher);
   fStandardList.push_back(new AliHLTFileWriter);
-  fStandardList.push_back(new AliHLTRootFilePublisherComponent);
-  fStandardList.push_back(new AliHLTRootFileWriterComponent);
+//   fStandardList.push_back(new AliHLTRootFilePublisherComponent);
+//   fStandardList.push_back(new AliHLTRootFileWriterComponent);
   AliHLTComponent::UnsetGlobalComponentHandler();
   iResult=RegisterScheduledComponents();
   return iResult;