Changing to using char** rather than const char** for main() due to coverty warning.
[u/mrichter/AliRoot.git] / HLT / MUON / OfflineInterface / AliHLTMUONESDMaker.h
CommitLineData
649ab027 1#ifndef ALIHLTMUONESDMAKER_H
2#define ALIHLTMUONESDMAKER_H
3/* This file is property of and copyright by the ALICE HLT Project *
4 * ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6
1d8ae082 7// $Id: $
649ab027 8
9///
10/// @file AliHLTMUONESDMaker.h
11/// @author Artur Szostak <artursz@iafrica.com>
12/// @date 30 June 2008
13/// @brief Component for converting dHLT raw data into AliESDEvent objects.
14///
15
16#include "AliHLTMUONProcessor.h"
d24a4636 17#include <vector>
18
19extern "C" class AliHLTMUONTriggerRecordStruct;
20class AliESDMuonTrack;
649ab027 21
22/**
23 * @class AliHLTMUONESDMaker
1d8ae082 24 * \brief Component for converting dHLT results into ESD format.
25 *
649ab027 26 * The component is used to convert dHLT reconstructed data into AliESDEvent
27 * objects which can be stored in ROOT files during offline reconstruction.
28 * Only the dHLT track and trigger record data is converted, then filled in the ESD.
29 * These should then be merged together with ESDs from all the other parts of
30 * HLT (eg. TPC HLT).<br>
31 * This component can also be run online to have ESDs directly in the raw
32 * HLT output data stream.<br>
33 *
34 * Component ID: \b MUONESDMaker <br>
35 * Library: \b libAliHLTMUON.so <br>
36 *
37 * Optional arguments:<br>
38 * \li -make_minimal_esd <br>
39 * Indicates that AliESDEvent objects should be created with only the TClonesArray
40 * for the muon tracks created. (default is to generate all standard ESD objects)<br>
1d8ae082 41 * \li -add_rootified_objects <br>
42 * If specified then the any rootified dHLT event data that is found is added to the
43 * ESD list of objects as a custom data object.<br>
f064ef44 44 * \li -makeclonesarray <br>
45 * This option will cause the component to generate a TClonesArray of MUON ESD tracks
46 * and send it as a kAliHLTDataTypeTObject data block type. <br>
47 * \li -makeonlyclonesarray <br>
48 * Same as the -makeclonesarray option, however the data block with the AliESDEvent
49 * object is not generated at all. <br>
649ab027 50 * \li -warn_on_unexpected_block <br>
51 * If set, then warning messages are generated for any data block types that
52 * were not expected. (default is to generate only debug messages)<br>
1d8ae082 53 * \li -dumponerror <br>
54 * This flag will cause the component to dump the data blocks it received if
55 * an error occurs during the processing of an event. <br>
56 * \li -dumppath <i>path</i> <br>
57 * Allows one to specify the path in which to dump the received data blocks
58 * if an error occurs. <br>
649ab027 59 *
60 * @ingroup alihlt_dimuon_component
61 */
62class AliHLTMUONESDMaker : public AliHLTMUONProcessor
63{
64public:
65
66 AliHLTMUONESDMaker();
67 virtual ~AliHLTMUONESDMaker();
68
69 virtual const char* GetComponentID();
70
ffb64d3e 71 virtual void GetInputDataTypes(AliHLTComponentDataTypeList& list);
649ab027 72 virtual AliHLTComponentDataType GetOutputDataType();
f064ef44 73 virtual int GetOutputDataTypes(AliHLTComponentDataTypeList& list);
649ab027 74 virtual void GetOutputDataSize(unsigned long& constBase, double& inputMultiplier);
75
76 virtual AliHLTComponent* Spawn();
77
78protected:
79
80 virtual int DoInit(int argc, const char** argv);
81 virtual int DoDeinit();
82 virtual int DoEvent(const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData);
ffb64d3e 83 virtual bool IgnoreArgument(const char* arg) const;
649ab027 84 using AliHLTProcessor::DoEvent;
85
86private:
87
88 // Prevent copying of these objects.
89 AliHLTMUONESDMaker(const AliHLTMUONESDMaker& /*object*/);
90 AliHLTMUONESDMaker& operator = (const AliHLTMUONESDMaker& /*object*/);
91
d24a4636 92 typedef std::vector<const AliHLTMUONTriggerRecordStruct*> AliTriggerRecordList;
93
94 /**
95 * Finds the trigger record with the specified ID in the list of trigger records
96 * and then fills the ESD muon track structure with the information.
97 * [in] \param triggerRecords The list of trigger records to search in.
98 * [in] \param trigRecId The trigger record ID to seach for.
99 * [in] \param trackId The track ID of the track structure where the trigger
100 * record ID comes from.
101 * [out] \param muTrack The track structure to fill.
102 * [in/out] \param nHits The number of hits added. Will increment this value
103 * for every new hit added.
104 */
105 void FillTriggerInfo(
106 const AliTriggerRecordList& triggerRecords,
107 AliHLTInt32_t trigRecId, AliHLTInt32_t trackId,
108 AliESDMuonTrack& muTrack, Int_t& nHits
109 );
110
649ab027 111 bool fWarnForUnexpecedBlock; /// Flag indicating if we should log a warning if we got a block of an unexpected type.
112 bool fMakeMinimalESD; /// Flag to indicate if a minimal ESD object should be created.
73ed798e 113 bool fAddCustomData; /// Flag to turn on adding of all dHLT rootified objects to the ESD.
f064ef44 114 bool fMakeClonesArray; /// Flag indicating if a data block of TClonesArray with AliESDMuonTrack objects should be generated.
115 bool fMakeESDDataBlock; /// Flag indicating if the ESD data block should generated.
d24a4636 116 AliHLTUInt32_t fClusterIndex; /// Running counter for the unique cluster index number.
649ab027 117
118 ClassDef(AliHLTMUONESDMaker, 0); // Component for converting dHLT reconstructed data into the ESD format.
119};
120
121#endif // ALIHLTMUONESDMAKER_H