]>
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 | ||
e1440dab | 31 | // component headers |
e1440dab | 32 | #include "AliHLTTPCDigitDumpComponent.h" |
f32b83e1 | 33 | #include "AliHLTTPCEsdWriterComponent.h" |
e1440dab | 34 | |
5578cf60 | 35 | /** ROOT macro for the implementation of ROOT specific class methods */ |
36 | ClassImp(AliHLTTPCAgent) | |
37 | ||
38 | AliHLTTPCAgent::AliHLTTPCAgent() | |
39 | { | |
40 | // see header file for class documentation | |
41 | // or | |
42 | // refer to README to build package | |
43 | // or | |
44 | // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt | |
45 | } | |
46 | ||
47 | AliHLTTPCAgent::~AliHLTTPCAgent() | |
48 | { | |
49 | // see header file for class documentation | |
50 | } | |
51 | ||
52 | int AliHLTTPCAgent::CreateConfigurations(AliHLTConfigurationHandler* handler, | |
dee38f1b | 53 | AliRawReader* /*rawReader*/, |
298ef463 | 54 | AliRunLoader* /*runloader*/) const |
5578cf60 | 55 | { |
56 | // see header file for class documentation | |
57 | if (handler) { | |
dfa1592e | 58 | int iMinSlice=0; |
59 | int iMaxSlice=1; | |
60 | int iMinPart=0; | |
61 | int iMaxPart=1; | |
62 | TString fileWriterInput; | |
63 | TString esdWriterInput; | |
64 | for (int slice=iMinSlice; slice<=iMaxSlice; slice++) { | |
65 | TString trackerInput; | |
66 | for (int part=iMinPart; part<=iMaxPart; part++) { | |
67 | TString arg, publisher, cf; | |
68 | ||
69 | // digit publisher components | |
70 | arg.Form("-slice %d -partition %d", slice, part); | |
71 | publisher.Form("DP_%02d_%d", slice, part); | |
72 | handler->CreateConfiguration(publisher.Data(), "TPCDigitPublisher", NULL , arg.Data()); | |
73 | ||
74 | // cluster finder components | |
75 | cf.Form("CF_%02d_%d", slice, part); | |
76 | handler->CreateConfiguration(cf.Data(), "TPCClusterFinderUnpacked", publisher.Data(), "pp-run timebins 446"); | |
77 | if (trackerInput.Length()>0) trackerInput+=" "; | |
78 | trackerInput+=cf; | |
79 | } | |
80 | TString tracker; | |
81 | // tracker finder components | |
82 | tracker.Form("TR_%02d", slice); | |
83 | handler->CreateConfiguration(tracker.Data(), "TPCSliceTracker", trackerInput.Data(), "pp-run bfield 0.5"); | |
84 | ||
85 | // input for the global file writer | |
86 | if (fileWriterInput.Length()>0) fileWriterInput+=" "; | |
87 | fileWriterInput+=trackerInput; | |
88 | ||
89 | // input for the esd writer | |
90 | if (esdWriterInput.Length()>0) esdWriterInput+=" "; | |
91 | esdWriterInput+=tracker; | |
92 | } | |
5578cf60 | 93 | |
94 | // the writer configuration | |
dfa1592e | 95 | handler->CreateConfiguration("sink1", "FileWriter" , fileWriterInput.Data(), "-specfmt -subdir=test_%d -blcknofmt=_0x%x -idfmt=_0x%08x"); |
96 | // the esd writer configuration | |
97 | handler->CreateConfiguration("esd-writer", "TPCEsdWriter" , esdWriterInput.Data(), "-datafile AliESDs.root"); | |
5578cf60 | 98 | } |
99 | return 0; | |
100 | } | |
101 | ||
dee38f1b | 102 | const char* AliHLTTPCAgent::GetReconstructionChains(AliRawReader* /*rawReader*/, |
103 | AliRunLoader* /*runloader*/) const | |
5578cf60 | 104 | { |
105 | // see header file for class documentation | |
106 | return NULL; | |
107 | //return "sink1"; | |
dfa1592e | 108 | //return "esd-writer"; |
5578cf60 | 109 | } |
110 | ||
111 | const char* AliHLTTPCAgent::GetRequiredComponentLibraries() const | |
112 | { | |
113 | // see header file for class documentation | |
114 | return NULL; | |
115 | } | |
f3506ea2 | 116 | |
e1440dab | 117 | int AliHLTTPCAgent::RegisterComponents(AliHLTComponentHandler* pHandler) const |
f3506ea2 | 118 | { |
e1440dab | 119 | // see header file for class documentation |
120 | if (!pHandler) return -EINVAL; | |
e1440dab | 121 | pHandler->AddComponent(new AliHLTTPCDigitDumpComponent); |
f32b83e1 | 122 | pHandler->AddComponent(new AliHLTTPCEsdWriterComponent::AliWriter); |
123 | pHandler->AddComponent(new AliHLTTPCEsdWriterComponent::AliConverter); | |
124 | ||
f3506ea2 | 125 | return 0; |
126 | } |