]>
Commit | Line | Data |
---|---|---|
c1550d2c | 1 | // $Id: $ |
2 | /************************************************************************** | |
3 | * This file is property of and copyright by the ALICE HLT Project * | |
4 | * All rights reserved. * | |
5 | * * | |
6 | * Primary Authors: * | |
7 | * Artur Szostak <artursz@iafrica.com> * | |
8 | * * | |
9 | * Permission to use, copy, modify and distribute this software and its * | |
10 | * documentation strictly for non-commercial purposes is hereby granted * | |
11 | * without fee, provided that the above copyright notice appears in all * | |
12 | * copies and that both the copyright notice and this permission notice * | |
13 | * appear in the supporting documentation. The authors make no claims * | |
14 | * about the suitability of this software for any purpose. It is * | |
15 | * provided "as is" without express or implied warranty. * | |
16 | **************************************************************************/ | |
17 | ||
18 | /// @file AliHLTMuonSpectroTriggerComponent.cxx | |
19 | /// @author Artur Szostak <artursz@iafrica.com> | |
20 | /// @date 9 Nov 2009 | |
21 | /// @brief Implementation of the muon spectrometer trigger component. | |
22 | /// | |
23 | /// The AliHLTMuonSpectroTriggerComponent component is used to generate the HLT | |
24 | /// trigger for the muon spectrometer. | |
25 | ||
26 | #include "AliHLTMuonSpectroTriggerComponent.h" | |
27 | #include "AliHLTTriggerDecision.h" | |
28 | #include "AliHLTMuonSpectroScalars.h" | |
29 | #include "AliHLTMUONDataBlockReader.h" | |
30 | #include "AliHLTMUONConstants.h" | |
31 | #include "AliHLTMUONUtils.h" | |
32 | #include "AliMUONTriggerDDLDecoderEventHandler.h" | |
33 | ||
34 | ClassImp(AliHLTMuonSpectroTriggerComponent); | |
35 | ||
36 | ||
37 | AliHLTMuonSpectroTriggerComponent::AliHLTMuonSpectroTriggerComponent() : | |
38 | AliHLTTrigger(), | |
39 | fBufferSizeConst(1024*16), | |
40 | fBufferSizeMultiplier(1), | |
41 | fMakeStats(false), | |
42 | fTriggerHits(false), | |
43 | fTriggerTrigRecs(false), | |
44 | fTriggerTracks(true), | |
45 | fTriggerDimuons(true) | |
46 | { | |
47 | // Default constructor. | |
48 | } | |
49 | ||
50 | ||
51 | AliHLTMuonSpectroTriggerComponent::~AliHLTMuonSpectroTriggerComponent() | |
52 | { | |
53 | // Default destructor. | |
54 | } | |
55 | ||
56 | ||
57 | void AliHLTMuonSpectroTriggerComponent::GetInputDataTypes(AliHLTComponentDataTypeList& list) const | |
58 | { | |
59 | // Returns the list of input types expected. | |
60 | ||
61 | list.push_back(AliHLTMUONConstants::TriggerRecordsBlockDataType()); | |
62 | list.push_back(AliHLTMUONConstants::RecHitsBlockDataType()); | |
63 | list.push_back(AliHLTMUONConstants::MansoTracksBlockDataType()); | |
64 | list.push_back(AliHLTMUONConstants::SinglesDecisionBlockDataType()); | |
65 | list.push_back(AliHLTMUONConstants::PairsDecisionBlockDataType()); | |
66 | } | |
67 | ||
68 | ||
69 | void AliHLTMuonSpectroTriggerComponent::GetOutputDataTypes(AliHLTComponentDataTypeList& list) const | |
70 | { | |
71 | // Return the output data types generated. | |
72 | ||
73 | list.push_back(kAliHLTDataTypeTriggerDecision); | |
74 | list.push_back(kAliHLTDataTypeEventStatistics|kAliHLTDataOriginHLT); | |
75 | } | |
76 | ||
77 | ||
78 | void AliHLTMuonSpectroTriggerComponent::GetOutputDataSize(unsigned long& constBase, double& inputMultiplier) | |
79 | { | |
80 | // Returns the output data size estimate. | |
81 | ||
82 | constBase = fBufferSizeConst; | |
83 | inputMultiplier = fBufferSizeMultiplier; | |
84 | } | |
85 | ||
86 | ||
87 | AliHLTComponent* AliHLTMuonSpectroTriggerComponent::Spawn() | |
88 | { | |
89 | // Creates and returns a new instance. | |
90 | ||
91 | return new AliHLTMuonSpectroTriggerComponent; | |
92 | } | |
93 | ||
94 | ||
95 | Int_t AliHLTMuonSpectroTriggerComponent::DoInit(int argc, const char** argv) | |
96 | { | |
97 | // Initialise the component. | |
98 | ||
99 | fMakeStats = false; | |
100 | fTriggerHits = false; | |
101 | fTriggerTrigRecs = false; | |
102 | fTriggerTracks = false; | |
103 | fTriggerDimuons = false; | |
104 | ||
105 | for (int i = 0; i < argc; i++) | |
106 | { | |
107 | if (strcmp(argv[i], "-makestats") == 0) | |
108 | { | |
109 | fMakeStats = true; | |
110 | continue; | |
111 | } | |
112 | if (strcmp(argv[i], "-triggerhits") == 0) | |
113 | { | |
114 | fTriggerHits = true; | |
115 | continue; | |
116 | } | |
117 | if (strcmp(argv[i], "-triggertrigrecs") == 0) | |
118 | { | |
119 | fTriggerTrigRecs = true; | |
120 | continue; | |
121 | } | |
122 | if (strcmp(argv[i], "-triggertracks") == 0) | |
123 | { | |
124 | fTriggerTracks = true; | |
125 | continue; | |
126 | } | |
127 | if (strcmp(argv[i], "-triggerdimuons") == 0) | |
128 | { | |
129 | fTriggerDimuons = true; | |
130 | continue; | |
131 | } | |
132 | if (strcmp(argv[i], "-triggerany") == 0) | |
133 | { | |
134 | fTriggerHits = true; | |
135 | fTriggerTrigRecs = true; | |
136 | fTriggerTracks = true; | |
137 | fTriggerDimuons = true; | |
138 | continue; | |
139 | } | |
140 | ||
141 | HLTError("Unknown option '%s'.", argv[i]); | |
142 | return -EINVAL; | |
143 | } // for loop | |
144 | ||
145 | // If nothing was turned on to trigger then turn everything on by default. | |
146 | if (fTriggerHits == false and fTriggerTrigRecs == false | |
147 | and fTriggerTracks == false and fTriggerDimuons == false | |
148 | ) | |
149 | { | |
150 | fTriggerTracks = true; | |
151 | fTriggerDimuons = true; | |
152 | } | |
153 | ||
154 | return 0; | |
155 | } | |
156 | ||
157 | ||
158 | Int_t AliHLTMuonSpectroTriggerComponent::DoDeinit() | |
159 | { | |
160 | // Cleans up the component. | |
161 | ||
162 | return 0; | |
163 | } | |
164 | ||
165 | ||
166 | int AliHLTMuonSpectroTriggerComponent::DoTrigger() | |
167 | { | |
168 | // Applies the trigger for the HLT. | |
169 | ||
170 | int result = 0; | |
171 | ||
172 | bool gothits = false; | |
173 | bool gottrigrecs = false; | |
174 | bool gottracks = false; | |
175 | bool gotsingles = false; | |
176 | bool gotpairs = false; | |
177 | UInt_t nhits = 0; | |
178 | UInt_t nhitsMTR = 0; | |
179 | UInt_t nhitsMCH = 0; | |
180 | UInt_t nhitsCh[14] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; | |
181 | UInt_t ntrigrecs = 0; | |
182 | UInt_t nL0plus = 0; | |
183 | UInt_t nL0minus = 0; | |
184 | UInt_t ntracksMT = 0; // from Manso track blocks. | |
185 | UInt_t ntracksSD = 0; // from singles decision blocks | |
186 | UInt_t nplus = 0; | |
187 | UInt_t nminus = 0; | |
188 | UInt_t nlowpt = 0; | |
189 | UInt_t nhighpt = 0; | |
190 | Double_t minpt = -1; | |
191 | Double_t maxpt = -1; | |
192 | UInt_t nlikeany = 0; | |
193 | UInt_t nlikelow = 0; | |
194 | UInt_t nlikehigh = 0; | |
195 | UInt_t nunlikeany = 0; | |
196 | UInt_t nunlikelow = 0; | |
197 | UInt_t nunlikehigh = 0; | |
198 | UInt_t nlowmass = 0; | |
199 | UInt_t nhighmass = 0; | |
200 | Double_t minmass = -1; | |
201 | Double_t maxmass = -1; | |
202 | ||
203 | ||
204 | AliHLTComponentDataType blockType = AliHLTMUONConstants::TriggerRecordsBlockDataType(); | |
205 | for (const AliHLTComponentBlockData* block = GetFirstInputBlock(blockType); | |
206 | block != NULL; | |
207 | block = GetNextInputBlock() | |
208 | ) | |
209 | { | |
210 | AliHLTMUONTriggerRecordsBlockReader trigRecsBlock(block->fPtr, block->fSize); | |
211 | if (not IsBlockOk(trigRecsBlock, blockType)) | |
212 | { | |
213 | HLTWarning("Skipping problematic block '%s'", DataType2Text(blockType).c_str()); | |
214 | continue; | |
215 | } | |
216 | gothits = true; | |
217 | ||
218 | ntrigrecs += trigRecsBlock.Nentries(); | |
219 | for (AliHLTUInt32_t i = 0; i < trigRecsBlock.Nentries(); ++i) | |
220 | { | |
221 | AliHLTMUONParticleSign sign; | |
222 | bool hitset[4]; | |
223 | AliHLTMUONUtils::UnpackTriggerRecordFlags(trigRecsBlock[i].fFlags, sign, hitset); | |
224 | switch (sign) | |
225 | { | |
226 | case kSignPlus: ++nL0plus; break; | |
227 | case kSignMinus: ++nL0minus; break; | |
228 | default: break; | |
229 | } | |
230 | for (int j = 0; j < 4; ++j) | |
231 | { | |
232 | if (hitset[j]) | |
233 | { | |
234 | ++nhitsCh[j+10]; | |
235 | ++nhits; | |
236 | ++nhitsMTR; | |
237 | } | |
238 | } | |
239 | } | |
240 | } | |
241 | ||
242 | blockType = AliHLTMUONConstants::RecHitsBlockDataType(); | |
243 | for (const AliHLTComponentBlockData* block = GetFirstInputBlock(blockType); | |
244 | block != NULL; | |
245 | block = GetNextInputBlock() | |
246 | ) | |
247 | { | |
248 | AliHLTMUONRecHitsBlockReader hitsBlock(block->fPtr, block->fSize); | |
249 | if (not IsBlockOk(hitsBlock, blockType)) | |
250 | { | |
251 | HLTWarning("Skipping problematic block '%s'", DataType2Text(blockType).c_str()); | |
252 | continue; | |
253 | } | |
254 | gottrigrecs = true; | |
255 | ||
256 | nhits += hitsBlock.Nentries(); | |
257 | nhitsMCH += hitsBlock.Nentries(); | |
258 | for (AliHLTUInt32_t i = 0; i < hitsBlock.Nentries(); ++i) | |
259 | { | |
260 | AliHLTUInt8_t chamber; | |
261 | AliHLTUInt16_t detElemId; | |
262 | AliHLTMUONUtils::UnpackRecHitFlags(hitsBlock[i].fFlags, chamber, detElemId); | |
263 | if (chamber < 10) | |
264 | { | |
265 | ++nhitsCh[chamber]; | |
266 | } | |
267 | else | |
268 | { | |
269 | HLTWarning("Received a reconstructed hit which indicates" | |
270 | " an invalid chamber number of %d. The expected" | |
271 | " range is [0..9]. The data blockis probably corrupt.", | |
272 | int(chamber) | |
273 | ); | |
274 | } | |
275 | } | |
276 | } | |
277 | ||
278 | blockType = AliHLTMUONConstants::MansoTracksBlockDataType(); | |
279 | for (const AliHLTComponentBlockData* block = GetFirstInputBlock(blockType); | |
280 | block != NULL; | |
281 | block = GetNextInputBlock() | |
282 | ) | |
283 | { | |
284 | AliHLTMUONMansoTracksBlockReader tracksBlock(block->fPtr, block->fSize); | |
285 | if (not IsBlockOk(tracksBlock, blockType)) | |
286 | { | |
287 | HLTWarning("Skipping problematic block '%s'", DataType2Text(blockType).c_str()); | |
288 | continue; | |
289 | } | |
290 | gottracks = true; | |
291 | ||
292 | ntracksMT += tracksBlock.Nentries(); | |
293 | for (AliHLTUInt32_t i = 0; i < tracksBlock.Nentries(); ++i) | |
294 | { | |
295 | AliHLTMUONParticleSign sign; | |
296 | bool hitset[4]; | |
297 | AliHLTMUONUtils::UnpackMansoTrackFlags(tracksBlock[i].fFlags, sign, hitset); | |
298 | switch (sign) | |
299 | { | |
300 | case kSignPlus: ++nplus; break; | |
301 | case kSignMinus: ++nminus; break; | |
302 | default: break; | |
303 | } | |
304 | } | |
305 | } | |
306 | ||
307 | blockType = AliHLTMUONConstants::SinglesDecisionBlockDataType(); | |
308 | for (const AliHLTComponentBlockData* block = GetFirstInputBlock(blockType); | |
309 | block != NULL; | |
310 | block = GetNextInputBlock() | |
311 | ) | |
312 | { | |
313 | AliHLTMUONSinglesDecisionBlockReader singlesBlock(block->fPtr, block->fSize); | |
314 | if (not IsBlockOk(singlesBlock, blockType)) | |
315 | { | |
316 | HLTWarning("Skipping problematic block '%s'", DataType2Text(blockType).c_str()); | |
317 | continue; | |
318 | } | |
319 | gotsingles = true; | |
320 | ||
321 | ntracksSD += singlesBlock.Nentries(); | |
322 | nlowpt += singlesBlock.BlockHeader().fNlowPt; | |
323 | nhighpt += singlesBlock.BlockHeader().fNhighPt; | |
324 | for (AliHLTUInt32_t i = 0; i < singlesBlock.Nentries(); ++i) | |
325 | { | |
326 | if (singlesBlock[i].fPt < minpt or minpt == -1) minpt = singlesBlock[i].fPt; | |
327 | if (singlesBlock[i].fPt > maxpt or maxpt == -1) maxpt = singlesBlock[i].fPt; | |
328 | } | |
329 | } | |
330 | ||
331 | blockType = AliHLTMUONConstants::PairsDecisionBlockDataType(); | |
332 | for (const AliHLTComponentBlockData* block = GetFirstInputBlock(blockType); | |
333 | block != NULL; | |
334 | block = GetNextInputBlock() | |
335 | ) | |
336 | { | |
337 | AliHLTMUONPairsDecisionBlockReader pairsBlock(block->fPtr, block->fSize); | |
338 | if (not IsBlockOk(pairsBlock, blockType)) | |
339 | { | |
340 | HLTWarning("Skipping problematic block '%s'", DataType2Text(blockType).c_str()); | |
341 | continue; | |
342 | } | |
343 | gotpairs = true; | |
344 | ||
345 | nunlikeany += pairsBlock.BlockHeader().fNunlikeAnyPt; | |
346 | nlikeany += pairsBlock.BlockHeader().fNlikeAnyPt; | |
347 | // Dont use the other scalars from the pair decisions block header because | |
348 | // they are much more restrictive. They count pairs where both tracks pass | |
349 | // the low or high pT cut. But we want to relax this to just one track needs | |
350 | // to pass the pT cut. | |
351 | for (AliHLTUInt32_t i = 0; i < pairsBlock.Nentries(); ++i) | |
352 | { | |
353 | if (pairsBlock[i].fInvMass < minmass or minmass == -1) minmass = pairsBlock[i].fInvMass; | |
354 | if (pairsBlock[i].fInvMass > maxmass or maxmass == -1) maxmass = pairsBlock[i].fInvMass; | |
355 | bool highMass, lowMass, unlike; | |
356 | AliHLTUInt8_t highPtCount, lowPtCount; | |
357 | AliHLTMUONUtils::UnpackPairDecisionBits( | |
358 | pairsBlock[i].fTriggerBits, highMass, lowMass, unlike, | |
359 | highPtCount, lowPtCount | |
360 | ); | |
361 | if (unlike) | |
362 | { | |
363 | if (lowPtCount >= 1) ++nunlikelow; | |
364 | if (highPtCount >= 1) ++nunlikehigh; | |
365 | if (lowMass) ++nlowmass; | |
366 | if (highMass) ++nhighmass; | |
367 | } | |
368 | else | |
369 | { | |
370 | if (lowPtCount >= 1) ++nlikelow; | |
371 | if (highPtCount >= 1) ++nlikehigh; | |
372 | } | |
373 | } | |
374 | } | |
375 | ||
376 | // Select the largest value for nTracks since we might only get this information | |
377 | // from singles decision blocks. | |
378 | UInt_t ntracks = ntracksSD > ntracksMT ? ntracksSD : ntracksMT; | |
379 | ||
380 | bool triggeredOnHits = fTriggerHits and nhitsMCH > 0; | |
381 | bool triggeredOnTrigRecs = fTriggerTrigRecs and ntrigrecs > 0; | |
382 | bool triggeredOnTracks = fTriggerTracks and ntracks > 0; | |
383 | bool triggeredOnDimuons = fTriggerDimuons and (nunlikeany > 0 | |
384 | or nunlikelow > 0 or nunlikehigh > 0 or nlowmass > 0 or nhighmass > 0); | |
385 | ||
386 | if (triggeredOnDimuons) | |
387 | { | |
388 | SetDescription("Dimuon in muon spectrometer"); | |
389 | SetTriggerDomain(AliHLTTriggerDomain("*******:MUON")); | |
390 | } | |
391 | else if (triggeredOnTracks) | |
392 | { | |
393 | SetDescription("Tracks in muon spectrometer"); | |
394 | SetTriggerDomain(AliHLTTriggerDomain("*******:MUON")); | |
395 | } | |
396 | else if (triggeredOnTrigRecs) | |
397 | { | |
398 | SetDescription("Muon trigger chambers triggered"); | |
399 | if (triggeredOnHits) | |
400 | { | |
401 | SetReadoutList(AliHLTReadoutList(AliHLTReadoutList::kMUONTRG | AliHLTReadoutList::kMUONTRK)); | |
402 | SetTriggerDomain(AliHLTTriggerDomain("TRIGRECS:MUON,RECHITS :MUON")); | |
403 | } | |
404 | else | |
405 | { | |
406 | SetReadoutList(AliHLTReadoutList(AliHLTReadoutList::kMUONTRG)); | |
407 | SetTriggerDomain(AliHLTTriggerDomain("TRIGRECS:MUON")); | |
408 | } | |
409 | } | |
410 | else if (triggeredOnHits) | |
411 | { | |
412 | SetDescription("Hits in muon tracking chambers"); | |
413 | SetReadoutList(AliHLTReadoutList(AliHLTReadoutList::kMUONTRK)); | |
414 | SetTriggerDomain(AliHLTTriggerDomain("RECHITS :MUON")); | |
415 | } | |
416 | else | |
417 | { | |
418 | SetDescription("Not triggered"); | |
419 | SetTriggerDomain(AliHLTTriggerDomain()); | |
420 | } | |
421 | ||
422 | if (triggeredOnDimuons or triggeredOnTracks or triggeredOnTrigRecs or triggeredOnHits) | |
423 | { | |
424 | result = TriggerEvent(); | |
425 | if (result == -ENOSPC) goto increaseBuffer; | |
426 | if (result != 0) return result; | |
427 | } | |
428 | ||
429 | if (fMakeStats) | |
430 | { | |
431 | AliHLTMuonSpectroScalars scalars; | |
432 | if (gothits and gottrigrecs) scalars.Add("NHits", "Total number of hits", nhits); | |
433 | if (gottrigrecs) scalars.Add("NHitsMTR", "Number of hits in trigger chambers", nhitsMTR); | |
434 | if (gothits) | |
435 | { | |
436 | scalars.Add("NHitsMCH", "Number of hits in tracking chambers", nhitsMCH); | |
437 | for (int i = 0; i < 10; i++) | |
438 | { | |
439 | scalars.Add(Form("NHitsCh%d", i+1), Form("Number of hits in chamber %d", i+1), nhitsCh[i]); | |
440 | } | |
441 | } | |
442 | if (gottrigrecs) | |
443 | { | |
444 | for (int i = 10; i < 14; i++) | |
445 | { | |
446 | scalars.Add(Form("NHitsCh%d", i+1), Form("Number of hits in chamber %d", i+1), nhitsCh[i]); | |
447 | } | |
448 | scalars.Add("NTrigRecs", "Total number of trigger records", ntrigrecs); | |
449 | scalars.Add("NL0+", "Number of positive sign tracks in L0", nL0plus); | |
450 | scalars.Add("NL0-", "Number of negative sign tracks in L0", nL0minus); | |
451 | } | |
452 | if (gottracks or gotsingles) scalars.Add("NTracks", "Total number of tracks", ntracks); | |
453 | if (gottracks) | |
454 | { | |
455 | scalars.Add("N+", "Number of positive sign tracks", nplus); | |
456 | scalars.Add("N-", "Number of negative sign tracks", nminus); | |
457 | } | |
458 | if (gotsingles) | |
459 | { | |
460 | scalars.Add("NLowPt", "Number of low pT tracks", nlowpt); | |
461 | scalars.Add("NHighPt", "Number of high pT tracks", nhighpt); | |
462 | scalars.Add("MinPt", "Minimum pT found (GeV/c)", minpt); | |
463 | scalars.Add("MaxPt", "Maximum pT found (GeV/c)", maxpt); | |
464 | } | |
465 | if (gotpairs) | |
466 | { | |
467 | scalars.Add("NLikeAny", "Number of like sign track pairs", nlikeany); | |
468 | scalars.Add("NLikeLow", "Number of like sign pairs with at least 1 low pT track.", nlikelow); | |
469 | scalars.Add("NLikeHigh", "Number of like sign pairs with at least 1 high pT track.", nlikehigh); | |
470 | scalars.Add("NUnlikeAny", "Number of unlike sign track pairs", nunlikeany); | |
471 | scalars.Add("NUnlikeLow", "Number of unlike sign pairs with at least 1 low pT track.", nunlikelow); | |
472 | scalars.Add("NUnlikeHigh", "Number of unlike sign pairs with at least 1 high pT track.", nunlikehigh); | |
473 | scalars.Add("NLowMass", "Number of low mass dimuons", nlowmass); | |
474 | scalars.Add("NHighMass", "Number of high mass dimuons", nhighmass); | |
475 | scalars.Add("MinMass", "Minimum invariant mass found for dimuon (GeV/c^2)", minmass); | |
476 | scalars.Add("MaxMass", "Maximum invariant mass found for dimuon (GeV/c^2)", maxmass); | |
477 | } | |
478 | ||
479 | result = PushBack(&scalars, kAliHLTDataTypeEventStatistics|kAliHLTDataOriginHLT); | |
480 | if (result == -ENOSPC) goto increaseBuffer; | |
481 | } | |
482 | return result; | |
483 | ||
484 | increaseBuffer: | |
485 | // Increase the estimated buffer space required since the PushBack | |
486 | // or TriggerEvent methods indicate that they ran out of buffer space. | |
487 | fBufferSizeConst += 1024*1024; | |
488 | fBufferSizeMultiplier *= 2.; | |
489 | return -ENOSPC; | |
490 | } | |
491 | ||
492 | ||
493 | template <typename BlockReader> | |
494 | bool AliHLTMuonSpectroTriggerComponent::IsBlockOk( | |
495 | const BlockReader& reader, const AliHLTComponentDataType& type | |
496 | ) const | |
497 | { | |
498 | // Method for checking the block structure. | |
499 | ||
500 | if (not reader.BufferSizeOk()) | |
501 | { | |
502 | string name = DataType2Text(type).c_str(); | |
503 | size_t headerSize = sizeof(typename BlockReader::HeaderType); | |
504 | if (reader.BufferSize() < headerSize) | |
505 | { | |
506 | HLTError("Received a '%s' data block with a size of %d bytes," | |
507 | " which is smaller than the minimum valid size of %d bytes." | |
508 | " The block must be corrupt.", | |
509 | name.c_str(), reader.BufferSize(), headerSize | |
510 | ); | |
511 | } | |
512 | ||
513 | size_t expectedWidth = sizeof(typename BlockReader::ElementType); | |
514 | if (reader.CommonBlockHeader().fRecordWidth != expectedWidth) | |
515 | { | |
516 | HLTError("Received a '%s' data block with a record" | |
517 | " width of %d bytes, but the expected value is %d bytes." | |
518 | " The block might be corrupt.", | |
519 | name.c_str(), | |
520 | reader.CommonBlockHeader().fRecordWidth, | |
521 | expectedWidth | |
522 | ); | |
523 | } | |
524 | ||
525 | HLTError("Received a '%s' data block with a size of %d bytes," | |
526 | " but the block header claims the block should be %d bytes." | |
527 | " The block might be corrupt.", | |
528 | name.c_str(), reader.BufferSize(), reader.BytesUsed() | |
529 | ); | |
530 | return false; | |
531 | } | |
532 | return true; | |
533 | } |