Project
Loading...
Searching...
No Matches
Objects.cxx
Go to the documentation of this file.
1// Copyright 2019-2026 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
12#include "AODNative/Objects.h"
13#include "AODNative/Errors.h"
14#include "Cursor.h"
15#include <algorithm>
16#include <memory>
17#include <variant>
18
19namespace o2::aod::native
20{
21
22namespace
23{
24constexpr uint32_t kByteCountMask = 0x40000000;
25constexpr uint32_t kClassMask = 0x80000000;
26constexpr uint32_t kNewClassTag = 0xFFFFFFFF;
27constexpr uint16_t kStreamedMemberWise = 0x4000;
28constexpr uint32_t kIsReferenced = 1 << 4;
29constexpr int64_t kMapOffset = 2;
30
31struct LeafInfo {
32 std::string name;
33 std::string className;
35 bool isUnsigned = false;
36 std::string countLeaf;
37};
38
39struct EmbeddedBasket {
41 std::vector<uint8_t> data;
42};
43
44using Object = std::variant<std::monostate,
45 std::shared_ptr<BranchInfo>,
46 std::shared_ptr<LeafInfo>,
47 std::shared_ptr<EmbeddedBasket>,
48 std::shared_ptr<std::string>>;
49
50template <typename T>
51std::shared_ptr<T> as(Object const& o)
52{
53 auto* p = std::get_if<std::shared_ptr<T>>(&o);
54 return p ? *p : nullptr;
55}
56
60class ObjectReader
61{
62 public:
63 explicit ObjectReader(Cursor& c) : mC(c) {}
64
65 TreeInfo tree();
66 std::map<std::string, std::string> stringMap();
67
68 private:
69 struct Versioned {
70 size_t end;
72 };
73
74 Versioned header(char const* className);
75 void checkVersion(char const* className, int version);
76 void tobject();
77 std::string tnamed();
78 void skipObject(char const* className, bool checkVersion = true);
79 std::vector<Object> objArray();
80 Object anyObject();
81 Object readByClass(std::string const& className, int64_t mapAt);
82 std::shared_ptr<BranchInfo> tbranch(int64_t mapAt);
83 std::shared_ptr<LeafInfo> tleaf(std::string const& className, int64_t mapAt);
84 std::shared_ptr<EmbeddedBasket> tbasket(int64_t mapAt);
85 std::shared_ptr<std::string> tobjstring(int64_t mapAt);
86
87 Cursor& mC;
88 std::map<int64_t, std::string> mClasses;
89 std::map<int64_t, Object> mObjects;
90};
91
92void ObjectReader::checkVersion(char const* className, int version)
93{
94 auto& table = supportedClassVersions();
95 auto it = table.find(className);
96 if (it == table.end() || std::find(it->second.begin(), it->second.end(), version) == it->second.end()) {
97 throw UnsupportedVersion(className, version, mC.file());
98 }
99}
100
101ObjectReader::Versioned ObjectReader::header(char const* className)
102{
103 auto start = mC.pos();
104 auto bcnt = mC.u32();
105 if (!(bcnt & kByteCountMask)) {
106 throw UnsupportedLayout(std::string("object of class ") + className + " without byte count");
107 }
108 size_t end = start + 4 + (bcnt & ~kByteCountMask);
109 if (end > mC.buffer().size()) {
110 mC.fail(std::string("byte count of ") + className + " past the end of the buffer");
111 }
112 auto version = mC.u16();
113 if (version & kStreamedMemberWise) {
114 throw UnsupportedLayout(std::string("memberwise streaming of ") + className);
115 }
116 checkVersion(className, version);
117 return {end, version};
118}
119
120void ObjectReader::tobject()
121{
122 auto version = mC.u16();
123 if (version & kStreamedMemberWise) {
124 // Written with a byte count: those were its high bytes. Skip the low ones.
125 mC.u16();
126 version = mC.u16();
127 }
128 checkVersion("TObject", version);
129 mC.u32(); // fUniqueID
130 auto bits = mC.u32();
131 if (bits & kIsReferenced) {
132 mC.u16(); // pidf
133 }
134}
135
136std::string ObjectReader::tnamed()
137{
138 auto v = header("TNamed");
139 tobject();
140 auto name = mC.string();
141 mC.string(); // fTitle
142 mC.seek(v.end);
143 return name;
144}
145
146void ObjectReader::skipObject(char const* className, bool check)
147{
148 auto start = mC.pos();
149 auto bcnt = mC.u32();
150 if (!(bcnt & kByteCountMask)) {
151 throw UnsupportedLayout(std::string("object of class ") + className + " without byte count");
152 }
153 auto version = mC.u16();
154 if (check) {
155 checkVersion(className, version);
156 }
157 mC.seek(start + 4);
158 mC.skip(bcnt & ~kByteCountMask);
159}
160
161std::vector<Object> ObjectReader::objArray()
162{
163 auto v = header("TObjArray");
164 tobject();
165 mC.string(); // fName
166 auto size = mC.i32();
167 mC.i32(); // fLowerBound
168 if (size < 0) {
169 mC.fail("negative TObjArray size");
170 }
171 std::vector<Object> result;
172 for (int i = 0; i < size; ++i) {
173 result.push_back(anyObject());
174 }
175 mC.seek(v.end);
176 return result;
177}
178
179// ROOT's read_object_any scheme. Recorded offsets are buffer displacements
180// (relative to the key start) plus kMapOffset.
181Object ObjectReader::anyObject()
182{
183 auto beg = mC.displacement();
184 auto begPos = mC.pos();
185 auto bcnt = mC.u32();
186 if (!(bcnt & kByteCountMask) || bcnt == kNewClassTag) {
187 // No byte count: the word is the tag itself. Only references to objects
188 // already read are written like this; new objects without a byte count
189 // come from very old files.
190 auto tag = bcnt;
191 if (tag & kClassMask) {
192 throw UnsupportedLayout("new object without byte count");
193 }
194 if (tag == 0) {
195 return {};
196 }
197 if (tag == 1) {
198 throw UnsupportedLayout("reference to the parent object");
199 }
200 auto it = mObjects.find(tag);
201 if (it == mObjects.end()) {
202 mC.fail("dangling object reference " + std::to_string(tag));
203 }
204 return it->second;
205 }
206 size_t end = begPos + 4 + (bcnt & ~kByteCountMask);
207 if (end > mC.buffer().size()) {
208 mC.fail("object byte count past the end of the buffer");
209 }
210 auto tagAt = mC.displacement();
211 auto tag = mC.u32();
212 Object result;
213 if (!(tag & kClassMask)) {
214 throw UnsupportedLayout("object reference with byte count");
215 } else if (tag == kNewClassTag) {
216 auto className = mC.cstring();
217 mClasses[tagAt + kMapOffset] = className;
218 result = readByClass(className, beg + kMapOffset);
219 } else {
220 auto it = mClasses.find(tag & ~kClassMask);
221 if (it == mClasses.end()) {
222 mC.fail("dangling class reference " + std::to_string(tag & ~kClassMask));
223 }
224 result = readByClass(it->second, beg + kMapOffset);
225 }
226 mC.seek(end);
227 return result;
228}
229
230Object ObjectReader::readByClass(std::string const& className, int64_t mapAt)
231{
232 if (className == "TBranch") {
233 return tbranch(mapAt);
234 }
235 if (className.size() == 6 && className.starts_with("TLeaf") && std::string_view("OBSILFD").find(className[5]) != std::string_view::npos) {
236 return tleaf(className, mapAt);
237 }
238 if (className == "TBasket") {
239 return tbasket(mapAt);
240 }
241 if (className == "TObjString") {
242 return tobjstring(mapAt);
243 }
244 throw UnsupportedLayout("objects of class " + className);
245}
246
247std::shared_ptr<LeafInfo> ObjectReader::tleaf(std::string const& className, int64_t mapAt)
248{
249 // ROOT maps an object before streaming its members.
250 auto leaf = std::make_shared<LeafInfo>();
251 mObjects[mapAt] = leaf;
252 auto vx = header(className.c_str());
253 auto vl = header("TLeaf");
254 leaf->className = className;
255 leaf->name = tnamed();
256 leaf->len = mC.i32();
257 if (leaf->len <= 0) {
258 mC.fail("leaf " + leaf->name + " with length " + std::to_string(leaf->len));
259 }
260 mC.i32(); // fLenType
261 mC.i32(); // fOffset
262 mC.u8(); // fIsRange
263 leaf->isUnsigned = mC.u8() != 0;
264 auto count = anyObject();
265 if (auto countLeaf = as<LeafInfo>(count)) {
266 leaf->countLeaf = countLeaf->name;
267 } else if (!std::holds_alternative<std::monostate>(count)) {
268 throw UnsupportedLayout("fLeafCount of " + leaf->name + " is not a leaf");
269 }
270 mC.seek(vl.end);
271 // fMinimum and fMaximum, in the type of the leaf.
272 mC.seek(vx.end);
273 return leaf;
274}
275
276std::shared_ptr<EmbeddedBasket> ObjectReader::tbasket(int64_t mapAt)
277{
278 // TBasket has no versioned header of its own: it starts with its TKey.
279 auto basket = std::make_shared<EmbeddedBasket>();
280 mObjects[mapAt] = basket;
281 auto header = readBasketHeader(mC);
282 checkVersion("TBasket", header.version % 1000);
283 auto keylen = header.keylen;
284 auto nevbuf = header.nevbuf;
285 auto last = header.last;
286 int flag = header.flag;
287 if (nevbuf < 0 || last < keylen) {
288 mC.fail("inconsistent embedded basket header");
289 }
290 basket->nEntries = nevbuf;
291 if (flag == 99) {
292 // Header only, no data.
293 return basket;
294 }
295 bool displacements = flag > 40;
296 if (displacements) {
297 flag -= 40;
298 }
299 bool hasBuffer = flag > 10;
300 if (hasBuffer) {
301 flag -= 10;
302 }
303 if (flag == 1 && nevbuf > 0) {
304 // Entry offsets (and displacements), each a count followed by fNevBuf ints.
305 mC.skip(4 + 4 * (size_t)nevbuf);
306 if (displacements) {
307 mC.skip(4 + 4 * (size_t)nevbuf);
308 }
309 }
310 if (hasBuffer) {
311 // The buffer starts with a copy of the key, then the values.
312 mC.skip(keylen);
313 auto data = mC.bytes(last - keylen);
314 basket->data.assign(data.begin(), data.end());
315 }
316 return basket;
317}
318
319std::shared_ptr<std::string> ObjectReader::tobjstring(int64_t mapAt)
320{
321 auto s = std::make_shared<std::string>();
322 mObjects[mapAt] = s;
323 auto v = header("TObjString");
324 tobject();
325 *s = mC.string();
326 mC.seek(v.end);
327 return s;
328}
329
330std::shared_ptr<BranchInfo> ObjectReader::tbranch(int64_t mapAt)
331{
332 auto b = std::make_shared<BranchInfo>();
333 mObjects[mapAt] = b;
334 auto v = header("TBranch");
335 b->name = tnamed();
336 skipObject("TAttFill", false);
337 mC.i32(); // fCompress
338 mC.i32(); // fBasketSize
339 mC.i32(); // fEntryOffsetLen
340 auto writeBasket = mC.i32();
341 mC.i64(); // fEntryNumber
342 skipObject("ROOT::TIOFeatures", false);
343 mC.i32(); // fOffset
344 auto maxBaskets = mC.i32();
345 mC.i32(); // fSplitLevel
346 b->entries = mC.i64();
347 mC.i64(); // fFirstEntry
348 b->totBytes = mC.i64();
349 b->zipBytes = mC.i64();
350 if (maxBaskets < 0 || writeBasket < 0 || b->entries < 0) {
351 mC.fail("inconsistent TBranch header for " + b->name);
352 }
353 // The three basket arrays take 20 bytes per basket: check before allocating them.
354 if ((size_t)maxBaskets > mC.remaining() / 20) {
355 mC.fail("fMaxBaskets " + std::to_string(maxBaskets) + " of branch " + b->name + " exceeds the buffer");
356 }
357
358 if (!objArray().empty()) {
359 throw UnsupportedLayout("branch " + b->name + " has sub-branches");
360 }
361 auto leaves = objArray();
362 if (leaves.size() != 1 || !as<LeafInfo>(leaves[0])) {
363 throw UnsupportedLayout("branch " + b->name + " does not have exactly one leaf");
364 }
365 auto baskets = objArray();
366
367 auto readArray = [this, maxBaskets](auto reader) {
368 mC.u8(); // speedbump
369 std::vector<int64_t> values(maxBaskets);
370 for (auto& value : values) {
371 value = reader();
372 }
373 return values;
374 };
375 auto basketBytes = readArray([this] { return (int64_t)mC.i32(); });
376 auto basketEntry = readArray([this] { return mC.i64(); });
377 auto basketSeek = readArray([this] { return mC.i64(); });
378 if (!mC.string().empty()) {
379 throw UnsupportedLayout("branch " + b->name + " stores its baskets in another file");
380 }
381 mC.seek(v.end);
382
383 auto leaf = as<LeafInfo>(leaves[0]);
384 b->leafClass = leaf->className[5];
385 b->isUnsigned = leaf->isUnsigned;
386 b->fixedLen = leaf->len;
387 b->countBranch = leaf->countLeaf;
388
389 // Normal baskets end at the first empty seek, or at fWriteBasket.
390 int nNormal = 0;
391 while (nNormal < maxBaskets && nNormal < writeBasket && basketSeek[nNormal] != 0) {
392 ++nNormal;
393 }
394 for (int i = 0; i < nNormal; ++i) {
395 if (basketBytes[i] <= 0 || basketSeek[i] < 0) {
396 mC.fail("invalid basket location in branch " + b->name);
397 }
398 // When fBasketEntry has no slot after the last basket, the entry count
399 // is only in the basket header. The container layer fills it in (-1).
400 bool hasNext = i + 1 < maxBaskets;
401 if (basketEntry[i] < 0 || (hasNext && basketEntry[i + 1] < basketEntry[i])) {
402 mC.fail("invalid basket entries in branch " + b->name);
403 }
404 int64_t n = hasNext ? basketEntry[i + 1] - basketEntry[i] : -1;
405 if (n > INT32_MAX) {
406 mC.fail("invalid basket entries in branch " + b->name);
407 }
408 b->baskets.push_back(BasketRef{(uint64_t)basketSeek[i], (uint32_t)basketBytes[i], basketEntry[i], (int32_t)n, false, {}});
409 }
410 // Embedded baskets exist only if the normal ones do not hold all the entries.
411 bool knownNormal = nNormal < maxBaskets;
412 int64_t normalEntries = nNormal == 0 ? 0 : (knownNormal ? basketEntry[nNormal] : -1);
413 if (normalEntries != b->entries) {
414 int64_t first = knownNormal ? normalEntries : 0;
415 for (auto& o : baskets) {
416 auto e = as<EmbeddedBasket>(o);
417 if (!e || (!knownNormal && e->nEntries == 0)) {
418 continue;
419 }
420 b->baskets.push_back(BasketRef{0, 0, first, e->nEntries, true, std::move(e->data)});
421 first += e->nEntries;
422 }
423 }
424 // The last normal basket holds what the others do not: computing it saves
425 // reading its header, a round trip for a remote file. The decoder checks it
426 // against the header anyway. If it does not add up, the container layer
427 // reads the header.
428 if (nNormal > 0 && b->baskets[nNormal - 1].nEntries < 0) {
429 int64_t rest = b->entries - b->baskets[nNormal - 1].firstEntry;
430 for (size_t i = nNormal; i < b->baskets.size(); ++i) {
431 rest -= b->baskets[i].nEntries;
432 }
433 if (rest >= 0 && rest <= INT32_MAX) {
434 b->baskets[nNormal - 1].nEntries = (int32_t)rest;
435 }
436 }
437 return b;
438}
439
440TreeInfo ObjectReader::tree()
441{
442 TreeInfo t;
443 auto v = header("TTree");
444 t.name = tnamed();
445 skipObject("TAttLine", false);
446 skipObject("TAttFill", false);
447 skipObject("TAttMarker", false);
448 t.entries = mC.i64();
449 t.totBytes = mC.i64();
450 t.zipBytes = mC.i64();
451 mC.skip(2 * 8); // fSavedBytes, fFlushedBytes
452 mC.f64(); // fWeight
453 mC.skip(4 * 4); // fTimerInterval, fScanField, fUpdate, fDefaultEntryOffsetLen
454 auto nClusterRange = mC.u32();
455 mC.skip(6 * 8); // fMaxEntries ... fEstimate
456 mC.u8(); // speedbump
457 mC.skip(8 * (size_t)nClusterRange);
458 mC.u8(); // speedbump
459 mC.skip(8 * (size_t)nClusterRange);
460 skipObject("ROOT::TIOFeatures", false);
461 for (auto& o : objArray()) {
462 auto b = as<BranchInfo>(o);
463 if (!b) {
464 throw UnsupportedLayout("tree " + t.name + " has a branch which is not a TBranch");
465 }
466 t.branches.push_back(std::move(*b));
467 }
468 // fLeaves, fAliases, fIndexValues, fIndex, fTreeIndex, fFriends, fUserInfo, fBranchRef
469 mC.seek(v.end);
470 return t;
471}
472
473std::map<std::string, std::string> ObjectReader::stringMap()
474{
475 std::map<std::string, std::string> result;
476 auto v = header("TMap");
477 tobject();
478 mC.string(); // fName
479 auto n = mC.i32();
480 for (int i = 0; i < n; ++i) {
481 auto key = as<std::string>(anyObject());
482 auto value = as<std::string>(anyObject());
483 if (!key || !value) {
484 throw UnsupportedLayout("TMap entry which is not a TObjString pair");
485 }
486 result[*key] = *value;
487 }
488 mC.seek(v.end);
489 return result;
490}
491} // namespace
492
493size_t leafElementSize(char leafClass)
494{
495 switch (leafClass) {
496 case 'O':
497 case 'B':
498 return 1;
499 case 'S':
500 return 2;
501 case 'I':
502 case 'F':
503 return 4;
504 case 'L':
505 case 'D':
506 return 8;
507 }
508 throw UnsupportedLayout(std::string("leaf class TLeaf") + leafClass);
509}
510
511std::map<std::string, std::vector<int>> const& supportedClassVersions()
512{
513 static const std::map<std::string, std::vector<int>> table{
514 {"TObject", {1}},
515 {"TNamed", {1}},
516 {"TObjString", {1}},
517 {"TObjArray", {3}},
518 {"TMap", {3}},
519 {"TBasket", {3}},
520 {"TTree", {20}},
521 {"TBranch", {13}},
522 {"TLeaf", {2}},
523 {"TLeafO", {1}},
524 {"TLeafB", {1}},
525 {"TLeafS", {1}},
526 {"TLeafI", {1}},
527 {"TLeafL", {1}},
528 {"TLeafF", {1}},
529 {"TLeafD", {1}},
530 };
531 return table;
532}
533
534TreeInfo readTreePayload(std::span<const uint8_t> payload, uint16_t keylen, std::string const& file, uint64_t fileOffset)
535{
536 Cursor c{payload, file, fileOffset, keylen};
537 return ObjectReader{c}.tree();
538}
539
540std::map<std::string, std::string> readStringMapPayload(std::span<const uint8_t> payload, uint16_t keylen, std::string const& file, uint64_t fileOffset)
541{
542 Cursor c{payload, file, fileOffset, keylen};
543 return ObjectReader{c}.stringMap();
544}
545
546} // namespace o2::aod::native
unsigned short int uint16_t
unsigned int uint32_t
std::vector< std::string > header
std::vector< long > entries
int32_t i
configStandalone Light OpenGL display display_light Apply smoothing to points Enable Z buffer Highlight links Highlight seeds Highlight sector tracks Highlight final tracks Show individual Show related Highlight grid Show only individual collision Color clusters belonging to track objects Set line Enable drawing TPC data Enable drawing TOF data Enable drawing magnetic field Set field line step count Invert colors configStandalone Heavy OpenGL display display_heavy Show tracks with ITS contribution Show tracks with TOF contribution Enable propagation of loopers Show clusters at nominal x of pad row for early transformed data Split CE tracks when they cross the central Mark clusters Mark adjacent clusters Hide rejected tracks Apply filter on tracks to be displayed Separate increase X h configStandalone Camera window renderer OpenGL display display_camera Orient the camera such that the y axis is always upwards Full Screen MultiSample Anti Downsampling Anti Enable Vertical Sync Target frame or if the backend cannot limit to the refresh Use OpenGL indirect draws to reduce number of draw calls Display h configStandalone Vulkan display display_vulkan Have uniform buffers in host accessible device memory h configStandalone Internal display display_internal Number of updates the Qt GUI may send ahead of the last one the display has before it waits for the display Opacity of the console background Number of console lines the history is shortened to this when it reaches twice the size Time in seconds an info message fades out after setInfoTime h OpenGL display display Font size Do not use Freetype for font Renderer for event Frontend to use for event ROOT macros used as track filter Console script file
Timeframe settings Average distance in cm of events merged into Randomize distance around average distance of merged events Simulate correct bunch interactions instead of placing only the average number of events A value[n] sets TFlen for[n] collisions in Number of bunches per trainsort Number of bunch trains Instantaneous interaction rate Do not simulate border Total number of collisions to be placed in the interior of all time Do not select random but walk over array of events in stride steps h Event generator settings h configStandalone Use CPU for GPU Force usage of the specified GPU device no CPU fallback Continue processing after an error s
Timeframe settings Average distance in cm of events merged into Randomize distance around average distance of merged events Simulate correct bunch interactions instead of placing only the average number of events A value[n] sets TFlen for[n] collisions in Number of bunches per trainsort Number of bunch trains Instantaneous interaction rate Do not simulate border Total number of collisions to be placed in the interior of all time Do not select random but walk over array of events in stride steps h Event generator settings h configStandalone Use CPU for GPU Force usage of the specified GPU device no CPU fallback Continue processing after an error First event to Number of events to Number of iterations to Number of iterations to Number of initial iterations excluded from const char Directory with events to Events directory is and not inside events Show standalone event Run event generator maximum time bin of continuous for triggered for automatic continuous for automatic continuous triggered uint64_t
Timeframe settings Average distance in cm of events merged into Randomize distance around average distance of merged events Simulate correct bunch interactions instead of placing only the average number of events A value[n] sets TFlen for[n] collisions in Number of bunches per trainsort Number of bunch trains Instantaneous interaction rate Do not simulate border Total number of collisions to be placed in the interior of all time Do not select random but walk over array of events in stride steps h Event generator settings h configStandalone Use CPU for GPU Force usage of the specified GPU device no CPU fallback Continue processing after an error First event to Number of events to Number of iterations to Number of iterations to Number of initial iterations excluded from const char e
configStandalone Reconstruction rec_tpc multiplier for the combined cluster track error during track following area in cm for the search of for z only used if decrease removal by when above this local occupancy rowx Shift of TPC revert cluster flag edge bit distance to edge exceeds this ZOffset for secondary multiple of radius max P of electron K BB bands crossing max P of electron p BB bands crossing max P of electron d BB bands crossing max P of electron t BB bands crossing min accepted dEdxMaxTPC of the track Additive extra cluster error for Y2 if edge flag set Additive extra cluster error for Y2 if single set Additive extra cluster error for Y2 if or single set Additive extra cluster error for Z2 if or single set Extra errors to add to track when crossing depending on addErrorsCECrossing Inner portion of y range in sector that is not used in searching for extrapolated track candidates factor2YS for track merging factor2K for track merging Margin in cm of Y position when rejecting edge clusters based on uncorrected track Y Max fraction of shared clusters for tracklet Except pad from cluster finding if total number of charges in a fragment is above this Except pad from cluster finding if number of consecutive charges in a fragment is above this Threshold where a timebin is considered disabling the noisy pad check for that pad Treat signal above this minimum as saturated Smoothing factor for the exponential Highly Ionising Particle tail filter Number of timebins to use for the averaging Add additional custom track errors when crossing relative as fraction of Do N fit passes in final fit of< 0:reject at max -n hits") AddOptionRTC(rejectIFCLowRadiusCluster, uint8_t, 1, "", 0, "Reject clusters that get the IFC mask error during refit") AddOptionRTC(dEdxTruncLow, uint8_t, 2, "", 0, "Low truncation threshold, fraction of 128") AddOptionRTC(dEdxTruncHigh, uint8_t, 77, "", 0, "High truncation threshold, fraction of 128") AddOptionRTC(extrapolationTracking, int8_t, 1, "", 0, "Enable Extrapolation Tracking(prolong tracks to adjacent sectors to find short segments)") AddOptionRTC(disableRefitAttachment, uint8_t, 0, "", 0, "Bitmask to disable certain attachment steps during refit(1:attachment, 2:propagation, 4:loop following, 8:mirroring)") AddOptionRTC(rejectionStrategy, uint8_t, o2::gpu::GPUSettings::RejectionStrategyA, "", 0, "Enable rejection of TPC clusters for compression(0=no, 1=strategy A, 2=strategy B)") AddOptionRTC(mergeLoopersAfterburner, uint8_t, 1, "", 0, "Run afterburner for additional looper merging") AddOptionRTC(compressionTypeMask, uint8_t, o2::gpu::GPUSettings::CompressionFull, "", 0, "TPC Compression mode bits(1=truncate charge/width LSB, 2=differences, 4=track-model)") AddOptionRTC(compressionSortOrder, uint8_t, o2::gpu::GPUSettings::SortTime, "", 0, "Sort order of TPC compression(0=time, 1=pad, 2=Z-time-pad, 3=Z-pad-time, 4=no sorting(use incoming order))") AddOptionRTC(sigBitsCharge, uint8_t, 4, "", 0, "Number of significant bits for TPC cluster charge in compression mode 1") AddOptionRTC(sigBitsWidth, uint8_t, 3, "", 0, "Number of significant bits for TPC cluster width in compression mode 1") AddOptionRTC(dropLoopers, uint8_t, 0, "", 0, "Drop looping tracks starting from second loop") AddOptionRTC(mergerInterpolateErrors, uint8_t, 1, "", 0, "Use interpolation instead of extrapolation for chi2 based cluster rejection") AddOptionRTC(mergerInterpolateRejectAlsoOnCurrentPosition, uint8_t, 1, "", 0, "When using mergerInterpolateErrors, reject based on chi2 twice computed with interpolated and current track position starting from NDF > mergerNonInterpolateRejectMinNDF Merge tracks accross the central electrode Enable PID response Add sub threshold clusters in TPC dEdx computation OR mask of TPC flags that will reject the cluster in alternative dEdx Reject edge clusters based on uncorrected track Y during track fit Increase decrease removal by when on this number of pads from the edge h configStandalone Reconstruction rec_trd Max chi2 for TRD tracklets to be matched to a track Chi2 cut for strict matching mode Number of sigmas for ITS TPC track time error estimate Addition to search road around track prolongation along Y in cm Optimal tracklet rphi resolution in maximum chi2 per attached tracklet for TRD tracks take into account the full likelihood of the slope including exponential tails Tracks with less attached tracklets are discarded after the tracking Post trigger Pile up integration time in BCs fits all iterations but the last one in projections Use material lookup table for TPC refit Apply workarounds to avoid cyclic merge should not be needed tpc dyn configStandalone Processing proc_rtc Replace constant variables static by constexpr expressions Compile RTC in deterministic with NO_FAST_MATH flags and GPUCA_DETERMINISTIC_MODE define Use RTC to optimize GPU code h configStandalone Processing proc_rtctech Use a file lock to serialize access to the cache folder int32_t
std::string countLeaf
Definition Objects.cxx:36
int32_t nEntries
Definition Objects.cxx:40
std::string className
Definition Objects.cxx:33
bool isUnsigned
Definition Objects.cxx:35
uint32_t c
Definition RawData.h:2
uint32_t version
Definition RawData.h:8
StringRef key
std::span< const uint8_t > buffer() const
Definition Cursor.h:42
std::span< const uint8_t > bytes(size_t n)
Definition Cursor.h:60
std::string const & file() const
Definition Cursor.h:101
size_t remaining() const
Definition Cursor.h:41
size_t pos() const
Definition Cursor.h:39
int64_t displacement() const
Definition Cursor.h:40
std::string string()
TString: 1-byte length, or 0xFF followed by a 4-byte length.
Definition Cursor.h:77
void fail(std::string const &what) const
Definition Cursor.h:96
std::string cstring()
NUL-terminated string, as used for class names after kNewClassTag.
Definition Cursor.h:88
void seek(size_t p)
Definition Cursor.h:44
void skip(size_t n)
Definition Cursor.h:51
GLdouble n
Definition glcorearb.h:1982
GLint GLsizei count
Definition glcorearb.h:399
GLuint64EXT * result
Definition glcorearb.h:5662
GLsizeiptr size
Definition glcorearb.h:659
GLuint GLuint end
Definition glcorearb.h:469
const GLdouble * v
Definition glcorearb.h:832
GLuint const GLchar * name
Definition glcorearb.h:781
GLint first
Definition glcorearb.h:399
GLboolean GLboolean GLboolean b
Definition glcorearb.h:1233
GLsizei const GLfloat * value
Definition glcorearb.h:819
GLenum GLsizei GLsizei GLint * values
Definition glcorearb.h:1576
GLenum GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const void * bits
Definition glcorearb.h:4150
GLenum GLenum GLsizei len
Definition glcorearb.h:4232
TreeInfo readTreePayload(std::span< const uint8_t > payload, uint16_t keylen, std::string const &file, uint64_t fileOffset)
Definition Objects.cxx:534
BasketHeader readBasketHeader(Cursor &c)
Definition Cursor.h:144
size_t leafElementSize(char leafClass)
Size in bytes of one value of a leaf class on disk.
Definition Objects.cxx:493
std::map< std::string, std::vector< int > > const & supportedClassVersions()
Definition Objects.cxx:511
std::map< std::string, std::string > readStringMapPayload(std::span< const uint8_t > payload, uint16_t keylen, std::string const &file, uint64_t fileOffset)
Deserializes a TMap of TObjString to TObjString (metaData, parentFiles).
Definition Objects.cxx:540
PlaceholderNode as(Configurable< T > const &v)
void check(const std::vector< std::string > &arguments, const std::vector< ConfigParamSpec > &workflowOptions, const std::vector< DeviceSpec > &deviceSpecs, CheckMatrix &matrix)
std::string to_string(gsl::span< T, Size > span)
Definition common.h:52
void empty(int)
std::unique_ptr< TTree > tree((TTree *) flIn.Get(std::string(o2::base::NameConf::CTFTREENAME).c_str()))