Adding custom linkdef file so that dictionaries are correctly generated for AliHLTTri...
[u/mrichter/AliRoot.git] / HLT / BASE / util / AliHLTRootFilePublisherComponent.h
CommitLineData
4ddfc222 1// -*- Mode: C++ -*-
5566e798 2// $Id$
4ddfc222 3
4#ifndef ALIHLTROOTFILEPUBLISHERCOMPONENT_H
5#define ALIHLTROOTFILEPUBLISHERCOMPONENT_H
5566e798 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 *
4ddfc222 9
10/** @file AliHLTRootFilePublisherComponent.h
992ea13b 11 @author Matthias Richter, Jochen Thaeder
4ddfc222 12 @date
13 @brief component for publishing of Root objects from a root file.
14 @note The class is used in Offline (AliRoot) context
15*/
16
17#include "AliHLTFilePublisher.h"
18#include <TList.h>
19
20/**
21 * @class AliHLTRootFilePublisherComponent
992ea13b 22 * An HLT data source component which publishes root objects from one
23 * or a sequence of root files. Be aware, one root file can contain
5d79eb88 24 * several root objects. Either all objects or just one object can be selected.<br>
4ddfc222 25 *
992ea13b 26 * <h2>General properties:</h2>
4ddfc222 27 *
5d79eb88 28 * Component ID: \b ROOTFilePublisher <br>
992ea13b 29 * Library: \b libAliHLTUtil.so <br>
30 * Input Data Types: none <br>
31 * Output Data Types: according to arguments <br>
4ddfc222 32 *
992ea13b 33 * <h2>Mandatory arguments:</h2>
34 * @see AliHLTFilePublisher for mandatory defaultarguments
4ddfc222 35 *
992ea13b 36 * <h2>Optional arguments:</h2>
37 * @see AliHLTFilePublisher for optional default arguments
38 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
39 * \li -objectname <i> objectname </i>
40 * Name of the object in the root file to be fetched. This is set for
41 * all events/files. If not given, all objects are fetched.
42 *
43 * <h2>Configuration:</h2>
44 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
45 * Configuration by component arguments.
46 *
47 * <h2>Default CDB entries:</h2>
48 * The component loads no CDB entries.
49 *
50 * <h2>Performance:</h2>
51 * The component does not process any event data.
52 *
53 * <h2>Memory consumption:</h2>
54 * The component does not process any event data.
55 *
56 * <h2>Output size:</h2>
57 * According to the available data. The component is an AliHLTDataSource
58 * and inteded to be used in the AliHLTSystem framework only. The component
59 * implements the standard AliHLTSystem adaptive buffer allocation.
60 *
61 * The component needs at least one argument \em -datafile or \em -datafilelist.
62 * Both can occur multiple times. The \em -datatype and \em -dataspec
63 * parameters are valid for all files until the next occurrence of
64 * \em -datatype/spec.
65 * All files are published within one event, unless the \em -nexevent specifies
66 * where to break into multiple events. Be aware, one root file can contain
67 * several root objects. If \em -objectname is not used to select one, all
68 * objects are all published with the same datatype and specification.
5566e798 69 *
70 * @ingroup alihlt_util_components
4ddfc222 71 */
992ea13b 72
4ddfc222 73class AliHLTRootFilePublisherComponent : public AliHLTFilePublisher {
74 public:
992ea13b 75
76 /*
77 * ---------------------------------------------------------------------------------
78 * Constructor / Destructor
79 * ---------------------------------------------------------------------------------
80 */
81
4ddfc222 82 /** standard constructor */
83 AliHLTRootFilePublisherComponent();
992ea13b 84
4ddfc222 85 /** destructor */
86 virtual ~AliHLTRootFilePublisherComponent();
992ea13b 87
88 /*
89 * ---------------------------------------------------------------------------------
90 * Public functions to implement AliHLTComponent's interface.
91 * These functions are required for the registration process
92 * ---------------------------------------------------------------------------------
93 */
4ddfc222 94
992ea13b 95 /** interface function, see @ref AliHLTComponent for description */
4ddfc222 96 const char* GetComponentID();
992ea13b 97
98 /** interface function, see @ref AliHLTComponent for description */
4ddfc222 99 AliHLTComponent* Spawn();
100
992ea13b 101 protected:
102 /*
103 * ---------------------------------------------------------------------------------
104 * Protected functions to implement AliHLTComponent's interface.
105 * These functions provide initialization as well as the actual processing
106 * capabilities of the component.
107 * ---------------------------------------------------------------------------------
4ddfc222 108 */
4ddfc222 109
4ddfc222 110 /**
111 * Data processing method for the component.
112 * The component uses the @ref alihltcomponent-high-level-interface
113 * to put serialized Root object into the output stream. Despite of that it
992ea13b 114 * implements the low-level DumpEvent method in order to allow child classes
4ddfc222 115 * to use the low-level method.
116 * @param evtData event data structure
117 * @param trigData trigger data structure
14aa20d4 118 * @param outputPtr not used
119 * @param size not used
120 * @param outputBlocks not used
4ddfc222 121 * @return
122 */
992ea13b 123 Int_t GetEvent( const AliHLTComponentEventData& evtData,
14aa20d4 124 AliHLTComponentTriggerData& trigData,
125 AliHLTUInt8_t* outputPtr,
126 AliHLTUInt32_t& size,
127 vector<AliHLTComponentBlockData>& outputBlocks);
4ddfc222 128
a8abc5d5 129 using AliHLTFilePublisher::GetEvent;
130
4ddfc222 131 /**
132 * Scan one argument and adjacent parameters.
133 * Can be overloaded by child classes in order to add additional arguments
134 * beyond the standard arguments of the file publisher. The method is called
135 * whenever a non-standard argument is recognized.
136 * @param argc size of the argument array
137 * @param argv agument array for component initialization
138 * @return number of processed members of the argv <br>
139 * -EINVAL unknown argument <br>
140 * -EPROTO parameter for argument missing <br>
141 */
992ea13b 142 virtual Int_t ScanArgument(Int_t argc, const char** argv);
4ddfc222 143
144 private:
992ea13b 145
146 /*
147 * ---------------------------------------------------------------------------------
148 * Private functions to implement AliHLTComponent's interface.
149 * These functions provide initialization as well as the actual processing
150 * capabilities of the component.
151 * ---------------------------------------------------------------------------------
152 */
153
29312178 154 /** copy constructor prohibited */
155 AliHLTRootFilePublisherComponent(const AliHLTRootFilePublisherComponent&);
992ea13b 156
29312178 157 /** assignment operator prohibited */
158 AliHLTRootFilePublisherComponent& operator=(const AliHLTRootFilePublisherComponent&);
4ddfc222 159
992ea13b 160 /*
161 * ---------------------------------------------------------------------------------
162 * Members - private
163 * ---------------------------------------------------------------------------------
164 */
165
166 /** The current event */
167 TObjLink *fpCurrentEvent; //! transient
168
169 /** Name of the object which should be fetched
170 * from the root file.
171 */
172 TString fObjectName; //! objectname
173
4ddfc222 174 ClassDef(AliHLTRootFilePublisherComponent, 0)
175};
176#endif