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 * Component ID: \b AliHLTOUTPublisher <br>
32 * Library: \b libAliHLTUtil.
34 * Mandatory arguments: <br>
35 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
37 * Optional arguments:<br>
38 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
39 * \li -datatype <i> id origin </i>
40 * e.g. <tt> -datatype 'ESD_TREE' 'TPC ' </tt> <br>
41 * \b Note: due to the 4-character data origin it might be necessary to
42 * append a blank to the detectorname, e.g. TPC -> 'TPC '
43 * \li -origin <i> origin </i>
44 * e.g. -origin 'TPC ', \b Note: the filter rule has type id 'ANY'
45 * \li -typeid <i> id </i>
46 * e.g. -typeid ESD_TREE, \b Note: the filter rule has origin 'ANY'
47 * \li -dataspec <i> specification </i> <br>
48 * data specification treated as decimal number or hex number if
51 * print out some more info messages, mainly for the sake of tutorials
53 * By default, all blocks will be published. By means of the -datatype,
54 * -origin, and -typeid arguments, the blocks can be selected. A list of filter
55 * rules can be built up by multiple usage of the arguments. Each time a new
56 * filter rule is added.
58 * No filtering by the data specification is applied unless the -specification
59 * argument is used. The specification applies to to the current filter rule,
60 * regardless of the sequence of -datatype/-specification arguments.
62 * @ingroup alihlt_system
64 class AliHLTOUTPublisherComponent : public AliHLTOfflineDataSource {
66 /** standard constructor */
67 AliHLTOUTPublisherComponent();
69 virtual ~AliHLTOUTPublisherComponent();
71 const char* GetComponentID();
72 AliHLTComponentDataType GetOutputDataType();
73 int GetOutputDataTypes(AliHLTComponentDataTypeList& tgtList);
74 void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
75 virtual AliHLTComponent* Spawn();
78 int DoInit( int argc, const char** argv );
83 * @param evtData event data structure
84 * @param trigData trigger data structure
85 * @param outputPtr pointer to target buffer
86 * @param size <i>input</i>: size of target buffer
87 * <i>output</i>:size of produced data
88 * @param outputBlocks list to receive output block descriptors
89 * @return neg. error code if failed
91 int GetEvent( const AliHLTComponentEventData& evtData,
92 AliHLTComponentTriggerData& trigData,
93 AliHLTUInt8_t* outputPtr,
95 AliHLTComponentBlockDataList& outputBlocks );
97 using AliHLTOfflineDataSource::GetEvent;
102 /** copy constructor prohibited */
103 AliHLTOUTPublisherComponent(const AliHLTOUTPublisherComponent&);
104 /** assignment operator prohibited */
105 AliHLTOUTPublisherComponent& operator=(const AliHLTOUTPublisherComponent&);
107 /** filtering rules, only the data type and specification members are use */
108 AliHLTComponentBlockDataList fFilterRules; //! transient
110 /** maximum output size */
113 ClassDef(AliHLTOUTPublisherComponent, 0);