4 #ifndef ALIHLTLOADERPUBLISHERCOMPONENT_H
5 #define ALIHLTLOADERPUBLISHERCOMPONENT_H
6 /* This file is property of and copyright by the ALICE HLT Project *
7 * ALICE Experiment at CERN, All rights reserved. *
8 * See cxx source for full Copyright notice */
10 /** @file AliHLTLoaderPublisherComponent.h
11 @author Matthias Richter
13 @brief A general tree publisher component for the AliLoader.
16 #include "AliHLTOfflineDataSource.h"
21 * @class AliHLTLoaderPublisherComponent
22 * A general tree publisher component for the AliLoader.
24 * Component ID: \b AliLoaderPublisher <br>
25 * Library: \b libAliHLTUtil.
27 * Mandatory arguments: <br>
28 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formating -->
29 * \li -loader <i> loader name </i>
30 * e.g. <tt> -loader TPCLoader </tt>
31 * \li -tree <i> tree name </i> : digits (default), clusters
32 * e.g. <tt> -tree digits </tt>
34 * print out some more info messages, mainly for the sake of tutorials
35 * \li -datatype <i> datatype dataorigin </i> <br>
36 * data type ID and origin, e.g. <tt>-datatype DIGITS TPC </tt>
37 * \li -dataspec <i> specification </i> <br>
38 * data specification treated as decimal number or hex number if
41 * Optional arguments:<br>
44 * @ingroup alihlt_system
46 class AliHLTLoaderPublisherComponent : public AliHLTOfflineDataSource {
48 /** standard constructor */
49 AliHLTLoaderPublisherComponent();
51 virtual ~AliHLTLoaderPublisherComponent();
54 * Get the id of the component.
55 * Each component is identified by a unique id.
56 * The function is pure virtual and must be implemented by the child class.
57 * @return component id (string)
59 const char* GetComponentID();
62 * Get the output data type of the component.
63 * The function is pure virtual and must be implemented by the child class.
64 * @return output data type
66 AliHLTComponentDataType GetOutputDataType();
69 * Get a ratio by how much the data volume is shrinked or enhanced.
70 * The function is pure virtual and must be implemented by the child class.
71 * @param constBase <i>return</i>: additive part, independent of the
73 * @param inputMultiplier <i>return</i>: multiplication ratio
74 * @return values in the reference variables
76 void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
80 * Each component must implement a spawn function to create a new instance of
81 * the class. Basically the function must return <i>new <b>my_class_name</b></i>.
82 * @return new class instance
84 virtual AliHLTComponent* Spawn();
90 int DoInit( int argc, const char** argv );
99 * @param evtData event data structure
100 * @param trigData trigger data structure
103 int GetEvent(const AliHLTComponentEventData& evtData,
104 AliHLTComponentTriggerData& trigData);
107 /** not a valid copy constructor, defined according to effective C++ style */
108 AliHLTLoaderPublisherComponent(const AliHLTLoaderPublisherComponent&);
109 /** not a valid assignment op, but defined according to effective C++ style */
110 AliHLTLoaderPublisherComponent& operator=(const AliHLTLoaderPublisherComponent&);
113 * Get tree of type specified in fTreeType from loader.
117 /** max output block size, estimated during DoInit */
118 Int_t fMaxSize; //!transient
121 TString fLoaderType; //!transient
124 TString fTreeType; //!transient
126 /** be verbose: info printouts */
127 Bool_t fVerbose; //!transient
130 AliHLTComponentDataType fDataType; //!transient
132 /** data specification */
133 AliHLTUInt32_t fSpecification; //!transient
135 /** instance of the AliLoader */
136 AliLoader* fpLoader; //!transient
138 ClassDef(AliHLTLoaderPublisherComponent, 0);