Skip to content

Commit 8af9634

Browse files
authored
Merge 05bb51b into sapling-pr-archive-ktf
2 parents 5d8243a + 05bb51b commit 8af9634

File tree

8 files changed

+52
-18
lines changed

8 files changed

+52
-18
lines changed

Detectors/GlobalTracking/src/MatchTPCITS.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,8 @@ void MatchTPCITS::init()
245245
}
246246
#endif
247247

248-
if (mParams->runAfterBurner) { // only used in AfterBurner
249-
mRGHelper.init(); // prepare helper for TPC track / ITS clusters matching
248+
if (mParams->runAfterBurner) { // only used in AfterBurner
249+
mRGHelper.init(mParams->lowestLayerAB); // prepare helper for TPC track / ITS clusters matching
250250
}
251251

252252
clear();

Detectors/ITSMFT/ITS/reconstruction/include/ITSReconstruction/RecoGeomHelper.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ struct RecoGeomHelper {
103103
static constexpr float ladderWidth() { return o2::itsmft::SegmentationAlpide::SensorSizeRows; }
104104
static constexpr float ladderWidthInv() { return 1. / ladderWidth(); }
105105

106-
void init();
106+
void init(int minLayer = 0, int maxLayer = getNLayers());
107107
void print() const;
108108

109109
ClassDefNV(RecoGeomHelper, 0);

Detectors/ITSMFT/ITS/reconstruction/src/RecoGeomHelper.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,9 +229,9 @@ void RecoGeomHelper::RecoLayer::print() const
229229
}
230230

231231
//_____________________________________________________________________
232-
void RecoGeomHelper::init()
232+
void RecoGeomHelper::init(int minLayer, int maxLayer)
233233
{
234-
for (int il = int(layers.size()); il--;) {
234+
for (int il = maxLayer; --il >= minLayer;) {
235235
auto& lr = layers[il];
236236
lr.id = il;
237237
lr.init();

Detectors/TPC/calibration/SpacePoints/src/TrackInterpolation.cxx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,6 @@ void TrackInterpolation::interpolateTrack(int iSeed)
640640
// skip masked cluster residual
641641
continue;
642642
}
643-
++nClValidated;
644643
const float tgPhi = clusterResiduals[iCl].snp / std::sqrt((1.f - clusterResiduals[iCl].snp) * (1.f + clusterResiduals[iCl].snp));
645644
const auto dy = clusterResiduals[iCl].dy;
646645
const auto dz = clusterResiduals[iCl].dz;
@@ -649,6 +648,7 @@ void TrackInterpolation::interpolateTrack(int iSeed)
649648
const auto sec = clusterResiduals[iCl].sec;
650649
if ((std::abs(dy) < param::MaxResid) && (std::abs(dz) < param::MaxResid) && (std::abs(y) < param::MaxY) && (std::abs(z) < param::MaxZ) && (std::abs(tgPhi) < param::MaxTgSlp)) {
651650
mClRes.emplace_back(dy, dz, tgPhi, y, z, iRow, sec);
651+
++nClValidated;
652652
} else {
653653
++mRejectedResiduals;
654654
}
@@ -875,7 +875,7 @@ void TrackInterpolation::extrapolateTrack(int iSeed)
875875

876876
TrackParams params; // for refitted track parameters and flagging rejected clusters
877877
if (clusterResiduals.size() > constants::MAXGLOBALPADROW) {
878-
LOGP(warn, "Extrapolated ITS-TPC track and found more reesiduals than possible ({})", clusterResiduals.size());
878+
LOGP(warn, "Extrapolated ITS-TPC track and found more residuals than possible ({})", clusterResiduals.size());
879879
return;
880880
}
881881

@@ -899,14 +899,14 @@ void TrackInterpolation::extrapolateTrack(int iSeed)
899899
if (iRow < param::NPadRows && params.flagRej[iCl]) { // skip masked cluster residual
900900
continue;
901901
}
902-
++nClValidated;
903902
const float tgPhi = clusterResiduals[iCl].snp / std::sqrt((1.f - clusterResiduals[iCl].snp) * (1.f + clusterResiduals[iCl].snp));
904903
const auto dy = clusterResiduals[iCl].dy;
905904
const auto dz = clusterResiduals[iCl].dz;
906905
const auto y = clusterResiduals[iCl].y;
907906
const auto z = clusterResiduals[iCl].z;
908907
if ((std::abs(dy) < param::MaxResid) && (std::abs(dz) < param::MaxResid) && (std::abs(y) < param::MaxY) && (std::abs(z) < param::MaxZ) && (std::abs(tgPhi) < param::MaxTgSlp)) {
909908
mClRes.emplace_back(dy, dz, tgPhi, y, z, iRow, clusterResiduals[iCl].sec);
909+
++nClValidated;
910910
} else {
911911
++mRejectedResiduals;
912912
}

Detectors/TPC/workflow/src/IDCToVectorSpec.cxx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ class IDCToVectorDevice : public o2::framework::Task
7272
mWriteDebugOnError = ic.options().get<bool>("write-debug-on-error");
7373
mWriteRawDataOnError = ic.options().get<bool>("write-raw-data-on-error");
7474
mRawDataType = ic.options().get<int>("raw-data-type");
75+
o2::framework::RawParser<>::setCheckIncompleteHBF(ic.options().get<bool>("check-incomplete-hbf"));
7576

7677
mDebugStreamFileName = ic.options().get<std::string>("debug-file-name").data();
7778
mRawOutputFileName = ic.options().get<std::string>("raw-file-name").data();
@@ -606,9 +607,10 @@ o2::framework::DataProcessorSpec getIDCToVectorSpec(const std::string inputSpec,
606607
{"write-raw-data-on-error", VariantType::Bool, false, {"dump raw data in case errors occurred"}},
607608
{"raw-file-name", VariantType::String, "/tmp/idc_debug.{run}.{raw_type}", {"name of the raw output file"}},
608609
{"raw-data-type", VariantType::Int, 0, {"Which raw data to dump: 0-full TPC with DH, 1-full TPC with DH skip empty, 2-full TPC no DH, 3-full TPC no DH skip empty, 4-IDC raw only"}},
610+
{"check-incomplete-hbf", VariantType::Bool, false, {"false: don't chck; true: check and report"}},
609611
{"pedestal-url", VariantType::String, "ccdb-default", {"ccdb-default: load from NameConf::getCCDBServer() OR ccdb url (must contain 'ccdb' OR pedestal file name"}},
610612
{"swap-links", VariantType::Bool, false, {"swap links to circumvent bug in FW"}},
611613
} // end Options
612-
}; // end DataProcessorSpec
614+
}; // end DataProcessorSpec
613615
}
614616
} // namespace o2::tpc

