Skip to content

Commit 99577ca

Browse files
committed
Align: Opt. request debug ouput only for first lane
1 parent 2121e45 commit 99577ca

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

Detectors/Align/Workflow/src/BarrelAlignmentSpec.cxx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ class BarrelAlignmentSpec : public Task
107107
bool mIgnoreCCDBAlignment = false;
108108
bool mCosmic = false;
109109
bool mLoadTPCCalib = false;
110-
int mLane = 0;
110+
size_t mLane = 0;
111111
int mPostProcessing = 0; // special mode of extracting alignment or constraints check
112112
GTrackID::mask_t mMPsrc{};
113113
DetID::mask_t mDetMask{};
@@ -136,8 +136,8 @@ void BarrelAlignmentSpec::init(InitContext& ic)
136136
int dbg = ic.options().get<int>("debug-output");
137137
mLane = ic.services().get<const o2::framework::DeviceSpec>().inputTimesliceId;
138138
mController = std::make_unique<Controller>(mDetMask, mMPsrc, mCosmic, mUseMC, mLane);
139-
if (dbg) {
140-
mController->setDebugOutputLevel(dbg);
139+
if (dbg > 0 || (dbg < 0 && mLane == 0)) {
140+
mController->setDebugOutputLevel(std::abs(dbg));
141141
}
142142

143143
mConfMacro = ic.options().get<std::string>("config-macro");
@@ -385,8 +385,8 @@ DataProcessorSpec getBarrelAlignmentSpec(GTrackID::mask_t srcMP, GTrackID::mask_
385385
ConfigParamSpec{"initial-params-file", VariantType::String, "", {"initial parameters file"}},
386386
ConfigParamSpec{"config-macro", VariantType::String, "", {"configuration macro with signature (o2::align::Controller*, int) to execute from init"}},
387387
ConfigParamSpec{"ignore-initial-params-errors", VariantType::Bool, false, {"ignore initial params (if any) errors for precondition"}},
388-
ConfigParamSpec{"debug-output", VariantType::Int, 0, {"produce debugging output root files"}}};
389-
if (!postprocess) {
388+
ConfigParamSpec{"debug-output", VariantType::Int, 0, {"produce debugging output root files (>0 for all lanes; <0 only for first lane)"}}};
389+
if (postprocess == 0) {
390390
dataRequest->requestTracks(src, useMC);
391391
dataRequest->requestClusters(src, false, skipDetClusters);
392392
dataRequest->requestPrimaryVertices(useMC);

Detectors/Align/include/Align/Controller.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ class Controller final : public TObject
126126
kMPAlignDone = BIT(16) };
127127

128128
Controller() = default;
129-
Controller(DetID::mask_t detmask, GTrackID::mask_t trcmask, bool cosmic = false, bool useMC = false, int instID = 0);
129+
Controller(DetID::mask_t detmask, GTrackID::mask_t trcmask, bool cosmic = false, bool useMC = false, size_t instID = 0);
130130
~Controller() final;
131131

132132
void expandGlobalsBy(int n);
@@ -299,7 +299,7 @@ class Controller final : public TObject
299299
GTrackID::mask_t mMPsrc{};
300300
std::vector<int> mTrackSources;
301301
o2::framework::TimingInfo mTimingInfo{};
302-
int mInstanceID = 0; // instance in case of pipelining
302+
size_t mInstanceID = 0; // instance in case of pipelining
303303
int mRunNumber = 0;
304304
int mNDet = 0; // number of deectors participating in the alignment
305305
int mNDOFs = 0; // number of degrees of freedom

Detectors/Align/src/Controller.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ const Char_t* Controller::sDetectorName[Controller::kNDetectors] = {"ITS", "TPC"
8888
const int Controller::sSkipLayers[Controller::kNLrSkip] = {0, 0, 0, 0}; // TODO(milettri, shahoian): needs AliGeomManager - remove this line after fix.
8989

9090
//________________________________________________________________
91-
Controller::Controller(DetID::mask_t detmask, GTrackID::mask_t trcmask, bool cosmic, bool useMC, int instID)
91+
Controller::Controller(DetID::mask_t detmask, GTrackID::mask_t trcmask, bool cosmic, bool useMC, size_t instID)
9292
: mDetMask(detmask), mMPsrc(trcmask), mUseMC(useMC), mInstanceID(instID)
9393
{
9494
setCosmic(cosmic);

0 commit comments

Comments
 (0)