]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/TPCLib/offline/AliHLTTPCOfflineTrackerComponent.cxx
Add revision numbers
[u/mrichter/AliRoot.git] / HLT / TPCLib / offline / AliHLTTPCOfflineTrackerComponent.cxx
CommitLineData
1ac82ce6 1// $Id$
2
3//**************************************************************************
4//* This file is property of and copyright by the ALICE HLT Project *
5//* ALICE Experiment at CERN, All rights reserved. *
6//* *
7//* Primary Authors: Matthias Richter <Matthias.Richter@ift.uib.no> *
8//* *
9//* Permission to use, copy, modify and distribute this software and its *
10//* documentation strictly for non-commercial purposes is hereby granted *
11//* without fee, provided that the above copyright notice appears in all *
12//* copies and that both the copyright notice and this permission notice *
13//* appear in the supporting documentation. The authors make no claims *
14//* about the suitability of this software for any purpose. It is *
15//* provided "as is" without express or implied warranty. *
16//**************************************************************************
17
18/** @file AliHLTTPCOfflineTrackerComponent.cxx
19 @author Matthias Richter
20 @date
21 @brief Wrapper component to the TPC offline tracker
22*/
23
24#include "AliHLTTPCOfflineTrackerComponent.h"
25#include "TString.h"
26#include "TObjArray.h"
27#include "TObjString.h"
28
29/** ROOT macro for the implementation of ROOT specific class methods */
30ClassImp(AliHLTTPCOfflineTrackerComponent)
31
32AliHLTTPCOfflineTrackerComponent::AliHLTTPCOfflineTrackerComponent()
33{
34 // see header file for class documentation
35 // or
36 // refer to README to build package
37 // or
38 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
39}
40
41AliHLTTPCOfflineTrackerComponent::~AliHLTTPCOfflineTrackerComponent()
42{
43 // see header file for class documentation
44}
45
46const char* AliHLTTPCOfflineTrackerComponent::GetComponentID()
47{
48 // see header file for class documentation
49 return "TPCOfflineTracker";
50}
51
52void AliHLTTPCOfflineTrackerComponent::GetInputDataTypes( vector<AliHLTComponentDataType>& list)
53{
54 // see header file for class documentation
55 list.push_back(kAliHLTDataTypeAliTreeR|kAliHLTDataOriginTPC);
56}
57
58AliHLTComponentDataType AliHLTTPCOfflineTrackerComponent::GetOutputDataType()
59{
60 // see header file for class documentation
61 return kAliHLTDataTypeESDTree|kAliHLTDataOriginTPC;
62}
63
64void AliHLTTPCOfflineTrackerComponent::GetOutputDataSize(unsigned long& constBase, double& inputMultiplier)
65{
66 // see header file for class documentation
67 constBase = 0;inputMultiplier = 1;
68}
69
70AliHLTComponent* AliHLTTPCOfflineTrackerComponent::Spawn()
71{
72 // see header file for class documentation
73 return new AliHLTTPCOfflineTrackerComponent;
74}
75
76int AliHLTTPCOfflineTrackerComponent::DoInit( int argc, const char** argv )
77{
78 // see header file for class documentation
79 int iResult=0;
80
81 TString argument="";
82 TString configuration="";
83 int bMissingParam=0;
84 for (int i=0; i<argc && iResult>=0; i++) {
85 argument=argv[i];
86 if (argument.IsNull()) continue;
87
88 }
89 if (bMissingParam) {
90 HLTError("missing parameter for argument %s", argument.Data());
91 iResult=-EINVAL;
92 }
93
94 if (iResult>=0 && !configuration.IsNull()) {
95 iResult=Configure(configuration.Data());
96 } else {
97 iResult=Reconfigure(NULL, NULL);
98 }
99
100 return iResult;
101}
102
103int AliHLTTPCOfflineTrackerComponent::DoDeinit()
104{
105 // see header file for class documentation
106 return 0;
107}
108
109int AliHLTTPCOfflineTrackerComponent::DoEvent( const AliHLTComponentEventData& /*evtData*/, AliHLTComponentTriggerData& /*trigData*/)
110{
111 // see header file for class documentation
112 HLTInfo("processing data");
113
114 return 0;
115}
116
117int AliHLTTPCOfflineTrackerComponent::Configure(const char* arguments)
118{
119 // see header file for class documentation
120 int iResult=0;
121 if (!arguments) return iResult;
122
123 TString allArgs=arguments;
124 TString argument;
125 int bMissingParam=0;
126
127 TObjArray* pTokens=allArgs.Tokenize(" ");
128 if (pTokens) {
129 for (int i=0; i<pTokens->GetEntries() && iResult>=0; i++) {
130 argument=((TObjString*)pTokens->At(i))->GetString();
131 if (argument.IsNull()) continue;
132
133 if (argument.CompareTo("-something")==0) {
134 if ((bMissingParam=(++i>=pTokens->GetEntries()))) break;
135
136 } else {
137 HLTError("unknown argument %s", argument.Data());
138 iResult=-EINVAL;
139 break;
140 }
141 }
142 delete pTokens;
143 }
144 if (bMissingParam) {
145 HLTError("missing parameter for argument %s", argument.Data());
146 iResult=-EINVAL;
147 }
148 return iResult;
149}
150
151int AliHLTTPCOfflineTrackerComponent::Reconfigure(const char* /*cdbEntry*/, const char* /*chainId*/)
152{
153 // see header file for class documentation
154 int iResult=0;
155 return iResult;
156}