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 AliHLTRCUAgent.cxx
20 /// @author Matthias Richter
22 /// @brief Agent of the libAliHLTRCU library
26 #include "AliHLTRCUAgent.h"
27 #include "AliHLTDAQ.h"
29 // header files of library components
30 #include "AliHLTAltroChannelSelectorComponent.h"
31 #include "AliHLTAltroTimebinAverageComponent.h"
33 /** global instance for agent registration */
34 AliHLTRCUAgent gAliHLTRCUAgent;
36 /** ROOT macro for the implementation of ROOT specific class methods */
37 ClassImp(AliHLTRCUAgent)
39 AliHLTRCUAgent::AliHLTRCUAgent()
40 : AliHLTModuleAgent("RCU")
42 // see header file for class documentation
44 // refer to README to build package
46 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
49 AliHLTRCUAgent::~AliHLTRCUAgent()
51 // see header file for class documentation
54 int AliHLTRCUAgent::CreateConfigurations(AliHLTConfigurationHandler* handler,
55 AliRawReader* rawReader,
56 AliRunLoader* /*runloader*/) const
58 // add configurations for the RCU library
61 // AliSimulation: use the AliRawReaderPublisher if the raw reader is available
62 // Alireconstruction: indicated by runloader==NULL, run always on raw data
67 TString sinkChannelSelectors;
68 for (int slice=iMinSlice; slice<=iMaxSlice; slice++) {
69 for (int part=iMinPart; part<=iMaxPart; part++) {
70 TString arg, publisher, selector;
72 // publisher component
73 int ddlno=AliHLTDAQ::DdlIDOffset(3);
74 if (part>1) ddlno+=72+4*slice+(part-2);
75 else ddlno+=2*slice+part;
77 publisher.Form("RCU-DP_%02d_%d", slice, part);
78 arg.Form("-minid %d -datatype 'DDL_RAW ' 'TPC ' -dataspec %s -silent", ddlno, AliHLTDAQ::HLTSpecificationFromDdlID(ddlno).c_str());
79 handler->CreateConfiguration(publisher.Data(), "AliRawReaderPublisher", NULL , arg.Data());
82 selector.Form("RCU-chselector_%02d_%d", slice, part);
83 arg="-signal-threshold 1";
84 handler->CreateConfiguration(selector.Data(), "AltroChannelSelector", publisher.Data(), arg.Data());
87 if (sinkChannelSelectors.Length()>0) sinkChannelSelectors+=" ";
88 sinkChannelSelectors+=selector;
91 handler->CreateConfiguration("RCU-channelselect", "BlockFilter", sinkChannelSelectors.Data(), "");
97 const char* AliHLTRCUAgent::GetReconstructionChains(AliRawReader* /*rawReader*/,
98 AliRunLoader* /*runloader*/) const
100 // see header file for class documentation
104 const char* AliHLTRCUAgent::GetRequiredComponentLibraries() const
106 // see header file for class documentation
110 int AliHLTRCUAgent::RegisterComponents(AliHLTComponentHandler* pHandler) const
112 // see header file for class documentation
114 if (!pHandler) return -EINVAL;
115 pHandler->AddComponent(new AliHLTAltroChannelSelectorComponent);
116 pHandler->AddComponent(new AliHLTAltroTimebinAverageComponent);