Line data Source code
1 : // -*- Mode: C++ -*-
2 : // $Id$
3 :
4 : #ifndef ALIHLTESDCOLLECTORCOMPONENT_H
5 : #define ALIHLTESDCOLLECTORCOMPONENT_H
6 : //* This file is property of and copyright by the ALICE HLT Project *
7 : //* ALICE Experiment at CERN, All rights reserved. *
8 : //* See cxx source for full Copyright notice *
9 :
10 : /** @file AliHLTEsdCollectorComponent.h
11 : @author Matthias Richter
12 : @date
13 : @brief Collect ESDs of multiple events and write toi file
14 : */
15 :
16 : #include "AliHLTFileWriter.h"
17 : #include "TString.h"
18 :
19 : class AliHLTEsdManager;
20 :
21 : /**
22 : * @class AliHLTEsdCollectorComponent
23 : * The EsdCollector component merges ESDs from multiple events into one
24 : * ESD file per origin using the AliHLTEsdManager class.
25 : * \b Note: The component just merges ESDs of the same type/origin from
26 : * multiple events into one file. It does not implement merging of ESDs
27 : * from one event but several origins.
28 : *
29 : * The file name of the ESD file is derived from the origin of the ESD data
30 : * block.
31 : *
32 : * <h2>General properties:</h2>
33 : *
34 : * Component ID: \b EsdCollector <br>
35 : * Library: \b libAliHLTUtil.so <br>
36 : * Input Data Types: kAliHLTDataTypeESDObject, kAliHLTDataTypeESDTree <br>
37 : * Output Data Types: none <br>
38 : *
39 : * <h2>Mandatory arguments:</h2>
40 : * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
41 : *
42 : * <h2>Optional arguments:</h2>
43 : * The only AliHLTFileWriter argument of relevance is the \em -directory
44 : * argument. See AliHLTFileWriter for full list of arguments. Note: The
45 : * file name of the ESD file is derieved from the origin of the ESD
46 : * data block.
47 : *
48 : * <h2>Configuration:</h2>
49 : * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
50 : * Configuration by component arguments.
51 : *
52 : * <h2>Default CDB entries:</h2>
53 : * The component loads no CDB entries.
54 : *
55 : * <h2>Performance:</h2>
56 : * The component does not process any event data.
57 : *
58 : * <h2>Memory consumption:</h2>
59 : * The component does not process any event data.
60 : *
61 : * <h2>Output size:</h2>
62 : * No data published (AliHLTDataSink).
63 : *
64 : * @ingroup alihlt_util_components
65 : */
66 : class AliHLTEsdCollectorComponent : public AliHLTFileWriter
67 : {
68 : public:
69 : /** standard constructor */
70 : AliHLTEsdCollectorComponent();
71 : /** destructor */
72 : virtual ~AliHLTEsdCollectorComponent();
73 :
74 : /**
75 : * The id of the component.
76 : * @return component id (string)
77 : */
78 606 : const char* GetComponentID() {return "EsdCollector";};
79 :
80 : /**
81 : * Spawn function.
82 : * @return new class instance
83 : */
84 0 : AliHLTComponent* Spawn() {return new AliHLTEsdCollectorComponent;}
85 :
86 : protected:
87 : // interface functions
88 : int InitWriter();
89 : int CloseWriter();
90 : int DumpEvent( const AliHLTComponentEventData& evtData,
91 : const AliHLTComponentBlockData* blocks,
92 : AliHLTComponentTriggerData& trigData );
93 :
94 : using AliHLTFileWriter::DumpEvent;
95 : int ScanArgument(int argc, const char** argv);
96 :
97 : private:
98 : /** copy constructor prohibited */
99 : AliHLTEsdCollectorComponent(const AliHLTEsdCollectorComponent&);
100 : /** assignment operator prohibited */
101 : AliHLTEsdCollectorComponent& operator=(const AliHLTEsdCollectorComponent&);
102 :
103 : /** the ESD manager instance writes the ESDs */
104 : AliHLTEsdManager* fpManager; //! transient
105 : /** name of the tree for ESD storage */
106 : TString fTreeName; //! transient
107 :
108 8 : ClassDef(AliHLTEsdCollectorComponent, 0)
109 : };
110 : #endif
|