4 #ifndef ALIHLTOUTPUBLISHERCOMPONENT_H
5 #define ALIHLTOUTPUBLISHERCOMPONENT_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 AliHLTOUTPublisherComponent.h
11 @author Matthias Richter
13 @brief A data publisher for data block out of the HLTOUT data
16 #include "AliHLTOfflineDataSource.h"
19 * @class AliHLTOUTPublisherComponent
20 * A data publisher component for data blocks out of the HLTOUT data.
21 * All data blocks forwarded to the HLTOUT (either real or simulated),
22 * are encoded in HOMER format and stored in the HLT data links, or
23 * eventually the HLT digit file in case of simulation.
25 * This component publishes data blocks out of the HLTOUT data. To the
26 * subscribing components the data blocks seem to come directly from
27 * the producing component in the HLT analysis chain. The HLTOUT is just
28 * a transparent transport layer. Filter rules by data type and
29 * specification can be applied.
31 * <h2>General properties:</h2>
33 * Component ID: \b AliHLTOUTPublisher <br>
34 * Library: \b libAliHLTUtil.so <br>
35 * Input Data Types: none <br>
36 * Output Data Types: according to parameters and content of the HLTOUT <br>
38 * <h2>Mandatory arguments:</h2>
39 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
41 * <h2>Optional arguments:</h2>
42 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
43 * \li -datatype <i> id origin </i> <br>
44 * e.g. <tt> -datatype 'ESD_TREE' 'TPC ' </tt> <br>
45 * \b Note: due to the 4-character data origin it might be necessary to
46 * append a blank to the detectorname, e.g. <tt>TPC -> 'TPC '</tt>
48 * \li -origin <i> origin </i> <br>
49 * e.g. -origin 'TPC ', \b Note: the filter rule has type id 'ANY'
51 * \li -typeid <i> id </i> <br>
52 * e.g. -typeid ESD_TREE, \b Note: the filter rule has origin 'ANY'
54 * \li -dataspec <i> specification </i> <br>
55 * data specification treated as decimal number or hex number if
59 * print out some more info messages, mainly for the sake of tutorials
61 * <h2>Configuration:</h2>
62 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
63 * Configuration by component arguments.
65 * <h2>Default CDB entries:</h2>
66 * The component loads no CDB entries.
68 * <h2>Performance:</h2>
69 * The component does not process any event data.
71 * <h2>Memory consumption:</h2>
72 * The component does not process any event data.
74 * <h2>Output size:</h2>
75 * According to the available and selected data. The component is an
76 * AliHLTDataSource and inteded to be used in the AliHLTSystem framework
77 * only. The component implements the standard AliHLTSystem adaptive
80 * By default, all blocks will be published. By means of the \em -datatype,
81 * \em -origin, and \em -typeid arguments, the blocks can be selected. A list
82 * of filter rules can be built up by multiple usage of the arguments. Each
83 * time a new filter rule is added.
85 * No filtering by the data specification is applied unless then \em
86 * -specification argument is used. The specification applies to to the
87 * current filter rule, regardless of the sequence of -datatype/-specification
90 * @ingroup alihlt_util_components
92 class AliHLTOUTPublisherComponent : public AliHLTOfflineDataSource {
94 /** standard constructor */
95 AliHLTOUTPublisherComponent();
97 virtual ~AliHLTOUTPublisherComponent();
99 const char* GetComponentID();
100 AliHLTComponentDataType GetOutputDataType();
101 int GetOutputDataTypes(AliHLTComponentDataTypeList& tgtList);
102 void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
103 virtual AliHLTComponent* Spawn();
106 int DoInit( int argc, const char** argv );
110 * Data source method.
111 * @param evtData event data structure
112 * @param trigData trigger data structure
113 * @param outputPtr pointer to target buffer
114 * @param size <i>input</i>: size of target buffer
115 * <i>output</i>:size of produced data
116 * @param outputBlocks list to receive output block descriptors
117 * @return neg. error code if failed
119 int GetEvent( const AliHLTComponentEventData& evtData,
120 AliHLTComponentTriggerData& trigData,
121 AliHLTUInt8_t* outputPtr,
122 AliHLTUInt32_t& size,
123 AliHLTComponentBlockDataList& outputBlocks );
125 using AliHLTOfflineDataSource::GetEvent;
130 /** copy constructor prohibited */
131 AliHLTOUTPublisherComponent(const AliHLTOUTPublisherComponent&);
132 /** assignment operator prohibited */
133 AliHLTOUTPublisherComponent& operator=(const AliHLTOUTPublisherComponent&);
135 /** filtering rules, only the data type and specification members are use */
136 AliHLTComponentBlockDataList fFilterRules; //! transient
138 /** maximum output size */
141 ClassDef(AliHLTOUTPublisherComponent, 0);