]>
Commit | Line | Data |
---|---|---|
5578cf60 | 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 | * for The ALICE HLT Project. * | |
9 | * * | |
10 | * Permission to use, copy, modify and distribute this software and its * | |
11 | * documentation strictly for non-commercial purposes is hereby granted * | |
12 | * without fee, provided that the above copyright notice appears in all * | |
13 | * copies and that both the copyright notice and this permission notice * | |
14 | * appear in the supporting documentation. The authors make no claims * | |
15 | * about the suitability of this software for any purpose. It is * | |
16 | * provided "as is" without express or implied warranty. * | |
17 | **************************************************************************/ | |
18 | ||
19 | /** @file AliHLTTPCAgent.cxx | |
20 | @author Matthias Richter | |
21 | @date | |
22 | @brief Agent of the libAliHLTTPC library | |
23 | */ | |
24 | ||
25 | #include "AliHLTTPCAgent.h" | |
26 | #include "AliHLTConfiguration.h" | |
27 | ||
28 | /** global instance for agent registration */ | |
29 | AliHLTTPCAgent gAliHLTTPCAgent; | |
30 | ||
31 | /** ROOT macro for the implementation of ROOT specific class methods */ | |
32 | ClassImp(AliHLTTPCAgent) | |
33 | ||
34 | AliHLTTPCAgent::AliHLTTPCAgent() | |
35 | { | |
36 | // see header file for class documentation | |
37 | // or | |
38 | // refer to README to build package | |
39 | // or | |
40 | // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt | |
41 | } | |
42 | ||
43 | AliHLTTPCAgent::~AliHLTTPCAgent() | |
44 | { | |
45 | // see header file for class documentation | |
46 | } | |
47 | ||
48 | int AliHLTTPCAgent::CreateConfigurations(AliHLTConfigurationHandler* handler, | |
dee38f1b | 49 | AliRawReader* /*rawReader*/, |
298ef463 | 50 | AliRunLoader* /*runloader*/) const |
5578cf60 | 51 | { |
52 | // see header file for class documentation | |
53 | if (handler) { | |
dfa1592e | 54 | int iMinSlice=0; |
55 | int iMaxSlice=1; | |
56 | int iMinPart=0; | |
57 | int iMaxPart=1; | |
58 | TString fileWriterInput; | |
59 | TString esdWriterInput; | |
60 | for (int slice=iMinSlice; slice<=iMaxSlice; slice++) { | |
61 | TString trackerInput; | |
62 | for (int part=iMinPart; part<=iMaxPart; part++) { | |
63 | TString arg, publisher, cf; | |
64 | ||
65 | // digit publisher components | |
66 | arg.Form("-slice %d -partition %d", slice, part); | |
67 | publisher.Form("DP_%02d_%d", slice, part); | |
68 | handler->CreateConfiguration(publisher.Data(), "TPCDigitPublisher", NULL , arg.Data()); | |
69 | ||
70 | // cluster finder components | |
71 | cf.Form("CF_%02d_%d", slice, part); | |
72 | handler->CreateConfiguration(cf.Data(), "TPCClusterFinderUnpacked", publisher.Data(), "pp-run timebins 446"); | |
73 | if (trackerInput.Length()>0) trackerInput+=" "; | |
74 | trackerInput+=cf; | |
75 | } | |
76 | TString tracker; | |
77 | // tracker finder components | |
78 | tracker.Form("TR_%02d", slice); | |
79 | handler->CreateConfiguration(tracker.Data(), "TPCSliceTracker", trackerInput.Data(), "pp-run bfield 0.5"); | |
80 | ||
81 | // input for the global file writer | |
82 | if (fileWriterInput.Length()>0) fileWriterInput+=" "; | |
83 | fileWriterInput+=trackerInput; | |
84 | ||
85 | // input for the esd writer | |
86 | if (esdWriterInput.Length()>0) esdWriterInput+=" "; | |
87 | esdWriterInput+=tracker; | |
88 | } | |
5578cf60 | 89 | |
90 | // the writer configuration | |
dfa1592e | 91 | handler->CreateConfiguration("sink1", "FileWriter" , fileWriterInput.Data(), "-specfmt -subdir=test_%d -blcknofmt=_0x%x -idfmt=_0x%08x"); |
92 | // the esd writer configuration | |
93 | handler->CreateConfiguration("esd-writer", "TPCEsdWriter" , esdWriterInput.Data(), "-datafile AliESDs.root"); | |
5578cf60 | 94 | } |
95 | return 0; | |
96 | } | |
97 | ||
dee38f1b | 98 | const char* AliHLTTPCAgent::GetReconstructionChains(AliRawReader* /*rawReader*/, |
99 | AliRunLoader* /*runloader*/) const | |
5578cf60 | 100 | { |
101 | // see header file for class documentation | |
102 | return NULL; | |
103 | //return "sink1"; | |
dfa1592e | 104 | //return "esd-writer"; |
5578cf60 | 105 | } |
106 | ||
107 | const char* AliHLTTPCAgent::GetRequiredComponentLibraries() const | |
108 | { | |
109 | // see header file for class documentation | |
110 | return NULL; | |
111 | } | |
f3506ea2 | 112 | |
5d2abf3b | 113 | int AliHLTTPCAgent::RegisterComponents(AliHLTComponentHandler* /*pHandler*/) const |
f3506ea2 | 114 | { |
115 | return 0; | |
116 | } |