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"
20 class AliHLTConfiguration;
21 class AliHLTConfigurationHandler;
24 * @class AliHLTOUTHandlerChain
25 * The default HLTOUT handler for type kChain.
27 * The handler implements the kChain processing of HLTOUT data.
28 * The ids of the chains to be run during processing are provided
29 * as parameter to the constructor. The AliHLTModuleAgent
30 * can just create a new instance and specify the chains in order
31 * to define the HLTOUT handling of type kChain for a certain data
32 * block. The same instance can be returned for multiple data blocks.
33 * The handler will run once on all data blocks.
35 * The AliHLTOUTPublisherComponent must be used as data source in order
36 * to publish the data blocks from HLTOUT into the chain. The component
37 * publishes all data blocks selected for the handler. Additional
38 * filter rules can be applied.
40 * <h2>Chain configuration</h2>
41 * The tasks in the chain to be run can be defined either by
42 * the AliHLTModuleAgent in conjunction with all other configurations or
43 * by an implementation of CreateConfigurations().
45 * The handler is controlled by arguments passed to the constructor, the
46 * syntax is equal to the AliHLTSystem (see AliHLTSystem::ScanOptions).
48 * <h2>Usage example:</h2>
49 * An agent implementation for some sample histograms. Asumes a chain to
50 * be registered with name 'SAMPLE-my-histo-converter'
52 * AliHLTOUTHandler* AliHLTMyAgent::GetOutputHandler(AliHLTComponentDataType dt,
53 * AliHLTUInt32_t spec)
55 * // afterburner for some histograms
56 * if (dt==kAliHLTDataTypeHistogram|kAliHLTDataOriginSample) {
57 * return new AliHLTOUTHandlerChain("chains=SAMPLE-my-histo-converter");
64 * <h2>Data output</h2>
65 * The chain can produce output data as usual. All produced data blocks are
66 * added to the HLTOUT. This means a chain can e.g. produce ESD data blocks
67 * out of the HLT output by applying a converter component as an afterburner.
68 * The produced output of the chain is automatically subject to HLTOUT
69 * standard processing.
71 * HLTOUT processing sequence:
72 * - first handlers of type kChain
73 * - handlers of type kEsd
74 * - handlers of type kProprietary
76 * @ingroup alihlt_aliroot_reconstruction
78 class AliHLTOUTHandlerChain : public AliHLTOUTHandler {
81 AliHLTOUTHandlerChain(const char* arguments);
82 /** standard destructor */
83 virtual ~AliHLTOUTHandlerChain();
86 * Process a data block.
87 * The handler retrieves the data and it's properties and derives the
88 * equipment id from it. The default behavior returns the specification as
89 * equipment id and does not touch the data itself.
90 * @return equipment id the block should be used for.
92 virtual int ProcessData(AliHLTOUT* pData);
95 * Create configurations.
96 * The configurations of the chain to be run can be defined either by
97 * the AliHLTModuleAgent in conjunction with all other configurations or
98 * by an implementation of the function.
100 virtual int CreateConfigurations(AliHLTConfigurationHandler* handler);
103 /** standard constructor prohibited */
104 AliHLTOUTHandlerChain();
105 /** copy constructor prohibited */
106 AliHLTOUTHandlerChain(const AliHLTOUTHandlerChain&);
107 /** assignment operator prohibited */
108 AliHLTOUTHandlerChain& operator=(const AliHLTOUTHandlerChain&);
111 * Create and init AliHLTSystem.
112 * Read the arguments and create the AliHLTOUTTask as data dump.
116 TString fChains; //! transient
117 TString fOptions; //! transient
119 AliHLTSystem* fpSystem; //!transient
120 bool fbHaveOutput; //!transient
122 ClassDef(AliHLTOUTHandlerChain, 1)