Skip to content

Commit 97a563e

Browse files
shahor02davidrohr
authored andcommitted
GRPUpdater updates used run 1st orbit (==HBFUtils.orbitFirst) in GRP
1 parent 5e234aa commit 97a563e

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

Steer/DigitizerWorkflow/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ o2_add_executable(digitizer-workflow
5555
O2::TRDWorkflow
5656
O2::DataFormatsTRD
5757
O2::ZDCSimulation
58-
O2::ZDCWorkflow)
58+
O2::ZDCWorkflow
59+
O2::DetectorsRaw)
5960

6061

6162
o2_add_executable(mctruth-testworkflow

Steer/DigitizerWorkflow/src/GRPUpdaterSpec.cxx

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#include <FairLogger.h>
2222
#include <memory> // for make_shared, make_unique, unique_ptr
2323
#include <string>
24+
#include "DetectorsRaw/HBFUtils.h"
2425

2526
using namespace o2::framework;
2627

@@ -48,9 +49,6 @@ class GRPDPLUpdatedTask
4849
void run(framework::ProcessingContext& pc)
4950
{
5051
const std::string grpName = "GRP";
51-
if (mFinished) {
52-
return;
53-
}
5452

5553
TFile flGRP(mGRPFileName.c_str(), "update");
5654
if (flGRP.IsZombie()) {
@@ -66,17 +64,15 @@ class GRPDPLUpdatedTask
6664
}
6765
grp->setDetROMode(det, roMode);
6866
}
69-
LOG(INFO) << "Updated GRP in " << mGRPFileName << " for detectors RO mode";
67+
grp->setFirstOrbit(o2::raw::HBFUtils::Instance().orbitFirst);
68+
LOG(INFO) << "Updated GRP in " << mGRPFileName << " for detectors RO mode and 1st orbit of the run";
7069
grp->print();
7170
flGRP.WriteObjectAny(grp.get(), grp->Class(), grpName.c_str());
7271
flGRP.Close();
73-
mFinished = true;
74-
7572
pc.services().get<ControlService>().readyToQuit(QuitRequest::Me);
7673
}
7774

7875
private:
79-
bool mFinished = false;
8076
std::string mGRPFileName = "o2sim_grp.root";
8177
};
8278

0 commit comments

Comments
 (0)