1 #ifndef ALIHLTMUONROOTIFIERCOMPONENT_H
2 #define ALIHLTMUONROOTIFIERCOMPONENT_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 AliHLTMUONRootifierComponent.h
11 /// @author Artur Szostak <artursz@iafrica.com>
13 /// @brief Component for converting dHLT raw data into ROOT objects.
16 #include "AliHLTMUONProcessor.h"
18 class AliHLTMUONEvent;
19 class AliHLTMUONMansoTrack;
20 class AliHLTMUONTrack;
21 extern "C" struct AliHLTMUONMansoTrackStruct;
24 * \class AliHLTMUONRootifierComponent
25 * \brief Converts dHLT raw data blocks into ROOT objects.
27 * This component class is used to convert all internal raw dHLT data blocks into
28 * ROOT object that can be stored in '.root' files in a platform independant manner.
29 * This can also make some of the analysis easier because the dHLT internal data
30 * will be available in TObjects.
32 * <h2>General properties:</h2>
34 * Component ID: \b MUONRootifier <br>
35 * Library: \b libAliHLTMUON.so <br>
36 * Input Data Types: kAliHLTAnyDataType = "*******:***" <br>
37 * Output Data Types: AliHLTMUONConstants::RootifiedEventDataType() = "ROOTEVNT:MUON" <br>
39 * <h2>Mandatory arguments:</h2>
42 * <h2>Optional arguments:</h2>
43 * \li -warn_on_unexpected_block <br>
44 * This will cause the component to generate warnings when it receives data block
45 * types it does not know how to handle. Without this option the component only
46 * generates debug messages when they are compiled in. <br>
47 * \li -dumponerror <br>
48 * This flag will cause the component to dump the data blocks it received if
49 * an error occurs during the processing of an event. <br>
50 * \li -dumppath <i>path</i> <br>
51 * Allows one to specify the path in which to dump the received data blocks
52 * if an error occurs. <br>
54 * <h2>Standard configuration:</h2>
55 * There is no special configuration for this component.
57 * <h2>Default CDB entries:</h2>
60 * <h2>Performance:</h2>
61 * A few milliseconds per event.
63 * <h2>Memory consumption:</h2>
66 * <h2>Output size:</h2>
69 * @ingroup alihlt_muon_components
71 class AliHLTMUONRootifierComponent : public AliHLTMUONProcessor
75 AliHLTMUONRootifierComponent();
76 virtual ~AliHLTMUONRootifierComponent();
78 virtual const char* GetComponentID();
80 virtual void GetInputDataTypes(AliHLTComponentDataTypeList& list);
81 virtual AliHLTComponentDataType GetOutputDataType();
82 virtual int GetOutputDataTypes(AliHLTComponentDataTypeList& tgtList);
83 virtual void GetOutputDataSize(unsigned long& constBase, double& inputMultiplier);
85 virtual AliHLTComponent* Spawn();
89 virtual int DoInit(int argc, const char** argv);
90 virtual int DoDeinit();
91 virtual int DoEvent(const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData);
92 virtual bool IgnoreArgument(const char* arg) const;
93 using AliHLTProcessor::DoEvent;
97 // Prevent copying of these objects.
98 AliHLTMUONRootifierComponent(const AliHLTMUONRootifierComponent& /*object*/);
99 AliHLTMUONRootifierComponent& operator = (const AliHLTMUONRootifierComponent& /*object*/);
102 * This method creates a AliHLTMUONMansoTrack object from the track structure
103 * and adds it to the dHLT event object.
104 * \param event The dHLT event object.
105 * \param track The track structure to convert and add to the event.
107 AliHLTMUONMansoTrack* AddTrack(AliHLTMUONEvent& event, const AliHLTMUONMansoTrackStruct& track);
110 * This method creates a AliHLTMUONTrack object from the given track structure
111 * and adds it to the dHLT event object.
112 * \param event The dHLT event object.
113 * \param track The track structure to convert and add to the event.
115 AliHLTMUONTrack* AddTrack(AliHLTMUONEvent& event, const AliHLTMUONTrackStruct& track);
117 bool fWarnForUnexpecedBlock; /// Flag indicating if we should log a warning if we got a block of an unexpected type.
119 ClassDef(AliHLTMUONRootifierComponent, 0); // Converter component of dHLT raw data.
122 #endif // ALIHLTMUONROOTIFIERCOMPONENT_H