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 */
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.
16 #include "AliHLTMUONProcessor.h"
19 extern "C" struct AliHLTMUONTriggerRecordStruct;
20 class AliESDMuonTrack;
24 * @class AliHLTMUONESDMaker
25 * \brief Component for converting dHLT results into ESD format.
27 * The component is used to convert dHLT reconstructed data into AliESDEvent
28 * objects which can be stored in ROOT files during offline reconstruction.
29 * Only the dHLT track and trigger record data is converted, then filled in the ESD.
30 * These should then be merged together with ESDs from all the other parts of
31 * HLT (eg. TPC HLT).<br>
32 * This component can also be run online to have ESDs directly in the raw
33 * HLT output data stream.<br>
35 * Component ID: \b MUONESDMaker <br>
36 * Library: \b libAliHLTMUON.so <br>
38 * Optional arguments:<br>
39 * \li -make_minimal_esd <br>
40 * Indicates that AliESDEvent objects should be created with only the TClonesArray
41 * for the muon tracks created. (default is to generate all standard ESD objects)<br>
42 * \li -add_rootified_objects <br>
43 * If specified then the any rootified dHLT event data that is found is added to the
44 * ESD list of objects as a custom data object.<br>
45 * \li -makeclonesarray <br>
46 * This option will cause the component to generate a TClonesArray of MUON ESD tracks
47 * and send it as a kAliHLTDataTypeTObject data block type. <br>
48 * \li -makeonlyclonesarray <br>
49 * Same as the -makeclonesarray option, however the data block with the AliESDEvent
50 * object is not generated at all. <br>
51 * \li -warn_on_unexpected_block <br>
52 * If set, then warning messages are generated for any data block types that
53 * were not expected. (default is to generate only debug messages)<br>
54 * \li -dumponerror <br>
55 * This flag will cause the component to dump the data blocks it received if
56 * an error occurs during the processing of an event. <br>
57 * \li -dumppath <i>path</i> <br>
58 * Allows one to specify the path in which to dump the received data blocks
59 * if an error occurs. <br>
61 * @ingroup alihlt_muon_components
63 class AliHLTMUONESDMaker : public AliHLTMUONProcessor
68 virtual ~AliHLTMUONESDMaker();
70 virtual const char* GetComponentID();
72 virtual void GetInputDataTypes(AliHLTComponentDataTypeList& list);
73 virtual AliHLTComponentDataType GetOutputDataType();
74 virtual int GetOutputDataTypes(AliHLTComponentDataTypeList& list);
75 virtual void GetOutputDataSize(unsigned long& constBase, double& inputMultiplier);
77 virtual AliHLTComponent* Spawn();
81 virtual int DoInit(int argc, const char** argv);
82 virtual int DoDeinit();
83 virtual int DoEvent(const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData);
84 virtual bool IgnoreArgument(const char* arg) const;
85 using AliHLTProcessor::DoEvent;
89 // Prevent copying of these objects.
90 AliHLTMUONESDMaker(const AliHLTMUONESDMaker& /*object*/);
91 AliHLTMUONESDMaker& operator = (const AliHLTMUONESDMaker& /*object*/);
93 typedef std::vector<const AliHLTMUONTriggerRecordStruct*> AliTriggerRecordList;
96 * Finds the trigger record with the specified ID in the list of trigger records
97 * and then fills the ESD muon track structure with the information.
98 * \param [in] triggerRecords The list of trigger records to search in.
99 * \param [in] trigRecId The trigger record ID to seach for.
100 * \param [in] trackId The track ID of the track structure where the trigger
101 * record ID comes from.
102 * \param [out] muTrack The track structure to fill.
103 * \param [in,out] event The ESD event to store the new hits
105 void FillTriggerInfo(
106 const AliTriggerRecordList& triggerRecords,
107 AliHLTInt32_t trigRecId, AliHLTInt32_t trackId,
108 AliESDMuonTrack& muTrack, AliESDEvent& event
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.
113 bool fAddCustomData; /// Flag to turn on adding of all dHLT rootified objects to the ESD.
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.
116 AliHLTUInt32_t fClusterIndex; /// Running counter for the unique cluster index number.
118 ClassDef(AliHLTMUONESDMaker, 0); // Component for converting dHLT reconstructed data into the ESD format.
121 #endif // ALIHLTMUONESDMAKER_H