]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/BASE/util/AliHLTLoaderPublisherComponent.h
- added skeleton of of offline clusterizer and tracker components
[u/mrichter/AliRoot.git] / HLT / BASE / util / AliHLTLoaderPublisherComponent.h
CommitLineData
90ebac25 1//-*- Mode: C++ -*-
2// @(#) $Id$
3
4#ifndef ALIHLTLOADERPUBLISHERCOMPONENT_H
5#define ALIHLTLOADERPUBLISHERCOMPONENT_H
79c114b5 6/* This file is property of and copyright by the ALICE HLT Project *
7 * ALICE Experiment at CERN, All rights reserved. *
90ebac25 8 * See cxx source for full Copyright notice */
9
10/** @file AliHLTLoaderPublisherComponent.h
11 @author Matthias Richter
12 @date
13 @brief A general tree publisher component for the AliLoader.
14*/
15
c534985b 16// see header file for class documentation
17// or
18// refer to README to build package
19// or
20// visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
21
90ebac25 22#include "AliHLTOfflineDataSource.h"
23
24class AliLoader;
25
26/**
27 * @class AliHLTLoaderPublisherComponent
28 * A general tree publisher component for the AliLoader.
29 *
30 * Component ID: \b AliLoaderPublisher <br>
31 * Library: \b libAliHLTUtil.
32 *
33 * Mandatory arguments: <br>
1ac82ce6 34 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
90ebac25 35 * \li -loader <i> loader name </i>
36 * e.g. <tt> -loader TPCLoader </tt>
37 * \li -tree <i> tree name </i> : digits (default), clusters
38 * e.g. <tt> -tree digits </tt>
39 * \li -verbose<br>
40 * print out some more info messages, mainly for the sake of tutorials
41 * \li -datatype <i> datatype dataorigin </i> <br>
42 * data type ID and origin, e.g. <tt>-datatype DIGITS TPC </tt>
43 * \li -dataspec <i> specification </i> <br>
44 * data specification treated as decimal number or hex number if
45 * prepended by '0x'
46 *
47 * Optional arguments:<br>
48 *
49 *
50 * @ingroup alihlt_system
51 */
52class AliHLTLoaderPublisherComponent : public AliHLTOfflineDataSource {
53 public:
54 /** standard constructor */
55 AliHLTLoaderPublisherComponent();
56 /** destructor */
57 virtual ~AliHLTLoaderPublisherComponent();
58
59 /**
60 * Get the id of the component.
61 * Each component is identified by a unique id.
62 * The function is pure virtual and must be implemented by the child class.
63 * @return component id (string)
64 */
65 const char* GetComponentID();
66
67 /**
68 * Get the output data type of the component.
69 * The function is pure virtual and must be implemented by the child class.
70 * @return output data type
71 */
72 AliHLTComponentDataType GetOutputDataType();
73
74 /**
75 * Get a ratio by how much the data volume is shrinked or enhanced.
76 * The function is pure virtual and must be implemented by the child class.
77 * @param constBase <i>return</i>: additive part, independent of the
78 * input data volume
79 * @param inputMultiplier <i>return</i>: multiplication ratio
80 * @return values in the reference variables
81 */
82 void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
83
84 /**
85 * Spawn function.
86 * Each component must implement a spawn function to create a new instance of
87 * the class. Basically the function must return <i>new <b>my_class_name</b></i>.
88 * @return new class instance
89 */
90 virtual AliHLTComponent* Spawn();
91
92 protected:
93 /**
94 * Init method.
95 */
96 int DoInit( int argc, const char** argv );
97
98 /**
99 * Deinit method.
100 */
101 int DoDeinit();
102
103 /**
104 * Data source method.
105 * @param evtData event data structure
106 * @param trigData trigger data structure
107 * @return
108 */
109 int GetEvent(const AliHLTComponentEventData& evtData,
110 AliHLTComponentTriggerData& trigData);
111
a8abc5d5 112 using AliHLTOfflineDataSource::GetEvent;
113
90ebac25 114 private:
29312178 115 /** copy constructor prohibited */
79c114b5 116 AliHLTLoaderPublisherComponent(const AliHLTLoaderPublisherComponent&);
29312178 117 /** assignment operator prohibited */
79c114b5 118 AliHLTLoaderPublisherComponent& operator=(const AliHLTLoaderPublisherComponent&);
119
90ebac25 120 /**
121 * Get tree of type specified in fTreeType from loader.
122 */
123 TTree* GetTree();
124
56951e49 125 /** max output block size, estimated during DoInit */
90ebac25 126 Int_t fMaxSize; //!transient
127
128 /** loader string */
129 TString fLoaderType; //!transient
130
131 /** tree string */
132 TString fTreeType; //!transient
133
134 /** be verbose: info printouts */
135 Bool_t fVerbose; //!transient
136
137 /** data type */
138 AliHLTComponentDataType fDataType; //!transient
139
140 /** data specification */
141 AliHLTUInt32_t fSpecification; //!transient
142
143 /** instance of the AliLoader */
144 AliLoader* fpLoader; //!transient
145
146 ClassDef(AliHLTLoaderPublisherComponent, 0);
147};
148
149#endif