3 /**************************************************************************
4 * This file is property of and copyright by the ALICE HLT Project *
5 * ALICE Experiment at CERN, All rights reserved. *
7 * Primary Authors: Matthias Richter <Matthias.Richter@ift.uib.no> *
8 * for The ALICE HLT Project. *
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 **************************************************************************/
19 /** @file AliHLTTPCAgent.cxx
20 @author Matthias Richter
22 @brief Agent of the libAliHLTTPC library
25 #include "AliHLTTPCAgent.h"
26 #include "AliHLTConfiguration.h"
28 /** global instance for agent registration */
29 AliHLTTPCAgent gAliHLTTPCAgent;
32 #include "AliHLTAltroChannelSelectorComponent.h"
33 #include "AliHLTTPCDigitDumpComponent.h"
34 #include "AliHLTTPCEsdWriterComponent.h"
36 /** ROOT macro for the implementation of ROOT specific class methods */
37 ClassImp(AliHLTTPCAgent)
39 AliHLTTPCAgent::AliHLTTPCAgent()
41 // see header file for class documentation
43 // refer to README to build package
45 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
48 AliHLTTPCAgent::~AliHLTTPCAgent()
50 // see header file for class documentation
53 int AliHLTTPCAgent::CreateConfigurations(AliHLTConfigurationHandler* handler,
54 AliRawReader* /*rawReader*/,
55 AliRunLoader* /*runloader*/) const
57 // see header file for class documentation
63 TString fileWriterInput;
64 TString esdWriterInput;
65 for (int slice=iMinSlice; slice<=iMaxSlice; slice++) {
67 for (int part=iMinPart; part<=iMaxPart; part++) {
68 TString arg, publisher, cf;
70 // digit publisher components
71 arg.Form("-slice %d -partition %d", slice, part);
72 publisher.Form("DP_%02d_%d", slice, part);
73 handler->CreateConfiguration(publisher.Data(), "TPCDigitPublisher", NULL , arg.Data());
75 // cluster finder components
76 cf.Form("CF_%02d_%d", slice, part);
77 handler->CreateConfiguration(cf.Data(), "TPCClusterFinderUnpacked", publisher.Data(), "pp-run timebins 446");
78 if (trackerInput.Length()>0) trackerInput+=" ";
82 // tracker finder components
83 tracker.Form("TR_%02d", slice);
84 handler->CreateConfiguration(tracker.Data(), "TPCSliceTracker", trackerInput.Data(), "pp-run bfield 0.5");
86 // input for the global file writer
87 if (fileWriterInput.Length()>0) fileWriterInput+=" ";
88 fileWriterInput+=trackerInput;
90 // input for the esd writer
91 if (esdWriterInput.Length()>0) esdWriterInput+=" ";
92 esdWriterInput+=tracker;
95 // the writer configuration
96 handler->CreateConfiguration("sink1", "FileWriter" , fileWriterInput.Data(), "-specfmt -subdir=test_%d -blcknofmt=_0x%x -idfmt=_0x%08x");
97 // the esd writer configuration
98 handler->CreateConfiguration("esd-writer", "TPCEsdWriter" , esdWriterInput.Data(), "-datafile AliESDs.root");
103 const char* AliHLTTPCAgent::GetReconstructionChains(AliRawReader* /*rawReader*/,
104 AliRunLoader* /*runloader*/) const
106 // see header file for class documentation
109 //return "esd-writer";
112 const char* AliHLTTPCAgent::GetRequiredComponentLibraries() const
114 // see header file for class documentation
118 int AliHLTTPCAgent::RegisterComponents(AliHLTComponentHandler* pHandler) const
120 // see header file for class documentation
121 if (!pHandler) return -EINVAL;
122 pHandler->AddComponent(new AliHLTAltroChannelSelectorComponent);
123 pHandler->AddComponent(new AliHLTTPCDigitDumpComponent);
124 pHandler->AddComponent(new AliHLTTPCEsdWriterComponent::AliWriter);
125 pHandler->AddComponent(new AliHLTTPCEsdWriterComponent::AliConverter);