Skip to content

Commit c8d7fde

Browse files
committed
Name debug stream according to the lane rules
1 parent c95fff1 commit c8d7fde

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

Detectors/Align/Workflow/src/BarrelAlignmentSpec.cxx

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ class BarrelAlignmentSpec : public Task
107107
bool mIgnoreCCDBAlignment = false;
108108
bool mCosmic = false;
109109
bool mLoadTPCCalib = false;
110+
int mLane = 0;
110111
int mPostProcessing = 0; // special mode of extracting alignment or constraints check
111112
GTrackID::mask_t mMPsrc{};
112113
DetID::mask_t mDetMask{};
@@ -132,12 +133,11 @@ void BarrelAlignmentSpec::init(InitContext& ic)
132133
mTimer.Reset();
133134
o2::base::GRPGeomHelper::instance().setRequest(mGRPGeomRequest);
134135

135-
int dbg = ic.options().get<int>("debug-output"), inst = ic.services().get<const o2::framework::DeviceSpec>().inputTimesliceId;
136-
mController = std::make_unique<Controller>(mDetMask, mMPsrc, mCosmic, mUseMC, inst);
136+
int dbg = ic.options().get<int>("debug-output");
137+
mLane = ic.services().get<const o2::framework::DeviceSpec>().inputTimesliceId;
138+
mController = std::make_unique<Controller>(mDetMask, mMPsrc, mCosmic, mUseMC, mLane);
137139
if (dbg) {
138-
mDBGOut = std::make_unique<o2::utils::TreeStreamRedirector>(fmt::format("mpDebug_{}.root", inst).c_str(), "recreate");
139140
mController->setDebugOutputLevel(dbg);
140-
mController->setDebugStream(mDBGOut.get());
141141
}
142142

143143
mConfMacro = ic.options().get<std::string>("config-macro");
@@ -213,7 +213,12 @@ void BarrelAlignmentSpec::init(InitContext& ic)
213213
void BarrelAlignmentSpec::updateTimeDependentParams(ProcessingContext& pc)
214214
{
215215
o2::base::GRPGeomHelper::instance().checkUpdates(pc);
216+
auto tinfo = pc.services().get<o2::framework::TimingInfo>();
216217
if (pc.services().get<o2::framework::TimingInfo>().globalRunNumberChanged) {
218+
if (mController->getDebugOutputLevel()) {
219+
mDBGOut = std::make_unique<o2::utils::TreeStreamRedirector>(fmt::format("mpDebug_{}_{:08d}_{:010d}.root", mLane, tinfo.runNumber, tinfo.tfCounter).c_str(), "recreate");
220+
mController->setDebugStream(mDBGOut.get());
221+
}
217222
if (!mIgnoreCCDBAlignment) {
218223
for (auto id = DetID::First; id <= DetID::Last; id++) {
219224
const auto* alg = o2::base::GRPGeomHelper::instance().getAlignment(id);

0 commit comments

Comments
 (0)