Detectors/TPC/workflow/src/RecoWorkflow.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ framework::WorkflowSpec getWorkflow(CompletionPolicyData* policyData, std::vecto
553553
//
554554
// a writer process for compressed clusters container
555555
//
556-
// selected by output type 'compressed-clusters'
556+
// selected by output type 'compressed-clusters-root'
557557
if (produceCompClustersRoot && !isEnabled(OutputType::DisableWriter)) {
558558
// defining the track writer process using the generic RootTreeWriter and generator tool
559559
//

Detectors/TPC/workflow/src/tpc-reco-workflow.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ void customize(std::vector<o2::framework::ConfigParamSpec>& workflowOptions)
5757
using namespace o2::framework;
5858

5959
std::vector<ConfigParamSpec> options{
60-
{"input-type", VariantType::String, "digits", {"digitizer, digits, zsraw, clustershw, clusters, compressed-clusters-root, compressed-clusters-ctf, compressed-clusters-flat-for-encode, pass-through"}},
60+
{"input-type", VariantType::String, "digits", {"digitizer, digits, zsraw, clustershw, clusters, compressed-clusters-root, compressed-clusters-flat, compressed-clusters-flat-for-encode, pass-through"}},
6161
{"output-type", VariantType::String, "tracks", {"digits, zsraw, clustershw, clusters, tracks, compressed-clusters-root, compressed-clusters-flat, encoded-clusters, disable-writer, send-clusters-per-sector, qa, no-shared-cluster-map, tpc-triggers"}},
6262
{"disable-root-input", o2::framework::VariantType::Bool, false, {"disable root-files input reader"}},
6363
{"no-ca-clusterer", VariantType::Bool, false, {"Use HardwareClusterer instead of clusterer of GPUCATracking"}},

Framework/Core/src/PropertyTreeHelpers.cxx

Lines changed: 39 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,15 @@
1414
#include "Framework/VariantPropertyTreeHelpers.h"
1515
#include "Framework/RuntimeError.h"
1616
#include "Framework/VariantJSONHelpers.h"
17+
#include "Framework/Signpost.h"
1718

1819
#include <boost/program_options/variables_map.hpp>
1920

2021
#include <vector>
2122
#include <string>
2223

24+
O2_DECLARE_DYNAMIC_LOG(configuration);
25+
2326
namespace o2::framework
2427
{
2528
namespace
@@ -37,6 +40,9 @@ void PropertyTreeHelpers::populateDefaults(std::vector<ConfigParamSpec> const& s
3740
boost::property_tree::ptree& pt,
3841
boost::property_tree::ptree& provenance)
3942
{
43+
O2_LOG_ENABLE(configuration);
44+
O2_SIGNPOST_ID_GENERATE(cid, configuration);
45+
O2_SIGNPOST_START(configuration, cid, "populateDefaults", "Filling with defaults");
4046
for (auto const& spec : schema) {
4147
std::string key = spec.name.substr(0, spec.name.find(','));
4248
try {
@@ -77,9 +83,12 @@ void PropertyTreeHelpers::populateDefaults(std::vector<ConfigParamSpec> const& s
7783
case VariantType::String:
7884
pt.put(key, spec.defaultValue.get<std::string>());
7985
break;
80-
case VariantType::Bool:
81-
pt.put(key, spec.defaultValue.get<bool>());
86+
case VariantType::Bool: {
87+
bool value = spec.defaultValue.get<bool>();
88+
O2_SIGNPOST_EVENT_EMIT(configuration, cid, "populateDefaults", "Setting %{public}s: %{public}s", key.c_str(), value ? "true" : "false");
89+
pt.put(key, value);
8290
break;
91+
}
8392
case VariantType::Dict:
8493
pt.put_child(key, boost::property_tree::ptree{});
8594
break;
@@ -126,20 +135,27 @@ void PropertyTreeHelpers::populateDefaults(std::vector<ConfigParamSpec> const& s
126135
}
127136
provenance.put(key, "default");
128137
} catch (std::runtime_error& re) {
138+
O2_SIGNPOST_END_WITH_ERROR(configuration, cid, "populateDefaults", "Aborting because of runtime_error %{public}s", re.what());
129139
throw;
130140
} catch (std::exception& e) {
141+
O2_SIGNPOST_END_WITH_ERROR(configuration, cid, "populateDefaults", "Missing option %{public}s (%{public}s)", key.c_str(), e.what());
131142
throw std::invalid_argument(std::string("missing option: ") + key + " (" + e.what() + ")");
132143
} catch (...) {
144+
O2_SIGNPOST_END_WITH_ERROR(configuration, cid, "populateDefaults", "Aborting because of missing option %{public}s", key.c_str());
133145
throw std::invalid_argument(std::string("missing option: ") + key);
134146
}
135147
}
148+
O2_SIGNPOST_END(configuration, cid, "populateDefaults", "Done");
136149
}
137150

138151
void PropertyTreeHelpers::populate(std::vector<ConfigParamSpec> const& schema,
139152
boost::property_tree::ptree& pt,
140153
boost::program_options::variables_map const& vmap,
141154
boost::property_tree::ptree& provenance)
142155
{
156+
O2_LOG_ENABLE(configuration);
157+
O2_SIGNPOST_ID_GENERATE(cid, configuration);
158+
O2_SIGNPOST_START(configuration, cid, "populate", "Filling parameters from variables_map");
143159
for (auto const& spec : schema) {
144160
// strip short version to get the correct key
145161
std::string key = spec.name.substr(0, spec.name.find(','));
@@ -183,9 +199,11 @@ void PropertyTreeHelpers::populate(std::vector<ConfigParamSpec> const& schema,
183199
pt.put(key, *v);
184200
}
185201
break;
186-
case VariantType::Bool:
187-
pt.put(key, vmap[key].as<bool>());
188-
break;
202+
case VariantType::Bool: {
203+
auto v = vmap[key].as<bool>();
204+
O2_SIGNPOST_EVENT_EMIT(configuration, cid, "populate", "Setting %{public}s: %{public}s", key.c_str(), v ? "true" : "false");
205+
pt.put(key, v);
206+
} break;
189207
case VariantType::ArrayInt: {
190208
auto v = fromString<VariantType::ArrayInt>(vmap[key].as<std::string>());
191209
pt.put_child(key, vectorToBranch<int>(v.get<int*>(), v.size()));
@@ -243,13 +261,17 @@ void PropertyTreeHelpers::populate(std::vector<ConfigParamSpec> const& schema,
243261
}
244262
provenance.put(key, "fairmq");
245263
} catch (std::runtime_error& re) {
264+
O2_SIGNPOST_END_WITH_ERROR(configuration, cid, "populate", "Aborting because of runtime_error %{public}s", re.what());
246265
throw;
247266
} catch (std::exception& e) {
267+
O2_SIGNPOST_END_WITH_ERROR(configuration, cid, "populate", "Missing option %{public}s (%{public}s)", key.c_str(), e.what());
248268
throw std::invalid_argument(std::string("missing option: ") + key + " (" + e.what() + ")");
249269
} catch (...) {
270+
O2_SIGNPOST_END_WITH_ERROR(configuration, cid, "populate", "Aborting because of missing option %{public}s", key.c_str());
250271
throw std::invalid_argument(std::string("missing option: ") + key);
251272
}
252273
}
274+
O2_SIGNPOST_END(configuration, cid, "populate", "Done");
253275
}
254276

255277
template <typename T>
@@ -273,6 +295,9 @@ void PropertyTreeHelpers::populate(std::vector<ConfigParamSpec> const& schema,
273295
boost::property_tree::ptree& provenance,
274296
std::string const& provenanceLabel)
275297
{
298+
O2_LOG_ENABLE(configuration);
299+
O2_SIGNPOST_ID_GENERATE(cid, configuration);
300+
O2_SIGNPOST_START(configuration, cid, "populate", "Filling parameters from ptree");
276301
for (auto const& spec : schema) {
277302
// strip short version to get the correct key
278303
std::string key = spec.name.substr(0, spec.name.find(','));
@@ -318,9 +343,11 @@ void PropertyTreeHelpers::populate(std::vector<ConfigParamSpec> const& schema,
318343
case VariantType::String:
319344
pt.put(key, (*it).get_value<std::string>());
320345
break;
321-
case VariantType::Bool:
346+
case VariantType::Bool: {
347+
auto v = (*it).get_value<bool>();
348+
O2_SIGNPOST_EVENT_EMIT(configuration, cid, "populate", "Setting %{public}s: %{public}s", key.c_str(), v ? "true" : "false");
322349
pt.put(key, (*it).get_value<bool>());
323-
break;
350+
} break;
324351
case VariantType::Dict:
325352
case VariantType::ArrayInt:
326353
case VariantType::ArrayFloat:
@@ -371,13 +398,18 @@ void PropertyTreeHelpers::populate(std::vector<ConfigParamSpec> const& schema,
371398
}
372399
provenance.put(key, provenanceLabel);
373400
} catch (std::runtime_error& re) {
401+
O2_SIGNPOST_END_WITH_ERROR(configuration, cid, "populate", "Aborting during processing of %{public}s because of runtime_error %{public}s",
402+
key.c_str(), re.what());
374403
throw;
375404
} catch (std::exception& e) {
405+
O2_SIGNPOST_END_WITH_ERROR(configuration, cid, "populate", "Missing option %{public}s (%{public}s)", key.c_str(), e.what());
376406
throw std::invalid_argument(std::string("missing option: ") + key + " (" + e.what() + ")");
377407
} catch (...) {
408+
O2_SIGNPOST_END_WITH_ERROR(configuration, cid, "populate", "Aborting because of missing option %{public}s", key.c_str());
378409
throw std::invalid_argument(std::string("missing option: ") + key);
379410
}
380411
}
412+
O2_SIGNPOST_END(configuration, cid, "populate", "Done");
381413
}
382414

383415
namespace

0 commit comments

Comments
 (0)