@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)
fTreeType("digits"),
fVerbose(kFALSE),
fDataType(kAliHLTAnyDataType),
- fSpecification(0),
+ fSpecification(kAliHLTVoidDataSpec),
fpLoader(NULL)
{
// see header file for class documentation
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;
}
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;
}
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();
}
} 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)