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