]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/TPCLib/AliHLTTPCAgent.cxx
trigger update (Rachid)
[u/mrichter/AliRoot.git] / HLT / TPCLib / AliHLTTPCAgent.cxx
CommitLineData
51e9ec2a 1// $Id$
5578cf60 2
0efebbac 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//**************************************************************************
5578cf60 18
51e9ec2a 19// @file AliHLTTPCAgent.cxx
20// @author Matthias Richter
21// @date
22// @brief Agent of the libAliHLTTPC library
23// @note
5578cf60 24
25#include "AliHLTTPCAgent.h"
26#include "AliHLTConfiguration.h"
626bfcc1 27#include "AliHLTTPCDefinitions.h"
28#include "AliHLTOUT.h"
73449074 29#include "AliHLTOUTHandlerChain.h"
352670bf 30#include "AliRunLoader.h"
286c9940 31#include "AliCDBManager.h"
32#include "AliCDBEntry.h"
33#include "AliTPCParam.h"
5578cf60 34
35/** global instance for agent registration */
36AliHLTTPCAgent gAliHLTTPCAgent;
37
e1440dab 38// component headers
672f8b8c 39#include "AliHLTTPCRunStatisticsProducerComponent.h"
40#include "AliHLTTPCEventStatisticsProducerComponent.h"
41#include "AliHLTTPCCompModelInflaterComponent.h"
42#include "AliHLTTPCCompModelDeflaterComponent.h"
43#include "AliHLTTPCCompModelDeconverterComponent.h"
44#include "AliHLTTPCCompModelConverterComponent.h"
45#include "AliHLTTPCCompDumpComponent.h"
32e0c022 46//#include "AliHLTTPCCalibCEComponent.h"
47//#include "AliHLTTPCCalibPulserComponent.h"
48//#include "AliHLTTPCCalibPedestalComponent.h"
751d16ac 49#include "AliHLTTPCCAInputDataCompressorComponent.h"
400d857a 50#include "AliHLTTPCCATrackerComponent.h"
a6fb14f5 51#include "AliHLTTPCTrackMCMarkerComponent.h"
400d857a 52#include "AliHLTTPCCAGlobalMergerComponent.h"
0973c527 53#include "AliHLTTPCdEdxComponent.h"
672f8b8c 54#include "AliHLTTPCGlobalMergerComponent.h"
55#include "AliHLTTPCSliceTrackerComponent.h"
56#include "AliHLTTPCVertexFinderComponent.h"
57#include "AliHLTTPCClusterFinderComponent.h"
58#include "AliHLTTPCRawDataUnpackerComponent.h"
59#include "AliHLTTPCDigitPublisherComponent.h"
60#include "AliHLTTPCZeroSuppressionComponent.h"
e1440dab 61#include "AliHLTTPCDigitDumpComponent.h"
0efebbac 62#include "AliHLTTPCClusterDumpComponent.h"
f32b83e1 63#include "AliHLTTPCEsdWriterComponent.h"
1ac82ce6 64#include "AliHLTTPCOfflineClustererComponent.h"
65#include "AliHLTTPCOfflineTrackerComponent.h"
0e442a0a 66#include "AliHLTTPCOfflineTrackerCalibComponent.h"
32e0c022 67#include "AliHLTTPCOfflineCalibrationComponent.h" // to be added to the calibration library agent
0efebbac 68#include "AliHLTTPCClusterHistoComponent.h"
3a3550fa 69#include "AliHLTTPCNoiseMapComponent.h"
70#include "AliHLTTPCHistogramHandlerComponent.h"
32e0c022 71//#include "AliHLTTPCCalibTracksComponent.h"
22f34176 72#include "AliHLTTPCTrackHistoComponent.h"
73#include "AliHLTTPCTrackDumpComponent.h"
a912b63b 74#include "AliHLTTPCHWCFDataReverterComponent.h"
6af4f584 75#include "AliHLTTPCHWClusterTransformComponent.h"
32e0c022 76// #include "AliHLTTPCCalibSeedMakerComponent.h"
77// #include "AliHLTTPCCalibTimeComponent.h"
78// #include "AliHLTTPCCalibTimeGainComponent.h"
79// #include "AliHLTTPCCalibrationComponent.h"
e1440dab 80
5578cf60 81/** ROOT macro for the implementation of ROOT specific class methods */
82ClassImp(AliHLTTPCAgent)
83
84AliHLTTPCAgent::AliHLTTPCAgent()
51e9ec2a 85 : AliHLTModuleAgent("TPC")
86 , fRawDataHandler(NULL)
87 , fTracksegsDataHandler(NULL)
88 , fClustersDataHandler(NULL)
5578cf60 89{
90 // see header file for class documentation
91 // or
92 // refer to README to build package
93 // or
94 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
95}
96
97AliHLTTPCAgent::~AliHLTTPCAgent()
98{
99 // see header file for class documentation
100}
101
102int AliHLTTPCAgent::CreateConfigurations(AliHLTConfigurationHandler* handler,
4fc08fff 103 AliRawReader* rawReader,
7c6a3cd3 104 AliRunLoader* runloader) const
5578cf60 105{
106 // see header file for class documentation
107 if (handler) {
672f8b8c 108
109 // This the tracking configuration for the full TPC
110 // - 216 clusterfinders (1 per partition)
111 // - 36 slice trackers
112 // - one global merger
113 // - the esd converter
114 // The ESD is shipped embedded into a TTree
dfa1592e 115 int iMinSlice=0;
672f8b8c 116 int iMaxSlice=35;
dfa1592e 117 int iMinPart=0;
672f8b8c 118 int iMaxPart=5;
119 TString mergerInput;
84bb5f35 120 TString sinkClusterInput;
dfa1592e 121 for (int slice=iMinSlice; slice<=iMaxSlice; slice++) {
122 TString trackerInput;
123 for (int part=iMinPart; part<=iMaxPart; part++) {
124 TString arg, publisher, cf;
125
126 // digit publisher components
0ba35c53 127 publisher.Form("TPC-DP_%02d_%d", slice, part);
7c6a3cd3 128 if (rawReader || !runloader) {
129 // AliSimulation: use the AliRawReaderPublisher if the raw reader is available
130 // Alireconstruction: indicated by runloader==NULL, run always on raw data
4fc08fff 131 int ddlno=768;
132 if (part>1) ddlno+=72+4*slice+(part-2);
133 else ddlno+=2*slice+part;
134 arg.Form("-minid %d -datatype 'DDL_RAW ' 'TPC ' -dataspec 0x%02x%02x%02x%02x -silent", ddlno, slice, slice, part, part);
135 handler->CreateConfiguration(publisher.Data(), "AliRawReaderPublisher", NULL , arg.Data());
7c6a3cd3 136 } else {
137 arg.Form("-slice %d -partition %d", slice, part);
138 handler->CreateConfiguration(publisher.Data(), "TPCDigitPublisher", NULL , arg.Data());
4fc08fff 139 }
dfa1592e 140
141 // cluster finder components
0ba35c53 142 cf.Form("TPC-CF_%02d_%d", slice, part);
3c788ec7 143 arg="-release-memory";
9c790772 144 if (!rawReader && runloader) {
fc7c0369 145 arg+=" -do-mc";
286c9940 146 handler->CreateConfiguration(cf.Data(), "TPCClusterFinderUnpacked", publisher.Data(), arg.Data());
4fc08fff 147 } else {
9c790772 148#ifndef HAVE_NOT_ALTRORAWSTREAMV3
3c788ec7 149 handler->CreateConfiguration(cf.Data(), "TPCClusterFinder32Bit", publisher.Data(),arg.Data());
9c790772 150#else
151 // using the AltroDecoder if the official V3 decoder is not
152 // available in the offline code
286c9940 153 handler->CreateConfiguration(cf.Data(), "TPCClusterFinderDecoder", publisher.Data(), arg.Data());
9c790772 154#endif
4fc08fff 155 }
dfa1592e 156 if (trackerInput.Length()>0) trackerInput+=" ";
157 trackerInput+=cf;
84bb5f35 158 if (sinkClusterInput.Length()>0) sinkClusterInput+=" ";
159 sinkClusterInput+=cf;
dfa1592e 160 }
161 TString tracker;
162 // tracker finder components
0ba35c53 163 tracker.Form("TPC-TR_%02d", slice);
fc7c0369 164 handler->CreateConfiguration(tracker.Data(), "TPCCATracker", trackerInput.Data(), "");
dfa1592e 165
672f8b8c 166 if (mergerInput.Length()>0) mergerInput+=" ";
167 mergerInput+=tracker;
dfa1592e 168
dfa1592e 169 }
5578cf60 170
672f8b8c 171 // GlobalMerger component
fc7c0369 172 handler->CreateConfiguration("TPC-globalmerger","TPCCAGlobalMerger",mergerInput.Data(),"");
672f8b8c 173
174 // the esd converter configuration
791fbeb7 175 TString converterInput="TPC-globalmerger";
9c790772 176 if (!rawReader && runloader) {
791fbeb7 177 // propagate cluster info to the esd converter in order to fill the MC information
6595fdc6 178 handler->CreateConfiguration("TPC-clustermc-info", "BlockFilter" , sinkClusterInput.Data(), "-datatype 'CLMCINFO' 'TPC '");
179 handler->CreateConfiguration("TPC-mcTrackMarker","TPCTrackMCMarker","TPC-globalmerger TPC-clustermc-info","" );
791fbeb7 180 converterInput+=" ";
6595fdc6 181 converterInput+="TPC-mcTrackMarker";
791fbeb7 182 }
183 handler->CreateConfiguration("TPC-esd-converter", "TPCEsdConverter" , converterInput.Data(), "");
73449074 184
84bb5f35 185 // cluster dump collection
186 handler->CreateConfiguration("TPC-clusters", "BlockFilter" , sinkClusterInput.Data(), "-datatype 'CLUSTERS' 'TPC '");
187
73449074 188 /////////////////////////////////////////////////////////////////////////////////////
189 //
190 // a kChain HLTOUT configuration for processing of {'TRAKSEGS':'TPC '} data blocks
191 // collects the data blocks, merges the tracks and produces an ESD object
192
193 // publisher component
194 handler->CreateConfiguration("TPC-hltout-tracksegs-publisher", "AliHLTOUTPublisher" , NULL, "");
195
196 // GlobalMerger component
197 handler->CreateConfiguration("TPC-hltout-tracksegs-merger", "TPCGlobalMerger", "TPC-hltout-tracksegs-publisher", "");
198
199 // the esd converter configuration
200 handler->CreateConfiguration("TPC-hltout-tracksegs-esd-converter", "TPCEsdConverter", "TPC-hltout-tracksegs-merger", "");
201
202 /////////////////////////////////////////////////////////////////////////////////////
203 //
204 // a kChain HLTOUT configuration for processing of {'TRACKS ':'TPC '} data blocks
205 // produces an ESD object from the track structure
206
207 // publisher component
208 handler->CreateConfiguration("TPC-hltout-tracks-publisher", "AliHLTOUTPublisher" , NULL, "");
209
210 // the esd converter configuration
211 handler->CreateConfiguration("TPC-hltout-tracks-esd-converter", "TPCEsdConverter", "TPC-hltout-tracks-publisher", "");
51e9ec2a 212
213 /////////////////////////////////////////////////////////////////////////////////////
214 //
215 // a kChain HLTOUT configuration for processing of {'CLUSTERS':'TPC '} data blocks
216 // stores the blocks in file HLT.TPC.Clusters.root in HOMER format
217
218 // publisher component
219 handler->CreateConfiguration("TPC-hltout-cluster-publisher", "AliHLTOUTPublisher" , NULL, "");
220
221 // the HLTOUT component collects the blocks and stores the file
222 handler->CreateConfiguration("TPC-hltout-cluster-dump", "HLTOUT", "TPC-hltout-cluster-publisher", "-digitfile HLT.TPC.Clusters.root -rawout=off -links 2");
5578cf60 223 }
51e9ec2a 224
5578cf60 225 return 0;
226}
227
dee38f1b 228const char* AliHLTTPCAgent::GetReconstructionChains(AliRawReader* /*rawReader*/,
ff6648de 229 AliRunLoader* runloader) const
5578cf60 230{
231 // see header file for class documentation
ff6648de 232 if (runloader) {
233 // reconstruction chains for AliRoot simulation
234 // Note: run loader is only available while running embedded into
235 // AliRoot simulation
6595fdc6 236 //if (runloader->GetLoader("TPCLoader") != NULL)
237 //return "TPC-esd-converter TPC-clusters";
238 return "TPC-clusters";
ff6648de 239 }
240 return NULL;
5578cf60 241}
242
243const char* AliHLTTPCAgent::GetRequiredComponentLibraries() const
244{
245 // see header file for class documentation
5ad1e184 246
247 // actually, the TPC library has dependencies to Util and RCU
248 // so the two has to be loaded anyhow before we get here
249 //return "libAliHLTUtil.so libAliHLTRCU.so";
9c790772 250 return "libAliHLTUtil.so";
5578cf60 251}
f3506ea2 252
e1440dab 253int AliHLTTPCAgent::RegisterComponents(AliHLTComponentHandler* pHandler) const
f3506ea2 254{
e1440dab 255 // see header file for class documentation
256 if (!pHandler) return -EINVAL;
672f8b8c 257
258 pHandler->AddComponent(new AliHLTTPCRunStatisticsProducerComponent);
259 pHandler->AddComponent(new AliHLTTPCEventStatisticsProducerComponent);
32e0c022 260// pHandler->AddComponent(new AliHLTTPCCalibCEComponent);
261// pHandler->AddComponent(new AliHLTTPCCalibPulserComponent);
262// pHandler->AddComponent(new AliHLTTPCCalibPedestalComponent);
672f8b8c 263 pHandler->AddComponent(new AliHLTTPCCompModelInflaterComponent);
264 pHandler->AddComponent(new AliHLTTPCCompModelDeflaterComponent);
265 pHandler->AddComponent(new AliHLTTPCCompModelDeconverterComponent);
266 pHandler->AddComponent(new AliHLTTPCCompModelConverterComponent);
267 pHandler->AddComponent(new AliHLTTPCCompDumpComponent);
751d16ac 268 pHandler->AddComponent(new AliHLTTPCCAInputDataCompressorComponent);
400d857a 269 pHandler->AddComponent(new AliHLTTPCCATrackerComponent);
270 pHandler->AddComponent(new AliHLTTPCCAGlobalMergerComponent);
a6fb14f5 271 pHandler->AddComponent(new AliHLTTPCTrackMCMarkerComponent);
672f8b8c 272 pHandler->AddComponent(new AliHLTTPCGlobalMergerComponent);
0973c527 273 pHandler->AddComponent(new AliHLTTPCdEdxComponent);
672f8b8c 274 pHandler->AddComponent(new AliHLTTPCSliceTrackerComponent);
275 pHandler->AddComponent(new AliHLTTPCVertexFinderComponent);
276 pHandler->AddComponent(new AliHLTTPCClusterFinderComponent(AliHLTTPCClusterFinderComponent::kClusterFinderPacked));
277 pHandler->AddComponent(new AliHLTTPCClusterFinderComponent(AliHLTTPCClusterFinderComponent::kClusterFinderUnpacked));
278 pHandler->AddComponent(new AliHLTTPCClusterFinderComponent(AliHLTTPCClusterFinderComponent::kClusterFinderDecoder));
6f23f6cc 279 pHandler->AddComponent(new AliHLTTPCClusterFinderComponent(AliHLTTPCClusterFinderComponent::kClusterFinder32Bit));
672f8b8c 280 pHandler->AddComponent(new AliHLTTPCRawDataUnpackerComponent);
281 pHandler->AddComponent(new AliHLTTPCDigitPublisherComponent);
282 pHandler->AddComponent(new AliHLTTPCZeroSuppressionComponent);
e1440dab 283 pHandler->AddComponent(new AliHLTTPCDigitDumpComponent);
0efebbac 284 pHandler->AddComponent(new AliHLTTPCClusterDumpComponent);
f32b83e1 285 pHandler->AddComponent(new AliHLTTPCEsdWriterComponent::AliWriter);
286 pHandler->AddComponent(new AliHLTTPCEsdWriterComponent::AliConverter);
1ac82ce6 287 pHandler->AddComponent(new AliHLTTPCOfflineClustererComponent);
288 pHandler->AddComponent(new AliHLTTPCOfflineTrackerComponent);
0e442a0a 289 pHandler->AddComponent(new AliHLTTPCOfflineTrackerCalibComponent);
e642ae99 290 pHandler->AddComponent(new AliHLTTPCOfflineCalibrationComponent);
0efebbac 291 pHandler->AddComponent(new AliHLTTPCClusterHistoComponent);
3a3550fa 292 pHandler->AddComponent(new AliHLTTPCNoiseMapComponent);
293 pHandler->AddComponent(new AliHLTTPCHistogramHandlerComponent);
32e0c022 294 //pHandler->AddComponent(new AliHLTTPCCalibTracksComponent);
22f34176 295 pHandler->AddComponent(new AliHLTTPCTrackHistoComponent);
296 pHandler->AddComponent(new AliHLTTPCTrackDumpComponent);
a912b63b 297 pHandler->AddComponent(new AliHLTTPCHWCFDataReverterComponent);
6af4f584 298 pHandler->AddComponent(new AliHLTTPCHWClusterTransformComponent);
32e0c022 299// pHandler->AddComponent(new AliHLTTPCCalibSeedMakerComponent);
300// pHandler->AddComponent(new AliHLTTPCCalibTimeComponent);
301// pHandler->AddComponent(new AliHLTTPCCalibTimeGainComponent);
302// pHandler->AddComponent(new AliHLTTPCCalibrationComponent);
a912b63b 303
f3506ea2 304 return 0;
305}
626bfcc1 306
307int AliHLTTPCAgent::GetHandlerDescription(AliHLTComponentDataType dt,
308 AliHLTUInt32_t spec,
309 AliHLTOUTHandlerDesc& desc) const
310{
311 // see header file for class documentation
73449074 312
313 // raw data blocks to be fed into offline reconstruction
626bfcc1 314 if (dt==(kAliHLTDataTypeDDLRaw|kAliHLTDataOriginTPC)) {
315 int slice=AliHLTTPCDefinitions::GetMinSliceNr(spec);
316 int part=AliHLTTPCDefinitions::GetMinPatchNr(spec);
317 if (slice==AliHLTTPCDefinitions::GetMaxSliceNr(spec) &&
318 part==AliHLTTPCDefinitions::GetMaxPatchNr(spec)) {
319 desc=AliHLTOUTHandlerDesc(kRawReader, dt, GetModuleId());
320 return 1;
321 } else {
322 HLTWarning("handler can not process merged data from multiple ddls:"
323 " min slice %d, max slice %d, min part %d, max part %d",
324 slice, AliHLTTPCDefinitions::GetMaxSliceNr(spec),
325 part, AliHLTTPCDefinitions::GetMaxPatchNr(spec));
326 return 0;
327 }
328 }
73449074 329
51e9ec2a 330 // dump for {'CLUSTERS':'TPC '} blocks stored in a 'digit' file
84bb5f35 331 if (dt==AliHLTTPCDefinitions::fgkClustersDataType) {
51e9ec2a 332 desc=AliHLTOUTHandlerDesc(kChain, dt, GetModuleId());
84bb5f35 333 return 1;
334 }
335
73449074 336 // afterburner for {'TRAKSEGS':'TPC '} blocks to be converted to ESD format
337 if (dt==AliHLTTPCDefinitions::fgkTrackSegmentsDataType) {
338 desc=AliHLTOUTHandlerDesc(kChain, dt, GetModuleId());
339 return 1;
340 }
341
342 // afterburner for {'TRACKS ':'TPC '} block to be converted to ESD format
343 // there is only one data block
344 if (dt==AliHLTTPCDefinitions::fgkTracksDataType) {
345 desc=AliHLTOUTHandlerDesc(kChain, dt, GetModuleId());
346 return 1;
347 }
626bfcc1 348 return 0;
349}
350
351AliHLTOUTHandler* AliHLTTPCAgent::GetOutputHandler(AliHLTComponentDataType dt,
b0914d2e 352 AliHLTUInt32_t /*spec*/)
626bfcc1 353{
354 // see header file for class documentation
73449074 355
356 // raw data blocks to be fed into offline reconstruction
626bfcc1 357 if (dt==(kAliHLTDataTypeDDLRaw|kAliHLTDataOriginTPC)) {
358 if (!fRawDataHandler) {
359 fRawDataHandler=new AliHLTTPCAgent::AliHLTTPCRawDataHandler;
360 }
626bfcc1 361 return fRawDataHandler;
362 }
73449074 363
51e9ec2a 364 // dump for {'CLUSTERS':'TPC '}, stored in a file HLT.TPC.Clusters.root in HOMER format
365 if (dt==AliHLTTPCDefinitions::fgkClustersDataType) {
366 if (fClustersDataHandler==NULL)
367 fClustersDataHandler=new AliHLTOUTHandlerChain("chains=TPC-hltout-cluster-dump libHLTsim.so libAliHLTUtil.so");
368 return fClustersDataHandler;
369 }
370
73449074 371 // afterburner for {'TRAKSEGS':'TPC '} blocks to be converted to ESD format
372 // in a kChain HLTOUT handler
373 if (dt==AliHLTTPCDefinitions::fgkTrackSegmentsDataType) {
374 if (fTracksegsDataHandler==NULL)
375 fTracksegsDataHandler=new AliHLTOUTHandlerChain("chains=TPC-hltout-tracksegs-esd-converter");
376 return fTracksegsDataHandler;
377 }
378
379 // afterburner for {'TRACKS ':'TPC '} block to be converted to ESD format
380 // there is only one data block
381 if (dt==AliHLTTPCDefinitions::fgkTracksDataType) {
382 return new AliHLTOUTHandlerChain("chains=TPC-hltout-tracks-esd-converter");
383 }
384
626bfcc1 385 return NULL;
386}
387
388int AliHLTTPCAgent::DeleteOutputHandler(AliHLTOUTHandler* pInstance)
389{
390 // see header file for class documentation
391 if (pInstance==NULL) return -EINVAL;
392
393 if (pInstance==fRawDataHandler) {
73449074 394 delete fRawDataHandler;
395 fRawDataHandler=NULL;
396 }
397
398 if (pInstance==fTracksegsDataHandler) {
399 delete fTracksegsDataHandler;
400 fTracksegsDataHandler=NULL;
626bfcc1 401 }
51e9ec2a 402
403 if (pInstance==fClustersDataHandler) {
404 delete fClustersDataHandler;
405 fClustersDataHandler=NULL;
406 }
407
626bfcc1 408 return 0;
409}
410
411AliHLTTPCAgent::AliHLTTPCRawDataHandler::AliHLTTPCRawDataHandler()
412{
413 // see header file for class documentation
414}
415
416AliHLTTPCAgent::AliHLTTPCRawDataHandler::~AliHLTTPCRawDataHandler()
417{
418 // see header file for class documentation
419}
420
421int AliHLTTPCAgent::AliHLTTPCRawDataHandler::ProcessData(AliHLTOUT* pData)
422{
423 // see header file for class documentation
424 if (!pData) return -EINVAL;
425 AliHLTComponentDataType dt=kAliHLTVoidDataType;
426 AliHLTUInt32_t spec=kAliHLTVoidDataSpec;
427 int iResult=pData->GetDataBlockDescription(dt, spec);
428 if (iResult>=0) {
429 int slice=AliHLTTPCDefinitions::GetMinSliceNr(spec);
430 int part=AliHLTTPCDefinitions::GetMinPatchNr(spec);
431 if (slice==AliHLTTPCDefinitions::GetMaxSliceNr(spec) &&
432 part==AliHLTTPCDefinitions::GetMaxPatchNr(spec)) {
433 iResult=768;
434 if (part>1) iResult+=72+4*slice+(part-2);
435 else iResult+=2*slice+part;
436 } else {
437 HLTError("handler can not process merged data from multiple ddls:"
438 " min slice %d, max slice %d, min part %d, max part %d",
439 slice, AliHLTTPCDefinitions::GetMaxSliceNr(spec),
440 part, AliHLTTPCDefinitions::GetMaxPatchNr(spec));
441 iResult=-EBADMSG;
442 }
443 }
444 return iResult;
445}