4 #ifndef ALIHLTOUTHANDLERCHAIN_H
5 #define ALIHLTOUTHANDLERCHAIN_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 AliHLTOUTHandlerChain.h
11 @author Matthias Richter
13 @brief HLTOUT handler of type kChain.
16 #include "AliHLTOUTHandler.h"
21 class AliHLTConfiguration;
22 class AliHLTConfigurationHandler;
25 * @class AliHLTOUTHandlerChain
26 * The default HLTOUT handler for type kChain.
28 * The handler implements the kChain processing of HLTOUT data.
29 * The ids of the chains to be run during processing are provided
30 * as parameter to the constructor. The AliHLTModuleAgent
31 * can just create a new instance and specify the chains in order
32 * to define the HLTOUT handling of type kChain for a certain data
33 * block. The same instance can be returned for multiple data blocks.
34 * The handler will run once on all data blocks.
36 * The AliHLTOUTPublisherComponent must be used as data source in order
37 * to publish the data blocks from HLTOUT into the chain. The component
38 * publishes all data blocks selected for the handler. Additional
39 * filter rules can be applied.
41 * <h2>Chain configuration</h2>
42 * The tasks in the chain to be run can be defined either by
43 * the AliHLTModuleAgent in conjunction with all other configurations or
44 * by an implementation of CreateConfigurations().
46 * The handler is controlled by arguments passed to the constructor, the
47 * syntax is equal to the AliHLTSystem (see AliHLTSystem::ScanOptions).
49 * <h2>Usage example:</h2>
50 * An agent implementation for some sample histograms. Asumes a chain to
51 * be registered with name 'SAMPLE-my-histo-converter'
53 * AliHLTOUTHandler* AliHLTMyAgent::GetOutputHandler(AliHLTComponentDataType dt,
54 * AliHLTUInt32_t spec)
56 * // afterburner for some histograms
57 * if (dt==kAliHLTDataTypeHistogram|kAliHLTDataOriginSample) {
58 * return new AliHLTOUTHandlerChain("chains=SAMPLE-my-histo-converter");
65 * <h2>Data output</h2>
66 * The chain can produce output data as usual. All produced data blocks are
67 * added to the HLTOUT. This means a chain can e.g. produce ESD data blocks
68 * out of the HLT output by applying a converter component as an afterburner.
69 * The produced output of the chain is automatically subject to HLTOUT
70 * standard processing.
72 * HLTOUT processing sequence:
73 * - first handlers of type kChain
74 * - handlers of type kEsd
75 * - handlers of type kProprietary
77 * @ingroup alihlt_aliroot_reconstruction
79 class AliHLTOUTHandlerChain : public AliHLTOUTHandler {
82 AliHLTOUTHandlerChain(const char* arguments);
83 /** standard destructor */
84 virtual ~AliHLTOUTHandlerChain();
87 * Process a data block.
88 * The handler retrieves the data and it's properties and derives the
89 * equipment id from it. The default behavior returns the specification as
90 * equipment id and does not touch the data itself.
91 * @return equipment id the block should be used for.
93 virtual int ProcessData(AliHLTOUT* pData);
96 * Create configurations.
97 * The configurations of the chain to be run can be defined either by
98 * the AliHLTModuleAgent in conjunction with all other configurations or
99 * by an implementation of the function.
101 virtual int CreateConfigurations(AliHLTConfigurationHandler* handler);
104 /** standard constructor prohibited */
105 AliHLTOUTHandlerChain();
106 /** copy constructor prohibited */
107 AliHLTOUTHandlerChain(const AliHLTOUTHandlerChain&);
108 /** assignment operator prohibited */
109 AliHLTOUTHandlerChain& operator=(const AliHLTOUTHandlerChain&);
112 * Create and init AliHLTSystem.
113 * Read the arguments and create the AliHLTOUTTask as data dump.
117 TString fChains; //! transient
118 TString fOptions; //! transient
120 AliHLTSystem* fpSystem; //!transient
121 AliHLTOUTTask* fpTask; //!transient
123 ClassDef(AliHLTOUTHandlerChain, 0)