Skip to content

Commit 933715c

Browse files
ddobrigkalibuild
andauthored
[Common] Only load matLUT once, avoid reload when switching runs (#9171)
Co-authored-by: ALICE Builder <alibuild@users.noreply.github.com>
1 parent 5fe3c09 commit 933715c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Common/TableProducer/trackPropagation.cxx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,12 @@ struct TrackPropagation {
146146
}
147147

148148
// load matLUT for this timestamp
149-
LOG(info) << "Loading material look-up table for timestamp: " << bc.timestamp();
150-
lut = o2::base::MatLayerCylSet::rectifyPtrFromFile(ccdb->getForTimeStamp<o2::base::MatLayerCylSet>(lutPath, bc.timestamp()));
149+
if (!lut) {
150+
LOG(info) << "Loading material look-up table for timestamp: " << bc.timestamp();
151+
lut = o2::base::MatLayerCylSet::rectifyPtrFromFile(ccdb->getForTimeStamp<o2::base::MatLayerCylSet>(lutPath, bc.timestamp()));
152+
} else {
153+
LOG(info) << "Material look-up table already in place. Not reloading.";
154+
}
151155

152156
grpmag = ccdb->getForTimeStamp<o2::parameters::GRPMagField>(grpmagPath, bc.timestamp());
153157
LOG(info) << "Setting magnetic field to current " << grpmag->getL3Current() << " A for run " << bc.runNumber() << " from its GRPMagField CCDB object";

0 commit comments

Comments
 (0)