Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion GPU/GPUTracking/Definitions/GPUSettingsListStandalone.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ AddOption(runCompression, int32_t, 1, "", 0, "Enable TPC Compression")
AddOption(runTransformation, int32_t, 1, "", 0, "Enable TPC Transformation")
AddOption(runRefit, bool, false, "", 0, "Enable final track refit")
AddOption(setO2Settings, bool, false, "", 0, "Set O2 defaults for output of shared cluster map, referenceX")
AddOption(recreateTrivialCalibObjects, bool, false, "", 0, "Recreate trivial calibration objects (TPCTransform, dEdxCorrection) from scratch")
AddOption(recreateTrivialCalibObjects, int64_t, 0, "", 0, "Recreate trivial calibration objects (TPCTransform, dEdxCorrection, ...) from scratch, O2 build: CCDB objects (material LUT) for the current time, or for this timestamp (ms) if != 1", def(1))
AddHelp("help", 'h')
AddHelpAll("helpall", 'H')
AddSubConfig(GPUSettingsRec, rec)
Expand Down
2 changes: 1 addition & 1 deletion GPU/GPUTracking/Standalone/Benchmark/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ if(ALIGPU_BUILD_TYPE STREQUAL "O2")
o2_add_executable(standalone-benchmark
COMPONENT_NAME gpu
TARGETVARNAME targetName
PUBLIC_LINK_LIBRARIES O2::GPUO2Interface O2::GPUTracking O2::TPCReconstruction
PUBLIC_LINK_LIBRARIES O2::GPUO2Interface O2::GPUTracking O2::TPCReconstruction O2::CCDB O2::DetectorsBase
SOURCES ${SRCS})
endif()

Expand Down
25 changes: 22 additions & 3 deletions GPU/GPUTracking/Standalone/Benchmark/standalone.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@
/// \file standalone.cxx
/// \author David Rohr

#ifndef GPUCA_STANDALONE
#include "GPUO2ExternalUser.h" // Compiled like O2 code using the GPU interface: full O2 headers (e.g. MatLayerCylSet::rectifyPtrFromFile), ROOT before the GPU headers
#include "CCDB/BasicCCDBManager.h"
#include "DetectorsBase/MatLayerCylSet.h"
#include "TPCBase/Mapper.h"
#endif

#include "utils/qconfig.h"
#include "GPUReconstruction.h"
#include "GPUReconstructionTimeframe.h"
Expand Down Expand Up @@ -302,7 +309,7 @@ int32_t ReadConfiguration(int argc, char** argv)
return (0);
}

void CreateTrivialCalibObjects()
void CreateTrivialCalibObjects([[maybe_unused]] int64_t timestamp) // Timestamp of the CCDB objects (O2 build), 1: now
{
GPUCalibObjectsConst calib;

Expand All @@ -319,8 +326,20 @@ void CreateTrivialCalibObjects()
calib.dEdxCalibContainer = tmpdEdxCalibContainer.get();
auto tmpTPCPadGainCalib = std::make_unique<TPCPadGainCalib>();
calib.tpcPadGain = tmpTPCPadGainCalib.get();
auto tmpTPCZSLinkMapping = std::make_unique<TPCZSLinkMapping>();
#ifndef GPUCA_STANDALONE
auto tmpTPCZSLinkMapping = std::make_unique<TPCZSLinkMapping>(o2::tpc::Mapper::instance());
calib.tpcZSLinkMapping = tmpTPCZSLinkMapping.get();
auto& ccdb = o2::ccdb::BasicCCDBManager::instance(); // Default CCDB server (NameConf), objects owned by the manager
ccdb.setFatalWhenNull(false); // Without CCDB access, write the other objects
if (timestamp != 1) {
ccdb.setTimestamp(timestamp);
}
if (auto* matLUT = ccdb.get<o2::base::MatLayerCylSet>("GLO/Param/MatLUT")) {
calib.matLUT = o2::base::MatLayerCylSet::rectifyPtrFromFile(matLUT);
} else {
printf("Could not fetch the material LUT from the CCDB, not written\n");
}
#endif

chainTracking->SetCalibObjects(calib);
rec->DumpSettings("./");
Expand Down Expand Up @@ -806,7 +825,7 @@ int32_t main(int argc, char** argv)
}

if (configStandalone.recreateTrivialCalibObjects) {
CreateTrivialCalibObjects();
CreateTrivialCalibObjects(configStandalone.recreateTrivialCalibObjects);
return 0;
}

Expand Down
Loading