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 // see header file for class documentation
18 // refer to README to build package
20 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
22 #include "AliHLTOfflineDataSource.h"
27 * @class AliHLTLoaderPublisherComponent
28 * A general tree publisher component for the AliLoader.
30 * Component ID: \b AliLoaderPublisher <br>
31 * Library: \b libAliHLTUtil.
33 * Mandatory arguments: <br>
34 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formating -->
35 * \li -loader <i> loader name </i>
36 * e.g. <tt> -loader TPCLoader </tt>
37 * \li -tree <i> tree name </i> : digits (default), clusters
38 * e.g. <tt> -tree digits </tt>
40 * print out some more info messages, mainly for the sake of tutorials
41 * \li -datatype <i> datatype dataorigin </i> <br>
42 * data type ID and origin, e.g. <tt>-datatype DIGITS TPC </tt>
43 * \li -dataspec <i> specification </i> <br>
44 * data specification treated as decimal number or hex number if
47 * Optional arguments:<br>
50 * @ingroup alihlt_system
52 class AliHLTLoaderPublisherComponent : public AliHLTOfflineDataSource {
54 /** standard constructor */
55 AliHLTLoaderPublisherComponent();
57 virtual ~AliHLTLoaderPublisherComponent();
60 * Get the id of the component.
61 * Each component is identified by a unique id.
62 * The function is pure virtual and must be implemented by the child class.
63 * @return component id (string)
65 const char* GetComponentID();
68 * Get the output data type of the component.
69 * The function is pure virtual and must be implemented by the child class.
70 * @return output data type
72 AliHLTComponentDataType GetOutputDataType();
75 * Get a ratio by how much the data volume is shrinked or enhanced.
76 * The function is pure virtual and must be implemented by the child class.
77 * @param constBase <i>return</i>: additive part, independent of the
79 * @param inputMultiplier <i>return</i>: multiplication ratio
80 * @return values in the reference variables
82 void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
86 * Each component must implement a spawn function to create a new instance of
87 * the class. Basically the function must return <i>new <b>my_class_name</b></i>.
88 * @return new class instance
90 virtual AliHLTComponent* Spawn();
96 int DoInit( int argc, const char** argv );
104 * Data source method.
105 * @param evtData event data structure
106 * @param trigData trigger data structure
109 int GetEvent(const AliHLTComponentEventData& evtData,
110 AliHLTComponentTriggerData& trigData);
113 /** copy constructor prohibited */
114 AliHLTLoaderPublisherComponent(const AliHLTLoaderPublisherComponent&);
115 /** assignment operator prohibited */
116 AliHLTLoaderPublisherComponent& operator=(const AliHLTLoaderPublisherComponent&);
119 * Get tree of type specified in fTreeType from loader.
123 /** max output block size, estimated during DoInit */
124 Int_t fMaxSize; //!transient
127 TString fLoaderType; //!transient
130 TString fTreeType; //!transient
132 /** be verbose: info printouts */
133 Bool_t fVerbose; //!transient
136 AliHLTComponentDataType fDataType; //!transient
138 /** data specification */
139 AliHLTUInt32_t fSpecification; //!transient
141 /** instance of the AliLoader */
142 AliLoader* fpLoader; //!transient
144 ClassDef(AliHLTLoaderPublisherComponent, 0);