Skip to content

Commit bed84ff

Browse files
Update geometry only at the beginning of the run
1 parent 452db23 commit bed84ff

2 files changed

Lines changed: 9 additions & 6 deletions

File tree

Modules/ITS/src/ITSClusterTask.cxx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
#include "CCDB/BasicCCDBManager.h"
3232
#include "CCDB/CCDBTimeStampUtils.h"
3333
#include <Framework/InputRecord.h>
34+
#include "Framework/TimingInfo.h"
3435
#include <TH1F.h>
3536
#include <TH2F.h>
3637
#include "Common/Utils.h"
@@ -137,9 +138,10 @@ void ITSClusterTask::startOfCycle()
137138

138139
void ITSClusterTask::monitorData(o2::framework::ProcessingContext& ctx)
139140
{
140-
141-
mGeom = o2::its::GeometryTGeo::Instance();
142-
mGeom->fillMatrixCache(o2::math_utils::bit2Mask(o2::math_utils::TransformType::L2G));
141+
if (ctx.services().get<o2::framework::TimingInfo>().globalRunNumberChanged) {
142+
mGeom = o2::its::GeometryTGeo::Instance();
143+
mGeom->fillMatrixCache(o2::math_utils::bit2Mask(o2::math_utils::TransformType::L2G));
144+
}
143145

144146
if (mTimestamp == -1) { // get dict from ccdb
145147
mTimestamp = std::stol(o2::quality_control_modules::common::getFromConfig<string>(mCustomParameters, "dicttimestamp", "0"));

Modules/ITS/src/ITSFhrTask.cxx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include <DPLUtils/DPLRawParser.h>
2323
#include "CCDB/BasicCCDBManager.h"
2424
#include "CCDB/CCDBTimeStampUtils.h"
25+
#include "Framework/TimingInfo.h"
2526

2627
#include "Common/Utils.h"
2728

@@ -398,9 +399,9 @@ void ITSFhrTask::startOfCycle() { ILOG(Debug, Devel) << "startOfCycle" << ENDM;
398399

399400
void ITSFhrTask::monitorData(o2::framework::ProcessingContext& ctx)
400401
{
401-
402-
mGeom = o2::its::GeometryTGeo::Instance();
403-
402+
if (ctx.services().get<o2::framework::TimingInfo>().globalRunNumberChanged) {
403+
mGeom = o2::its::GeometryTGeo::Instance();
404+
}
404405
// set timer
405406
std::chrono::time_point<std::chrono::high_resolution_clock> start;
406407
std::chrono::time_point<std::chrono::high_resolution_clock> end;

0 commit comments

Comments
 (0)