]>
Commit | Line | Data |
---|---|---|
5e3820e2 | 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 | ||
f5bd9c68 | 19 | /// @file AliHLTRCUAgent.cxx |
20 | /// @author Matthias Richter | |
21 | /// @date | |
22 | /// @brief Agent of the libAliHLTRCU library | |
23 | /// | |
5e3820e2 | 24 | |
25 | #include <cassert> | |
26 | #include "AliHLTRCUAgent.h" | |
f5bd9c68 | 27 | #include "AliHLTDAQ.h" |
5e3820e2 | 28 | |
29 | // header files of library components | |
3dcae0cc | 30 | #include "AliHLTAltroChannelSelectorComponent.h" |
881c4032 | 31 | #include "AliHLTAltroTimebinAverageComponent.h" |
5e3820e2 | 32 | |
33 | /** global instance for agent registration */ | |
34 | AliHLTRCUAgent gAliHLTRCUAgent; | |
35 | ||
36 | /** ROOT macro for the implementation of ROOT specific class methods */ | |
37 | ClassImp(AliHLTRCUAgent) | |
38 | ||
39 | AliHLTRCUAgent::AliHLTRCUAgent() | |
f5bd9c68 | 40 | : AliHLTModuleAgent("RCU") |
5e3820e2 | 41 | { |
42 | // see header file for class documentation | |
43 | // or | |
44 | // refer to README to build package | |
45 | // or | |
46 | // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt | |
47 | } | |
48 | ||
49 | AliHLTRCUAgent::~AliHLTRCUAgent() | |
50 | { | |
51 | // see header file for class documentation | |
52 | } | |
53 | ||
f5bd9c68 | 54 | int AliHLTRCUAgent::CreateConfigurations(AliHLTConfigurationHandler* handler, |
55 | AliRawReader* rawReader, | |
bf376e10 | 56 | AliRunLoader* /*runloader*/) const |
5e3820e2 | 57 | { |
f5bd9c68 | 58 | // add configurations for the RCU library |
59 | if (handler) { | |
60 | if (rawReader) { | |
61 | // AliSimulation: use the AliRawReaderPublisher if the raw reader is available | |
62 | // Alireconstruction: indicated by runloader==NULL, run always on raw data | |
63 | int iMinSlice=0; | |
64 | int iMaxSlice=35; | |
65 | int iMinPart=0; | |
66 | int iMaxPart=5; | |
67 | TString sinkChannelSelectors; | |
68 | for (int slice=iMinSlice; slice<=iMaxSlice; slice++) { | |
69 | for (int part=iMinPart; part<=iMaxPart; part++) { | |
70 | TString arg, publisher, selector; | |
71 | ||
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; | |
76 | ||
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()); | |
80 | ||
81 | // selector component | |
82 | selector.Form("RCU-chselector_%02d_%d", slice, part); | |
83 | arg="-signal-threshold 1"; | |
84 | handler->CreateConfiguration(selector.Data(), "AltroChannelSelector", publisher.Data(), arg.Data()); | |
85 | ||
86 | ||
87 | if (sinkChannelSelectors.Length()>0) sinkChannelSelectors+=" "; | |
88 | sinkChannelSelectors+=selector; | |
89 | } | |
90 | } | |
91 | handler->CreateConfiguration("RCU-channelselect", "BlockFilter", sinkChannelSelectors.Data(), ""); | |
92 | } | |
93 | } | |
5e3820e2 | 94 | return 0; |
95 | } | |
96 | ||
97 | const char* AliHLTRCUAgent::GetReconstructionChains(AliRawReader* /*rawReader*/, | |
98 | AliRunLoader* /*runloader*/) const | |
99 | { | |
100 | // see header file for class documentation | |
101 | return NULL; | |
102 | } | |
103 | ||
104 | const char* AliHLTRCUAgent::GetRequiredComponentLibraries() const | |
105 | { | |
106 | // see header file for class documentation | |
107 | return NULL; | |
108 | } | |
109 | ||
110 | int AliHLTRCUAgent::RegisterComponents(AliHLTComponentHandler* pHandler) const | |
111 | { | |
112 | // see header file for class documentation | |
113 | assert(pHandler); | |
114 | if (!pHandler) return -EINVAL; | |
3dcae0cc | 115 | pHandler->AddComponent(new AliHLTAltroChannelSelectorComponent); |
881c4032 | 116 | pHandler->AddComponent(new AliHLTAltroTimebinAverageComponent); |
5e3820e2 | 117 | return 0; |
118 | } |