1 /**************************************************************************
2 * This file is property of and copyright by the ALICE HLT Project *
3 * All rights reserved. *
6 * Artur Szostak <artursz@iafrica.com> *
8 * Permission to use, copy, modify and distribute this software and its *
9 * documentation strictly for non-commercial purposes is hereby granted *
10 * without fee, provided that the above copyright notice appears in all *
11 * copies and that both the copyright notice and this permission notice *
12 * appear in the supporting documentation. The authors make no claims *
13 * about the suitability of this software for any purpose. It is *
14 * provided "as is" without express or implied warranty. *
15 **************************************************************************/
20 /// @file AliHLTMUONProcessor.cxx
21 /// @author Artur Szostak <artursz@iafrica.com>
23 /// @brief Implementation of the abstract base dHLT processor component.
25 /// This component is the abstract base class of dHLT specific components.
26 /// It implements some common methods used by all the dHLT components.
29 #include "AliHLTMUONProcessor.h"
30 #include "AliHLTMUONConstants.h"
31 #include "AliHLTMisc.h"
32 #include "AliMUONRecoParam.h"
33 #include "AliCDBManager.h"
34 #include "AliCDBStorage.h"
35 #include "AliCDBEntry.h"
36 #include "AliGRPManager.h"
37 #include "AliGRPObject.h"
40 #include "AliMpDDLStore.h"
41 #include "AliMpDEStore.h"
42 #include "TGeoGlobalMagField.h"
44 #include "TObjString.h"
51 ClassImp(AliHLTMUONProcessor)
54 AliHLTMUONProcessor::AliHLTMUONProcessor() :
56 fWarnForUnexpecedBlock(false),
58 fDumpDataOnError(false),
61 /// Default constructor.
65 int AliHLTMUONProcessor::DoInit(int argc, const char** argv)
67 /// Parses common dHLT component arguments.
69 // Set the default values for various arguments comming from the command line.
71 fDumpDataOnError = false;
73 const char* cdbPath = NULL;
76 for (int i = 0; i < argc; i++)
78 // Ignore the argument if the child class indicates to do so.
79 if (IgnoreArgument(argv[i])) continue;
81 if (strcmp(argv[i], "-cdbpath") == 0)
85 HLTWarning("CDB path was already specified. Will"
86 " replace previous value given by -cdbpath."
91 HLTError("The CDB path was not specified." );
99 if (strcmp(argv[i], "-run") == 0)
103 HLTWarning("Run number was already specified. Will"
104 " replace previous value given by -run."
109 HLTError("The run number was not specified.");
114 run = Int_t( strtol(argv[i+1], &cpErr, 0) );
115 if (cpErr == NULL or *cpErr != '\0' or run < 0)
117 HLTError("Cannot convert '%s' to a valid run number."
118 " Expected a positive integer value.", argv[i+1]
127 if (strcmp(argv[i], "-delaysetup") == 0)
133 if (strcmp(argv[i], "-dumponerror") == 0)
135 fDumpDataOnError = true;
139 if (strcmp(argv[i], "-dumppath") == 0)
141 if (fDumpPath != NULL)
143 HLTWarning("The dump path was already specified. Will"
144 " replace previous value given by -dumppath."
149 HLTError("The dump path was not specified.");
152 fDumpPath = argv[i+1];
158 if (cdbPath != NULL or run != -1)
160 int result = SetCDBPathAndRunNo(cdbPath, run);
163 // Error messages already generated in SetCDBPathAndRunNo.
172 bool AliHLTMUONProcessor::ArgumentAlreadyHandled(int& i, const char* argi) const
174 /// This method can be used by the derivind child class to check if a particular
175 /// argument in argv was already processed.
177 if (strcmp(argi, "-cdbpath") == 0)
179 if (IgnoreArgument(argi)) return false;
180 i++; // argument takes one parameter
184 if (strcmp(argi, "-run") == 0)
186 if (IgnoreArgument(argi)) return false;
187 i++; // argument takes one parameter
191 if (strcmp(argi, "-delaysetup") == 0)
193 if (IgnoreArgument(argi)) return false;
197 if (strcmp(argi, "-dumponerror") == 0)
199 if (IgnoreArgument(argi)) return false;
203 if (strcmp(argi, "-dumppath") == 0)
205 if (IgnoreArgument(argi)) return false;
206 i++; // argument takes one parameter
214 int AliHLTMUONProcessor::SetCDBPathAndRunNo(
215 const char* cdbPath, Int_t run, bool useDefault
218 /// Sets the CDB path and run number to read from.
219 /// \param cdbPath The CDB path to use. If set to NULL and the path has
220 /// not been set in the CDB manager then the default path
221 /// "local://$ALICE_ROOT/OCDB" is used if the 'useDefault' flag is also true.
222 /// \param run The run number to use. If set to -1 and the run number has
223 /// not been set in the CDB manager then a value of zero is used if
224 /// the 'useDefault' flag is also true.
225 /// \param useDefault If set to true then a default CDB path and/or run number
226 /// is used if they have not been set and 'cdbPath' == NULL or
228 /// \return Zero if the object could be loaded. Otherwise an error code,
229 /// compatible with the HLT framework, is returned.
231 const char* defaultPath = "local://$ALICE_ROOT/OCDB";
232 Int_t defaultRun = 0;
234 AliCDBManager* cdbManager = AliCDBManager::Instance();
235 if (cdbManager == NULL)
237 HLTError("CDB manager instance does not exist.");
241 // Setup the CDB path.
244 cdbManager->SetDefaultStorage(cdbPath);
246 else if (not cdbManager->IsDefaultStorageSet() and useDefault)
248 cdbManager->SetDefaultStorage(defaultPath);
251 // Now setup the run number.
254 cdbManager->SetRun(run);
258 if (useDefault) cdbManager->SetRun(defaultRun);
265 int AliHLTMUONProcessor::FetchMappingStores() const
267 /// Fetches the DDL and detector element store objects for MUON mapping.
268 /// \return Zero if the objects could be loaded. Otherwise an error code,
269 /// which is compatible with the HLT framework, is returned.
270 /// \note AliMpDDLStore::Instance() and AliMpDEStore::Instance() must be used
271 /// to fetch the objects after this method returns a code equal to zero.
273 Bool_t warn = kFALSE;
275 // Check if the objects are already loaded. If they are then exit early,
276 // otherwise we need to try load the objects.
277 if (AliMpDDLStore::Instance(warn) != NULL and AliMpDEStore::Instance(warn) != NULL)
280 AliCDBManager* cdbManager = AliCDBManager::Instance();
281 if (cdbManager == NULL)
283 HLTError("CDB manager instance does not exist.");
287 const char* cdbPathUsed = "unknown (not set)";
288 AliCDBStorage* store = cdbManager->GetDefaultStorage();
289 if (store != NULL) cdbPathUsed = store->GetURI().Data();
291 Int_t runUsed = cdbManager->GetRun();
293 // Now we can try load the DDL and DE store objects.
294 if (AliHLTMisc::Instance().LoadOCDBEntry("MUON/Calib/MappingData", runUsed) == NULL)
296 HLTError("Could not find entry in CDB path '%s/MUON/Calib/MappingData' and run no. %d.",
301 if (AliHLTMisc::Instance().LoadOCDBEntry("MUON/Calib/Gains", runUsed) == NULL)
303 HLTError("Could not find entry in CDB path '%s/MUON/Calib/Gains' and run no. %d.",
308 if (AliHLTMisc::Instance().LoadOCDBEntry("MUON/Calib/Pedestals", runUsed) == NULL)
310 HLTError("Could not find entry in CDB path '%s/MUON/Calib/Pedestals' and run no. %d.",
315 if (not AliMpCDB::LoadDDLStore(warn))
317 HLTError("Failed to load DDL or detector element store specified"
318 " for CDB path '%s' and run no. %d.",
324 if (AliMpDDLStore::Instance(warn) == NULL or AliMpDEStore::Instance(warn) == NULL)
326 HLTError("Could not find or load the DDL or detector element store instance.");
334 int AliHLTMUONProcessor::FetchTMapFromCDB(const char* pathToEntry, TMap*& map) const
336 /// Fetches a TMap object from the CDB.
337 /// \param [in] pathToEntry The relative path to the entry in the CDB to fetch.
338 /// \param [out] map This will be filled with the TMap object found if
339 /// a successful status code is returned. Otherwise it will be unchanged.
340 /// \return Zero if the object could be found. Otherwise an error code,
341 /// which is compatible with the HLT framework, is returned.
343 TObject* obj = LoadAndExtractOCDBObject(pathToEntry);
346 HLTError("Configuration object for \"%s\" is missing.", pathToEntry);
350 if (obj->IsA() != TMap::Class())
352 HLTError("Wrong type for configuration object in \"%s\". Found a %s but we need a TMap.",
353 pathToEntry, obj->ClassName()
357 map = static_cast<TMap*>(obj);
363 int AliHLTMUONProcessor::GetValueFromTMap(
364 TMap* map, const char* paramName, TString& value,
365 const char* pathToEntry, const char* prettyName
368 /// Tries to find the string value associated with a certain parameter in a TMap.
369 /// \param [in] map The TMap object to search in.
370 /// \param [in] paramName The name of the parameter to search for.
371 /// \param [out] value Will be filled with the object found.
372 /// \param [in] pathToEntry The relative path to the entry in the CDB.
373 /// Used when printing error messages. If set to NULL then a string of
374 /// "(unknown)" is used. (default is NULL).
375 /// \param [in] prettyName Should be the name of the parameter which will
376 /// be used when printing error messages. If this is set to NULL then
377 /// the paramName will be used instead (default is NULL).
378 /// \return Zero if the object could be found. Otherwise an error code,
379 /// which is compatible with the HLT framework, is returned.
381 if (pathToEntry == NULL) pathToEntry = "(unknown)";
382 if (prettyName == NULL) prettyName = paramName;
384 TPair* pair = static_cast<TPair*>(map->FindObject(paramName));
387 HLTError("Configuration object for \"%s\" does not contain the %s value.",
388 pathToEntry, prettyName
392 TObject* valueObj = pair->Value();
393 if (valueObj->IsA() != TObjString::Class())
395 HLTError("The %s parameter found in configuration object \"%s\""
396 " is not a TObjString. Found an object of type %s instead.",
397 prettyName, pathToEntry, valueObj->ClassName()
401 value = static_cast<TObjString*>(valueObj)->GetString();
407 int AliHLTMUONProcessor::GetIntFromTMap(
408 TMap* map, const char* paramName, Int_t& value,
409 const char* pathToEntry, const char* prettyName
412 /// Tries to find a certain parameter in the TMap object and convert it to
413 /// an integer value.
414 /// \param [in] map The TMap object to search in.
415 /// \param [in] paramName The name of the parameter to search for.
416 /// \param [out] value Will be filled with the integer value for the parameter,
417 /// if it was found and it was an integer value.
418 /// \param [in] pathToEntry The relative path to the entry in the CDB.
419 /// Used when printing error messages. If set to NULL then a string of
420 /// "(unknown)" is used. (default is NULL).
421 /// \param [in] prettyName Should be the name of the parameter which will
422 /// be used when printing error messages. If this is set to NULL then
423 /// the paramName will be used instead (default is NULL).
424 /// \return Zero if the object could be found and is valid. Otherwise an
425 /// error code, which is compatible with the HLT framework, is returned.
427 if (pathToEntry == NULL) pathToEntry = "(unknown)";
428 if (prettyName == NULL) prettyName = paramName;
431 int result = GetValueFromTMap(map, paramName, valueStr, pathToEntry, prettyName);
432 if (result != 0) return result;
434 if (not valueStr.IsDigit())
436 HLTError("The %s parameter found in configuration object \"%s\""
437 "is not a valid integer number string; found \"%s\".",
438 prettyName, pathToEntry, valueStr.Data()
442 value = valueStr.Atoi();
448 int AliHLTMUONProcessor::GetPositiveIntFromTMap(
449 TMap* map, const char* paramName, Int_t& value,
450 const char* pathToEntry, const char* prettyName
453 /// Tries to find a certain parameter in the TMap object and convert it to
454 /// a positive integer value.
455 /// \param [in] map The TMap object to search in.
456 /// \param [in] paramName The name of the parameter to search for.
457 /// \param [out] value Will be filled with the integer value for the parameter,
458 /// if it was found and it was a positive integer value.
459 /// \param [in] pathToEntry The relative path to the entry in the CDB.
460 /// Used when printing error messages. If set to NULL then a string of
461 /// "(unknown)" is used. (default is NULL).
462 /// \param [in] prettyName Should be the name of the parameter which will
463 /// be used when printing error messages. If this is set to NULL then
464 /// the paramName will be used instead (default is NULL).
465 /// \return Zero if the object could be found and is valid. Otherwise an
466 /// error code, which is compatible with the HLT framework, is returned.
468 if (pathToEntry == NULL) pathToEntry = "(unknown)";
469 if (prettyName == NULL) prettyName = paramName;
472 int result = GetValueFromTMap(map, paramName, valueStr, pathToEntry, prettyName);
473 if (result != 0) return result;
475 if (not valueStr.IsDigit())
477 HLTError("The %s parameter found in configuration object \"%s\""
478 "is not a valid integer number string; found \"%s\".",
479 prettyName, pathToEntry, valueStr.Data()
483 Int_t val = valueStr.Atoi();
486 HLTError("The %s parameter found in configuration object \"%s\""
487 "is not a positive integer number; found \"%d\".",
488 prettyName, pathToEntry, val
498 int AliHLTMUONProcessor::GetFloatFromTMap(
499 TMap* map, const char* paramName, Double_t& value,
500 const char* pathToEntry, const char* prettyName
503 /// Tries to find a certain parameter in the TMap object and convert it to
504 /// an floating point value.
505 /// \param [in] map The TMap object to search in.
506 /// \param [in] paramName The name of the parameter to search for.
507 /// \param [out] value Will be filled with the floating point value for the
508 /// parameter, if it was found and it was a floating point value.
509 /// \param [in] pathToEntry The relative path to the entry in the CDB.
510 /// Used when printing error messages. If set to NULL then a string of
511 /// "(unknown)" is used. (default is NULL).
512 /// \param [in] prettyName Should be the name of the parameter which will
513 /// be used when printing error messages. If this is set to NULL then
514 /// the paramName will be used instead (default is NULL).
515 /// \return Zero if the object could be found and is valid. Otherwise an
516 /// error code, which is compatible with the HLT framework, is returned.
518 if (pathToEntry == NULL) pathToEntry = "(unknown)";
519 if (prettyName == NULL) prettyName = paramName;
522 int result = GetValueFromTMap(map, paramName, valueStr, pathToEntry, prettyName);
523 if (result != 0) return result;
525 if (not valueStr.IsFloat())
527 HLTError("The %s parameter found in configuration object \"%s\""
528 "is not a valid floating point number string; found \"%s\".",
529 prettyName, pathToEntry, valueStr.Data()
533 value = valueStr.Atof();
539 int AliHLTMUONProcessor::GetPositiveFloatFromTMap(
540 TMap* map, const char* paramName, Double_t& value,
541 const char* pathToEntry, const char* prettyName
544 /// Tries to find a certain parameter in the TMap object and convert it to
545 /// an positive floating point value.
546 /// \param [in] map The TMap object to search in.
547 /// \param [in] paramName The name of the parameter to search for.
548 /// \param [out] value Will be filled with the floating point value for the
549 /// parameter, if it was found and it was a positive floating point value.
550 /// \param [in] pathToEntry The relative path to the entry in the CDB.
551 /// Used when printing error messages. If set to NULL then a string of
552 /// "(unknown)" is used. (default is NULL).
553 /// \param [in] prettyName Should be the name of the parameter which will
554 /// be used when printing error messages. If this is set to NULL then
555 /// the paramName will be used instead (default is NULL).
556 /// \return Zero if the object could be found and is valid. Otherwise an
557 /// error code, which is compatible with the HLT framework, is returned.
559 if (pathToEntry == NULL) pathToEntry = "(unknown)";
560 if (prettyName == NULL) prettyName = paramName;
563 int result = GetValueFromTMap(map, paramName, valueStr, pathToEntry, prettyName);
564 if (result != 0) return result;
566 if (not valueStr.IsFloat())
568 HLTError("The %s parameter found in configuration object \"%s\""
569 "is not a valid floating point number string; found \"%s\".",
570 prettyName, pathToEntry, valueStr.Data()
574 Double_t val = valueStr.Atof();
577 HLTError("The %s parameter found in configuration object \"%s\""
578 "is not a positive floating point number; found \"%d\".",
579 prettyName, pathToEntry, val
589 int AliHLTMUONProcessor::FetchFieldIntegral(Double_t& bfieldintegral) const
591 // Fetches the correct dipole magnetic field integral to use.
593 Float_t currentL3 = 0;
594 Float_t currentDip = 0;
596 if (TGeoGlobalMagField::Instance() == NULL or
597 (TGeoGlobalMagField::Instance() != NULL and TGeoGlobalMagField::Instance()->GetField() == NULL)
600 HLTWarning("The magnetic field has not been set in TGeoGlobalMagField."
601 " Will try and load the GRP entry directly."
604 AliGRPManager grpman;
605 if (not grpman.ReadGRPEntry() or grpman.GetGRPData() == NULL)
607 HLTError("GRP entry could not be loaded.");
611 const AliGRPObject* grp = grpman.GetGRPData();
612 Char_t polarityL3 = grp->GetL3Polarity();
613 Char_t polarityDip = grp->GetDipolePolarity();
614 currentL3 = grp->GetL3Current(AliGRPObject::kMean);
615 currentDip = grp->GetDipoleCurrent(AliGRPObject::kMean);
616 if (polarityL3 == AliGRPObject::GetInvalidChar())
618 HLTError("L3 polarity in GRP is invalid.");
621 if (polarityDip == AliGRPObject::GetInvalidChar())
623 HLTError("Dipole polarity in GRP is invalid.");
626 if (currentL3 == AliGRPObject::GetInvalidFloat())
628 HLTError("L3 current in GRP is invalid.");
631 if (currentDip == AliGRPObject::GetInvalidFloat())
633 HLTError("Dipole current in GRP is invalid.");
636 if (grp->IsPolarityConventionLHC())
638 currentL3 *= (polarityL3 ? -1:1);
639 currentDip *= (polarityDip ? -1:1);
643 currentL3 *= (polarityL3 ? -1:1);
644 currentDip *= (polarityDip ? 1:-1);
649 TVirtualMagField* vfield = TGeoGlobalMagField::Instance()->GetField();
650 AliMagF* field = dynamic_cast<AliMagF*>(vfield);
651 if (vfield->IsA() != AliMagF::Class() or field == NULL)
654 "The magnetic field is not of type AliMagF."
655 " Do not know how to handle class of type '%s'.",
660 currentL3 = field->GetCurrentSol();
661 currentDip = field->GetCurrentDip();
664 const char* path = AliHLTMUONConstants::FieldIntegralsCDBPath();
666 int result = FetchTMapFromCDB(path, map);
667 if (result != 0) return result;
668 const char* paramName = Form("L3_current=%0.2e;Dipole_current=%0.2e", currentL3, currentDip);
670 result = GetFloatFromTMap(map, paramName, value, path);
671 if (result != 0) return result;
672 bfieldintegral = value;
677 int AliHLTMUONProcessor::LoadRecoParamsFromCDB(AliMUONRecoParam*& params) const
679 /// Fetches the reconstruction parameters object from the CDB for MUON.
680 /// \param [out] params This will be filled with the reconstruction
681 /// parameters object found if a successful status code is returned.
682 /// Otherwise it will be unchanged.
683 /// \return Zero if the object could be found. Otherwise an error code,
684 /// which is compatible with the HLT framework, is returned.
686 const char* pathToEntry = "MUON/Calib/RecoParam";
687 TObject* obj = LoadAndExtractOCDBObject(pathToEntry);
690 HLTError("Reconstruction parameters object for \"%s\" is missing.", pathToEntry);
694 TObjArray* objarr = dynamic_cast<TObjArray*>(obj);
697 obj = objarr->Last();
700 AliMUONRecoParam* par = dynamic_cast<AliMUONRecoParam*>(obj);
703 HLTError("No AliMUONRecoParam class found for entry \"%s\". Found a %s class instead.",
704 pathToEntry, obj->ClassName()
714 void AliHLTMUONProcessor::DumpBuffer(
715 const void* buffer, AliHLTUInt32_t size, const char* filename
718 /// Dumps the data contained in a buffer to file as is.
722 fstream file(filename, fstream::out | fstream::trunc | fstream::binary);
725 file.write(reinterpret_cast<const char*>(buffer), size);
728 HLTError("Could not write data block to file %s during"
729 " dumping operation!",
736 HLTError("Could not open file %s for dumping data block!", filename);
741 void AliHLTMUONProcessor::DumpBlock(
742 const AliHLTComponentBlockData* block, const char* fileNamePrefix
745 /// Dumps the data block and meta information to file.
747 std::string filename = fDumpPath;
748 filename += fileNamePrefix;
749 filename += "-blockmeta.bin";
750 DumpBuffer(block, sizeof(AliHLTComponentBlockData), filename.c_str());
751 filename = fDumpPath;
752 filename += fileNamePrefix;
753 filename += "-data.bin";
754 DumpBuffer(block->fPtr, block->fSize, filename.c_str());
758 void AliHLTMUONProcessor::DumpEvent(
759 const AliHLTComponentEventData& evtData,
760 const AliHLTComponentBlockData* blocks,
761 AliHLTComponentTriggerData& trigData,
762 AliHLTUInt8_t* outputPtr,
763 AliHLTUInt32_t& size,
764 AliHLTComponentBlockDataList& outputBlocks
767 /// Dumps the event information to files in the dump path given by the
768 /// method DumpPath, which can be set by the command line argument -dumppath.
773 std::string filename = fDumpPath;
774 sprintf(strbuf, "dump_event-0x%16.16llX.log", evtData.fEventID);
776 fstream logfile(filename.c_str(), fstream::out | fstream::trunc);
779 HLTError("Could not open log file '%s' for dump information.", filename.c_str());
783 filename = fDumpPath;
784 sprintf(strbuf, "dump_event-0x%16.16llX-eventdata.bin", evtData.fEventID);
786 logfile << "Dumping event data structure to file: " << filename << std::endl;
787 DumpBuffer(&evtData, sizeof(AliHLTComponentEventData), filename.c_str());
789 filename = fDumpPath;
790 sprintf(strbuf, "dump_event-0x%16.16llX-triggerdata.bin", evtData.fEventID);
792 logfile << "Dumping trigger data structure to file: " << filename << std::endl;
793 DumpBuffer(&trigData, sizeof(AliHLTComponentTriggerData), filename.c_str());
795 for (unsigned int n = 0; n < evtData.fBlockCnt; n++)
797 sprintf(strbuf, "dump_event-0x%16.16llX-block-0x%8.8X", evtData.fEventID, n);
799 sprintf(strbuf, "0x%8.8X", blocks[n].fSpecification);
800 logfile << "Found block with data type = " << DataType2Text(blocks[n].fDataType)
801 << ", specification = " << strbuf << ". Dumping to file: "
802 << filename << "-data.bin" << std::endl;
803 DumpBlock(&blocks[n], filename.c_str());
806 filename = fDumpPath;
807 sprintf(strbuf, "dump_event-0x%16.16llX-output-buffer.bin", evtData.fEventID);
809 logfile << "Dumping output buffer to file: " << filename << std::endl;
810 DumpBuffer(outputPtr, size, filename.c_str());
812 for (size_t i = 0; i < outputBlocks.size(); i++)
814 sprintf(strbuf, "dump_event-0x%16.16llX-output-block-0x%8.8X", evtData.fEventID, int(i));
816 sprintf(strbuf, "0x%8.8X", outputBlocks[i].fSpecification);
817 logfile << "Generated output data block with type = "
818 << DataType2Text(outputBlocks[i].fDataType)
819 << ", specification = " << strbuf << ". Dumping to file: "
820 << filename << "-data.bin" << std::endl;
821 DumpBlock(&outputBlocks[i], filename.c_str());
826 void AliHLTMUONProcessor::DumpEvent(
827 const AliHLTComponentEventData& evtData,
828 AliHLTComponentTriggerData& trigData
831 /// Dumps the event information to files in the dump path given by the
832 /// method DumpPath, which can be set by the command line argument -dumppath.
837 std::string filename = fDumpPath;
838 sprintf(strbuf, "dump_event-0x%16.16llX.log", evtData.fEventID);
840 fstream logfile(filename.c_str(), fstream::out | fstream::trunc);
843 HLTError("Could not open log file '%s' for dump information.", filename.c_str());
847 filename = fDumpPath;
848 sprintf(strbuf, "dump_event-0x%16.16llX-eventdata.bin", evtData.fEventID);
850 logfile << "Dumping event data structure to file: " << filename << std::endl;
851 DumpBuffer(&evtData, sizeof(AliHLTComponentEventData), filename.c_str());
853 filename = fDumpPath;
854 sprintf(strbuf, "dump_event-0x%16.16llX-triggerdata.bin", evtData.fEventID);
856 logfile << "Dumping trigger data structure to file: " << filename << std::endl;
857 DumpBuffer(&trigData, sizeof(AliHLTComponentTriggerData), filename.c_str());
859 for (int i = 0; i < GetNumberOfInputBlocks(); i++)
861 const AliHLTComponentBlockData* block = GetInputBlock(i);
862 sprintf(strbuf, "dump_event-0x%16.16llX-block-0x%8.8X", evtData.fEventID, i);
864 sprintf(strbuf, "0x%8.8X", block->fSpecification);
865 logfile << "Found block with data type = " << DataType2Text(block->fDataType)
866 << ", specification = " << strbuf << ". Dumping to file: "
867 << filename << "-data.bin" << std::endl;
868 DumpBlock(block, filename.c_str());