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"
35 /** ROOT macro for the implementation of ROOT specific class methods */
36 ClassImp(AliHLTTPCAgent)
38 AliHLTTPCAgent::AliHLTTPCAgent()
40 // see header file for class documentation
42 // refer to README to build package
44 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
47 AliHLTTPCAgent::~AliHLTTPCAgent()
49 // see header file for class documentation
52 int AliHLTTPCAgent::CreateConfigurations(AliHLTConfigurationHandler* handler,
53 AliRawReader* /*rawReader*/,
54 AliRunLoader* /*runloader*/) const
56 // see header file for class documentation
62 TString fileWriterInput;
63 TString esdWriterInput;
64 for (int slice=iMinSlice; slice<=iMaxSlice; slice++) {
66 for (int part=iMinPart; part<=iMaxPart; part++) {
67 TString arg, publisher, cf;
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());
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+=" ";
81 // tracker finder components
82 tracker.Form("TR_%02d", slice);
83 handler->CreateConfiguration(tracker.Data(), "TPCSliceTracker", trackerInput.Data(), "pp-run bfield 0.5");
85 // input for the global file writer
86 if (fileWriterInput.Length()>0) fileWriterInput+=" ";
87 fileWriterInput+=trackerInput;
89 // input for the esd writer
90 if (esdWriterInput.Length()>0) esdWriterInput+=" ";
91 esdWriterInput+=tracker;
94 // the writer configuration
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");
102 const char* AliHLTTPCAgent::GetReconstructionChains(AliRawReader* /*rawReader*/,
103 AliRunLoader* /*runloader*/) const
105 // see header file for class documentation
108 //return "esd-writer";
111 const char* AliHLTTPCAgent::GetRequiredComponentLibraries() const
113 // see header file for class documentation
117 int AliHLTTPCAgent::RegisterComponents(AliHLTComponentHandler* pHandler) const
119 // see header file for class documentation
120 if (!pHandler) return -EINVAL;
121 pHandler->AddComponent(new AliHLTAltroChannelSelectorComponent);
122 pHandler->AddComponent(new AliHLTTPCDigitDumpComponent);