]>
Commit | Line | Data |
---|---|---|
4ddfc222 | 1 | // -*- Mode: C++ -*- |
2 | // @(#) $Id$ | |
3 | ||
4 | #ifndef ALIHLTROOTFILEPUBLISHERCOMPONENT_H | |
5 | #define ALIHLTROOTFILEPUBLISHERCOMPONENT_H | |
79c114b5 | 6 | /* This file is property of and copyright by the ALICE HLT Project * |
7 | * ALICE Experiment at CERN, All rights reserved. * | |
4ddfc222 | 8 | * See cxx source for full Copyright notice */ |
9 | ||
10 | /** @file AliHLTRootFilePublisherComponent.h | |
11 | @author Matthias Richter | |
12 | @date | |
13 | @brief component for publishing of Root objects from a root file. | |
14 | @note The class is used in Offline (AliRoot) context | |
15 | */ | |
16 | ||
17 | #include "AliHLTFilePublisher.h" | |
18 | #include <TList.h> | |
19 | ||
20 | /** | |
21 | * @class AliHLTRootFilePublisherComponent | |
79c114b5 | 22 | * \Note: This component is not what it pretends to be. So far it was just |
23 | * used for debugging purpose. If you need a component like this make a | |
24 | * feature request at <br> | |
25 | * https://savannah.cern.ch/projects/alicehlt/ | |
26 | * and assign it to richterm. <br> | |
27 | * Any contributions are of course welcome. | |
4ddfc222 | 28 | * |
29 | * Component ID: \b RootFilePublisherComponent <br> | |
3bf0e1d7 | 30 | * Library: \b libAliHLTUtil. |
4ddfc222 | 31 | * |
32 | * Mandatory arguments: <br> | |
33 | * | |
34 | * Optional arguments:<br> | |
35 | * | |
36 | * @see AliHLTFilePublisher for default arguments | |
37 | * @ingroup alihlt_component | |
38 | */ | |
39 | class AliHLTRootFilePublisherComponent : public AliHLTFilePublisher { | |
40 | public: | |
41 | /** standard constructor */ | |
42 | AliHLTRootFilePublisherComponent(); | |
4ddfc222 | 43 | /** destructor */ |
44 | virtual ~AliHLTRootFilePublisherComponent(); | |
45 | ||
46 | const char* GetComponentID(); | |
47 | AliHLTComponentDataType GetOutputDataType(); | |
48 | void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier ); | |
49 | AliHLTComponent* Spawn(); | |
50 | ||
51 | /** | |
52 | * Open all files. | |
90cb4f5d | 53 | * Opens all files for all events from the event list @ref fEvents and adds TFile |
54 | * opjects to the internal list. | |
4ddfc222 | 55 | */ |
56 | int OpenFiles(); | |
57 | ||
58 | protected: | |
59 | /** | |
60 | * Data processing method for the component. | |
61 | * The component uses the @ref alihltcomponent-high-level-interface | |
62 | * to put serialized Root object into the output stream. Despite of that it | |
63 | * implements the lox-level DumpEvent method in order to allow child classes | |
64 | * to use the low-level method. | |
65 | * @param evtData event data structure | |
66 | * @param trigData trigger data structure | |
14aa20d4 | 67 | * @param outputPtr not used |
68 | * @param size not used | |
69 | * @param outputBlocks not used | |
4ddfc222 | 70 | * @return |
71 | */ | |
72 | int GetEvent( const AliHLTComponentEventData& evtData, | |
14aa20d4 | 73 | AliHLTComponentTriggerData& trigData, |
74 | AliHLTUInt8_t* outputPtr, | |
75 | AliHLTUInt32_t& size, | |
76 | vector<AliHLTComponentBlockData>& outputBlocks); | |
4ddfc222 | 77 | |
a8abc5d5 | 78 | using AliHLTFilePublisher::GetEvent; |
79 | ||
4ddfc222 | 80 | /** |
81 | * Scan one argument and adjacent parameters. | |
82 | * Can be overloaded by child classes in order to add additional arguments | |
83 | * beyond the standard arguments of the file publisher. The method is called | |
84 | * whenever a non-standard argument is recognized. | |
85 | * @param argc size of the argument array | |
86 | * @param argv agument array for component initialization | |
87 | * @return number of processed members of the argv <br> | |
88 | * -EINVAL unknown argument <br> | |
89 | * -EPROTO parameter for argument missing <br> | |
90 | */ | |
91 | virtual int ScanArgument(int argc, const char** argv); | |
92 | ||
93 | private: | |
29312178 | 94 | /** copy constructor prohibited */ |
95 | AliHLTRootFilePublisherComponent(const AliHLTRootFilePublisherComponent&); | |
96 | /** assignment operator prohibited */ | |
97 | AliHLTRootFilePublisherComponent& operator=(const AliHLTRootFilePublisherComponent&); | |
4ddfc222 | 98 | |
99 | ClassDef(AliHLTRootFilePublisherComponent, 0) | |
100 | }; | |
101 | #endif |