]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/BASE/util/AliHLTLoaderPublisherComponent.cxx
correct compilation warnings
[u/mrichter/AliRoot.git] / HLT / BASE / util / AliHLTLoaderPublisherComponent.cxx
index b77a935317742156a2d28d3f39e7315c0814b850..ea8905704a1b37e4a0abbae705af2dcad540804e 100644 (file)
     @brief  A general tree publisher component for the AliLoader.
 */
 
+// see header file for class documentation
+// or
+// refer to README to build package
+// or
+// visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
+
 #include "AliHLTLoaderPublisherComponent.h"
 #include "AliRunLoader.h"
 #include "AliLoader.h"
 #include "AliLog.h"
 #include "TTree.h"
 
-/** global instance for agent registration */
-AliHLTLoaderPublisherComponent gAliHLTLoaderPublisherComponent;
-
 /** ROOT macro for the implementation of ROOT specific class methods */
 ClassImp(AliHLTLoaderPublisherComponent)
 
@@ -41,7 +44,7 @@ AliHLTLoaderPublisherComponent::AliHLTLoaderPublisherComponent()
   fTreeType("digits"),
   fVerbose(kFALSE),
   fDataType(kAliHLTAnyDataType),
-  fSpecification(0),
+  fSpecification(kAliHLTVoidDataSpec),
   fpLoader(NULL)
 {
   // see header file for class documentation
@@ -64,11 +67,13 @@ const char* AliHLTLoaderPublisherComponent::GetComponentID()
 
 AliHLTComponentDataType AliHLTLoaderPublisherComponent::GetOutputDataType()
 {
+  // see header file for class documentation
   return fDataType;
 }
 
 void AliHLTLoaderPublisherComponent::GetOutputDataSize( unsigned long& constBase, double& inputMultiplier )
 {
+  // see header file for class documentation
   constBase=fMaxSize;
   inputMultiplier=1;
 }
@@ -139,7 +144,7 @@ int AliHLTLoaderPublisherComponent::DoInit( int argc, const char** argv )
   if (iResult<0) return iResult;
 
   if (fLoaderType.IsNull()) {
-    HLTError("loader type required, use \'-loader\' option");
+    AliErrorStream() << "loader type required, use \'-loader\' option" << endl;
     return -EINVAL;
   }
 
@@ -191,10 +196,14 @@ int AliHLTLoaderPublisherComponent::DoDeinit()
   return iResult;
 }
 
-int AliHLTLoaderPublisherComponent::GetEvent(const AliHLTComponentEventData& evtData,
-                                                AliHLTComponentTriggerData& trigData)
+int AliHLTLoaderPublisherComponent::GetEvent(const AliHLTComponentEventData& /*evtData*/,
+                                            AliHLTComponentTriggerData& /*trigData*/)
 {
   // see header file for class documentation
+
+  // process data events only
+  if (!IsDataEvent()) return 0;
+
   int iResult=0;
   // fetch runLoader instance from interface
   AliRunLoader* pRunLoader=GetRunLoader();
@@ -208,12 +217,14 @@ int AliHLTLoaderPublisherComponent::GetEvent(const AliHLTComponentEventData& evt
     }
   } else {
     AliErrorStream() << "component not initialized" << endl;
+    iResult=-EFAULT;
   }
   return iResult;
 }
 
 TTree* AliHLTLoaderPublisherComponent::GetTree()
 {
+  // see header file for class documentation
   TTree* pTree=NULL;
   if (fpLoader) {
     if (fTreeType.CompareTo("digits")==0)