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"
30 // header files of library components
31 #include "AliHLTAltroChannelSelectorComponent.h"
32 #include "AliHLTAltroTimebinAverageComponent.h"
34 /** global instance for agent registration */
35 AliHLTRCUAgent gAliHLTRCUAgent;
37 /** ROOT macro for the implementation of ROOT specific class methods */
38 ClassImp(AliHLTRCUAgent)
40 AliHLTRCUAgent::AliHLTRCUAgent()
41 : AliHLTModuleAgent("RCU")
43 // see header file for class documentation
45 // refer to README to build package
47 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
50 AliHLTRCUAgent::~AliHLTRCUAgent()
52 // see header file for class documentation
55 UInt_t AliHLTRCUAgent::GetDetectorMask() const
60 int AliHLTRCUAgent::CreateConfigurations(AliHLTConfigurationHandler* handler,
61 AliRawReader* rawReader,
62 AliRunLoader* /*runloader*/) const
64 // add configurations for the RCU library
67 // AliSimulation: use the AliRawReaderPublisher if the raw reader is available
68 // Alireconstruction: indicated by runloader==NULL, run always on raw data
73 TString sinkChannelSelectors;
74 for (int slice=iMinSlice; slice<=iMaxSlice; slice++) {
75 for (int part=iMinPart; part<=iMaxPart; part++) {
76 TString arg, publisher, selector;
78 // publisher component
79 int ddlno=AliHLTDAQ::DdlIDOffset(3);
80 if (part>1) ddlno+=72+4*slice+(part-2);
81 else ddlno+=2*slice+part;
83 publisher.Form("RCU-DP_%02d_%d", slice, part);
84 arg.Form("-minid %d -datatype 'DDL_RAW ' 'TPC ' -dataspec %s -silent", ddlno, AliHLTDAQ::HLTSpecificationFromDdlID(ddlno).c_str());
85 handler->CreateConfiguration(publisher.Data(), "AliRawReaderPublisher", NULL , arg.Data());
88 selector.Form("RCU-chselector_%02d_%d", slice, part);
89 arg="-signal-threshold 1";
90 handler->CreateConfiguration(selector.Data(), "AltroChannelSelector", publisher.Data(), arg.Data());
93 if (sinkChannelSelectors.Length()>0) sinkChannelSelectors+=" ";
94 sinkChannelSelectors+=selector;
97 handler->CreateConfiguration("RCU-channelselect", "BlockFilter", sinkChannelSelectors.Data(), "");
103 const char* AliHLTRCUAgent::GetReconstructionChains(AliRawReader* /*rawReader*/,
104 AliRunLoader* /*runloader*/) const
106 // see header file for class documentation
110 const char* AliHLTRCUAgent::GetRequiredComponentLibraries() const
112 // see header file for class documentation
116 int AliHLTRCUAgent::RegisterComponents(AliHLTComponentHandler* pHandler) const
118 // see header file for class documentation
120 if (!pHandler) return -EINVAL;
121 pHandler->AddComponent(new AliHLTAltroChannelSelectorComponent);
122 pHandler->AddComponent(new AliHLTAltroTimebinAverageComponent);