4 #ifndef ALIHLTOUTHANDLERCHAIN_H
5 #define ALIHLTOUTHANDLERCHAIN_H
6 //* This file is property of and copyright by the *
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 runs a normal HLT chain for processing of the selected blocks.
88 * The input of the chain is provided by the AliHLTOUTPublisher component.
89 * @return equipment id the block should be used for.
91 virtual int ProcessData(AliHLTOUT* pData);
94 * Create configurations.
95 * The configurations of the chain to be run can be defined either by
96 * the AliHLTModuleAgent in conjunction with all other configurations or
97 * by an implementation of the function.
99 virtual int CreateConfigurations(AliHLTConfigurationHandler* handler);
102 /** standard constructor prohibited */
103 AliHLTOUTHandlerChain();
104 /** copy constructor prohibited */
105 AliHLTOUTHandlerChain(const AliHLTOUTHandlerChain&);
106 /** assignment operator prohibited */
107 AliHLTOUTHandlerChain& operator=(const AliHLTOUTHandlerChain&);
110 * Create and init AliHLTSystem.
111 * Read the arguments and create the AliHLTOUTTask as data dump.
115 TString fChains; //! transient
116 TString fOptions; //! transient
118 AliHLTSystem* fpSystem; //!transient
119 bool fbHaveOutput; //!transient
121 ClassDef(AliHLTOUTHandlerChain, 1)