]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/BASE/util/AliHLTLoaderPublisherComponent.h
code documentation; minor enhancement of BlockFilter
[u/mrichter/AliRoot.git] / HLT / BASE / util / AliHLTLoaderPublisherComponent.h
CommitLineData
90ebac25 1//-*- Mode: C++ -*-
2// @(#) $Id$
3
4#ifndef ALIHLTLOADERPUBLISHERCOMPONENT_H
5#define ALIHLTLOADERPUBLISHERCOMPONENT_H
6daf06e2 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 *
90ebac25 9
10/** @file AliHLTLoaderPublisherComponent.h
11 @author Matthias Richter
12 @date
13 @brief A general tree publisher component for the AliLoader.
14*/
15
16#include "AliHLTOfflineDataSource.h"
17
18class AliLoader;
19
20/**
21 * @class AliHLTLoaderPublisherComponent
22 * A general tree publisher component for the AliLoader.
23 *
6daf06e2 24 * <h2>General properties:</h2>
25 *
a7ad9794 26 * Component ID: \b AliLoaderPublisher <br>
27 * Library: \b libAliHLTUtil.so <br>
28 * Input Data Types: none <br>
29 * Output Data Types: according to parameter, suggested types: <br>
30 * \li ::kAliHLTDataTypeAliTreeD for the digit tree
31 * \li ::kAliHLTDataTypeAliTreeR for the cluster tree
32 * , see @ref alihlt_component_datatypes <br>
90ebac25 33 *
6daf06e2 34 * <h2>Mandatory arguments:</h2>
1ac82ce6 35 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
90ebac25 36 * \li -loader <i> loader name </i>
37 * e.g. <tt> -loader TPCLoader </tt>
6daf06e2 38 *
39 * <h2>Optional arguments:</h2>
90ebac25 40 * \li -tree <i> tree name </i> : digits (default), clusters
41 * e.g. <tt> -tree digits </tt>
42 * \li -verbose<br>
43 * print out some more info messages, mainly for the sake of tutorials
44 * \li -datatype <i> datatype dataorigin </i> <br>
6daf06e2 45 * data type ID and origin, e.g. <tt>-datatype 'ALITREED' 'TPC ' </tt>
90ebac25 46 * \li -dataspec <i> specification </i> <br>
47 * data specification treated as decimal number or hex number if
48 * prepended by '0x'
49 *
6daf06e2 50 * <h2>Configuration:</h2>
51 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
52 * no configuration
53 *
54 * <h2>Default CDB entries:</h2>
55 * The component loads no CDB entries.
56 *
57 * <h2>Performance:</h2>
a7ad9794 58 * The component does not process any event data.
90ebac25 59 *
6daf06e2 60 * <h2>Memory consumption:</h2>
a7ad9794 61 * The component does not process any event data.
6daf06e2 62 *
63 * <h2>Output size:</h2>
a7ad9794 64 * According to the available data. The component is an AliHLTDataSource
65 * and inteded to be used in the AliHLTSystem framework only. The component
66 * implements the standard AliHLTSystem adaptive buffer allocation.
67 *
90ebac25 68 *
a7ad9794 69 * @ingroup alihlt_util_components
90ebac25 70 */
71class AliHLTLoaderPublisherComponent : public AliHLTOfflineDataSource {
72 public:
73 /** standard constructor */
74 AliHLTLoaderPublisherComponent();
75 /** destructor */
76 virtual ~AliHLTLoaderPublisherComponent();
77
78 /**
79 * Get the id of the component.
80 * Each component is identified by a unique id.
81 * The function is pure virtual and must be implemented by the child class.
82 * @return component id (string)
83 */
84 const char* GetComponentID();
85
86 /**
87 * Get the output data type of the component.
88 * The function is pure virtual and must be implemented by the child class.
89 * @return output data type
90 */
91 AliHLTComponentDataType GetOutputDataType();
92
93 /**
94 * Get a ratio by how much the data volume is shrinked or enhanced.
95 * The function is pure virtual and must be implemented by the child class.
96 * @param constBase <i>return</i>: additive part, independent of the
97 * input data volume
98 * @param inputMultiplier <i>return</i>: multiplication ratio
99 * @return values in the reference variables
100 */
101 void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
102
103 /**
104 * Spawn function.
105 * Each component must implement a spawn function to create a new instance of
106 * the class. Basically the function must return <i>new <b>my_class_name</b></i>.
107 * @return new class instance
108 */
109 virtual AliHLTComponent* Spawn();
110
111 protected:
112 /**
113 * Init method.
114 */
115 int DoInit( int argc, const char** argv );
116
117 /**
118 * Deinit method.
119 */
120 int DoDeinit();
121
122 /**
123 * Data source method.
124 * @param evtData event data structure
125 * @param trigData trigger data structure
126 * @return
127 */
128 int GetEvent(const AliHLTComponentEventData& evtData,
129 AliHLTComponentTriggerData& trigData);
130
a8abc5d5 131 using AliHLTOfflineDataSource::GetEvent;
132
90ebac25 133 private:
29312178 134 /** copy constructor prohibited */
79c114b5 135 AliHLTLoaderPublisherComponent(const AliHLTLoaderPublisherComponent&);
29312178 136 /** assignment operator prohibited */
79c114b5 137 AliHLTLoaderPublisherComponent& operator=(const AliHLTLoaderPublisherComponent&);
138
90ebac25 139 /**
140 * Get tree of type specified in fTreeType from loader.
141 */
142 TTree* GetTree();
143
56951e49 144 /** max output block size, estimated during DoInit */
90ebac25 145 Int_t fMaxSize; //!transient
146
147 /** loader string */
148 TString fLoaderType; //!transient
149
150 /** tree string */
151 TString fTreeType; //!transient
152
153 /** be verbose: info printouts */
154 Bool_t fVerbose; //!transient
155
156 /** data type */
157 AliHLTComponentDataType fDataType; //!transient
158
159 /** data specification */
160 AliHLTUInt32_t fSpecification; //!transient
161
162 /** instance of the AliLoader */
163 AliLoader* fpLoader; //!transient
164
165 ClassDef(AliHLTLoaderPublisherComponent, 0);
166};
167
168#endif