Project
Loading...
Searching...
No Matches
RawFileReaderWorkflow.cxx
Go to the documentation of this file.
1// Copyright 2019-2020 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
22#include "Framework/Task.h"
23#include "Framework/Logger.h"
26
31#include "Headers/DataHeader.h"
33#include "Headers/STFHeader.h"
34#include "Headers/Stack.h"
35
36#include "RawFileReaderWorkflow.h" // not installed
37#include <TStopwatch.h>
38#include <fairmq/Device.h>
39#include <fairmq/Message.h>
40#include <fairmq/Parts.h>
41
42#include <unistd.h>
43#include <algorithm>
44#include <unordered_map>
45#include <cctype>
46#include <string>
47#include <climits>
48#include <regex>
49#include <chrono>
50#include <thread>
51
52using namespace o2::raw;
54
55namespace o2f = o2::framework;
56namespace o2h = o2::header;
57
59{
60 public:
61 explicit RawReaderSpecs(const ReaderInp& rinp);
62 void init(o2f::InitContext& ic) final;
63 void run(o2f::ProcessingContext& ctx) final;
64
65 uint32_t getMinTFID() const { return mMinTFID; }
66 uint32_t getMaxTFID() const { return mMaxTFID; }
67 void setMinMaxTFID(uint32_t mn, uint32_t mx)
68 {
69 mMinTFID = mn;
70 mMaxTFID = mx >= mn ? mx : mn;
71 }
72
73 private:
74 void processDropTF(const std::string& drops);
75
76 int mLoop = 0; // once last TF reached, loop while mLoop>=0
77 uint32_t mTFCounter = 0; // TFId accumulator (accounts for looping)
78 uint32_t mDelayUSec = 0; // Delay in microseconds between TFs
79 uint32_t mMinTFID = 0; // 1st TF to extract
80 uint32_t mMaxTFID = 0xffffffff; // last TF to extrct
81 int mRunNumber = 0; // run number to pass
82 int mVerbosity = 0;
83 int mTFRateLimit = -999;
84 bool mPreferCalcTF = false;
85 size_t mMinSHM = 0;
86 size_t mLoopsDone = 0;
87 size_t mSentSize = 0;
88 size_t mSentMessages = 0;
89 bool mPartPerSP = true; // fill part per superpage
90 bool mSup0xccdb = false; // suppress explicit FLP/DISTSUBTIMEFRAME/0xccdb output
91 std::string mRawChannelName = ""; // name of optional non-DPL channel
92 std::unique_ptr<o2::raw::RawFileReader> mReader; // matching engine
93 std::unordered_map<std::string, std::pair<int, int>> mDropTFMap; // allows to drop certain fraction of TFs
94 TStopwatch mTimer;
95};
96
97//___________________________________________________________
99 : mLoop(rinp.loop < 0 ? INT_MAX : (rinp.loop < 1 ? 1 : rinp.loop)), mDelayUSec(rinp.delay_us), mMinTFID(rinp.minTF), mMaxTFID(rinp.maxTF), mPartPerSP(rinp.partPerSP), mSup0xccdb(rinp.sup0xccdb), mReader(std::make_unique<o2::raw::RawFileReader>(rinp.inifile, 0, rinp.bufferSize, rinp.onlyDet)), mRawChannelName(rinp.rawChannelConfig), mPreferCalcTF(rinp.preferCalcTF), mMinSHM(rinp.minSHM)
100{
101 mReader->setCheckErrors(rinp.errMap);
102 mReader->setMaxTFToRead(rinp.maxTF);
103 mReader->setNominalSPageSize(rinp.spSize);
104 mReader->setCacheData(rinp.cache);
105 mReader->setTFAutodetect(rinp.autodetectTF0 ? RawFileReader::FirstTFDetection::Pending : RawFileReader::FirstTFDetection::Disabled);
106 mReader->setPreferCalculatedTFStart(rinp.preferCalcTF);
107 LOG(info) << "Will preprocess files with buffer size of " << rinp.bufferSize << " bytes";
108 LOG(info) << "Number of loops over whole data requested: " << mLoop;
109 mTimer.Stop();
110 mTimer.Reset();
111 processDropTF(rinp.dropTF);
112}
113
114//___________________________________________________________
115void RawReaderSpecs::processDropTF(const std::string& dropTF)
116{
117 static const std::regex delimDet(";");
118 if (dropTF.empty() || dropTF == "none") {
119 return;
120 }
121 std::sregex_token_iterator iter(dropTF.begin(), dropTF.end(), delimDet, -1), end;
122 for (; iter != end; ++iter) {
123 std::string sdet = iter->str();
124 if (sdet.length() < 5 || sdet[3] != ',') {
125 throw std::runtime_error(fmt::format("Wrong dropTF argument {} in {}", sdet, dropTF));
126 }
127 std::string detName = sdet.substr(0, 3);
128 o2::detectors::DetID det(detName.c_str()); // make sure this is a valid detector
129 std::string sdetArg = sdet.substr(4, sdet.length());
130 int modV = 0, rej = 0, posrej = sdetArg.find(',');
131 if (posrej != std::string::npos) {
132 modV = std::stoi(sdetArg.substr(0, posrej));
133 rej = std::stoi(sdetArg.substr(++posrej, sdetArg.length()));
134 } else {
135 modV = std::stoi(sdetArg);
136 }
137 if (modV < 1 || rej < 0 || rej >= modV) {
138 throw std::runtime_error(fmt::format("Wrong dropTF argument {}, 1st number must be > than 2nd", sdet));
139 }
140 mDropTFMap[detName] = {modV, rej};
141 LOG(info) << " Will drop TF for detector " << detName << " if (TF_ID%" << modV << ")==" << rej;
142 }
143}
144
145//___________________________________________________________
147{
148 assert(mReader);
149 mTimer.Start();
150 mTimer.Stop();
151 mVerbosity = ic.options().get<int>("verbosity-level");
152 mRunNumber = ic.options().get<int>("run-number");
153 mReader->setVerbosity(mVerbosity);
154 mReader->init();
155 if (mMaxTFID >= mReader->getNTimeFrames()) {
156 mMaxTFID = mReader->getNTimeFrames() ? mReader->getNTimeFrames() - 1 : 0;
157 }
158 const auto& hbfU = HBFUtils::Instance();
159 if (!hbfU.startTime) {
160 hbfU.setValue("HBFUtils.startTime", std::to_string(std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now().time_since_epoch()).count()));
161 LOG(warning) << "Run start time is not provided via HBFUtils.startTime, will use now() = " << hbfU.startTime << " ms.";
162 }
163 if (mRunNumber == 0 && hbfU.runNumber > 0) {
164 mRunNumber = hbfU.runNumber;
165 }
166}
167
168//___________________________________________________________
170{
171 assert(mReader);
172 auto tTotStart = mTimer.CpuTime();
173 mTimer.Start(false);
174 auto device = ctx.services().get<o2f::RawDeviceService>().device();
175 assert(device);
176 if (mTFRateLimit == -999) {
177 mTFRateLimit = std::stoi(device->fConfig->GetValue<std::string>("timeframes-rate-limit"));
178 }
179 auto findOutputChannel = [&ctx, this](o2h::DataHeader& h) {
180 if (!this->mRawChannelName.empty()) {
181 return std::string{this->mRawChannelName};
182 } else {
183 auto outputRoutes = ctx.services().get<o2f::RawDeviceService>().spec().outputs;
184 for (auto& oroute : outputRoutes) {
185 LOG(debug) << "comparing with matcher to route " << oroute.matcher << " TSlice:" << oroute.timeslice;
186 if (o2f::DataSpecUtils::match(oroute.matcher, h.dataOrigin, h.dataDescription, h.subSpecification) && ((mTFCounter % oroute.maxTimeslices) == oroute.timeslice)) {
187 LOG(debug) << "picking the route:" << o2f::DataSpecUtils::describe(oroute.matcher) << " channel " << oroute.channel;
188 return std::string{oroute.channel};
189 }
190 }
191 }
192 LOGP(error, "Failed to find output channel for {}/{}/{} @ timeslice {}", h.dataOrigin, h.dataDescription, h.subSpecification, h.tfCounter);
193 auto outputRoutes = ctx.services().get<o2f::RawDeviceService>().spec().outputs;
194 for (auto& oroute : outputRoutes) {
195 LOGP(info, "Available output routes: {} channel: {}", o2f::DataSpecUtils::describe(oroute.matcher), oroute.channel);
196 }
197 return std::string{};
198 };
199
200 size_t tfNParts = 0, tfSize = 0;
201 std::unordered_map<std::string, std::unique_ptr<fair::mq::Parts>> messagesPerRoute;
202
203 auto addPart = [&messagesPerRoute, &tfNParts, &tfSize](fair::mq::MessagePtr hd, fair::mq::MessagePtr pl, const std::string& fairMQChannel) {
204 fair::mq::Parts* parts = nullptr;
205 parts = messagesPerRoute[fairMQChannel].get(); // fair::mq::Parts*
206 if (!parts) {
207 messagesPerRoute[fairMQChannel] = std::make_unique<fair::mq::Parts>();
208 parts = messagesPerRoute[fairMQChannel].get();
209 }
210 tfSize += pl->GetSize();
211 tfNParts++;
212 parts->AddPart(std::move(hd));
213 parts->AddPart(std::move(pl));
214 };
215
216 // clean-up before reading next TF
217 auto tfID = mReader->getNextTFToRead();
218 int nlinks = mReader->getNLinks();
219
220 if (tfID < mMinTFID) {
221 tfID = mMinTFID;
222 }
223 mReader->setNextTFToRead(tfID);
224 std::vector<RawFileReader::PartStat> partsSP;
225
226 static o2f::RateLimiter limiter;
227 limiter.check(ctx, mTFRateLimit, mMinSHM);
228
229 // read next time frame
230 LOG(info) << "Reading TF#" << mTFCounter << " (" << tfID << " at iteration " << mLoopsDone << ')';
231 o2::header::Stack dummyStack{o2h::DataHeader{}, o2f::DataProcessingHeader{0}}; // dummy stack to just to get stack size
232 auto hstackSize = dummyStack.size();
233
234 uint32_t firstOrbit = 0;
235 uint64_t creationTime = 0;
236 const auto& hbfU = HBFUtils::Instance();
237
238 for (int il = 0; il < nlinks; il++) {
239 auto& link = mReader->getLink(il);
240
241 if (!mDropTFMap.empty()) { // some TFs should be dropped
242 auto res = mDropTFMap.find(link.origin.str);
243 if (res != mDropTFMap.end() && (mTFCounter % res->second.first) == res->second.second) {
244 LOG(info) << "Dropping " << mTFCounter << " for " << link.origin.str << "/" << link.description.str << "/" << link.subspec;
245 continue; // drop the data
246 }
247 }
248 if (!link.rewindToTF(tfID)) {
249 continue; // this link has no data for wanted TF
250 }
251
252 o2h::DataHeader hdrTmpl(link.description, link.origin, link.subspec); // template with 0 size
253 int nParts = mPartPerSP ? link.getNextTFSuperPagesStat(partsSP) : link.getNHBFinTF();
255 hdrTmpl.splitPayloadParts = nParts;
256 hdrTmpl.tfCounter = mTFCounter;
257 hdrTmpl.runNumber = mRunNumber;
258 if (mVerbosity > 1) {
259 LOG(info) << link.describe() << " will read " << nParts << " HBFs starting from block " << link.nextBlock2Read;
260 }
261 const auto fmqChannel = findOutputChannel(hdrTmpl);
262 if (fmqChannel.empty()) { // no output channel
263 continue;
264 }
265
266 auto fmqFactory = device->GetChannel(fmqChannel, 0).Transport();
267 while (hdrTmpl.splitPayloadIndex < hdrTmpl.splitPayloadParts) {
268 hdrTmpl.payloadSize = mPartPerSP ? partsSP[hdrTmpl.splitPayloadIndex].size : link.getNextHBFSize();
269 auto hdMessage = fmqFactory->CreateMessage(hstackSize, fair::mq::Alignment{64});
270 auto plMessage = fmqFactory->CreateMessage(hdrTmpl.payloadSize, fair::mq::Alignment{64});
271 auto bread = mPartPerSP ? link.readNextSuperPage(reinterpret_cast<char*>(plMessage->GetData()), &partsSP[hdrTmpl.splitPayloadIndex]) : link.readNextHBF(reinterpret_cast<char*>(plMessage->GetData()));
272 if (bread != hdrTmpl.payloadSize) {
273 LOG(error) << "Link " << il << " read " << bread << " bytes instead of " << hdrTmpl.payloadSize
274 << " expected in TF=" << mTFCounter << " part=" << hdrTmpl.splitPayloadIndex;
275 }
276 // check if the RDH to send corresponds to expected orbit
277 if (hdrTmpl.splitPayloadIndex == 0) {
278 auto ir = o2::raw::RDHUtils::getHeartBeatIR(plMessage->GetData());
279 auto tfid = hbfU.getTF(ir);
280 firstOrbit = hdrTmpl.firstTForbit = (mPreferCalcTF || !link.cruDetector) ? hbfU.getIRTF(tfid).orbit : ir.orbit; // will be picked for the following parts
281 creationTime = hbfU.getTFTimeStamp({0, firstOrbit});
282 }
283 o2::header::Stack headerStack{hdrTmpl, o2f::DataProcessingHeader{mTFCounter, 1, creationTime}};
284 memcpy(hdMessage->GetData(), headerStack.data(), headerStack.size());
285 hdrTmpl.splitPayloadIndex++; // prepare for next
286
287 addPart(std::move(hdMessage), std::move(plMessage), fmqChannel);
288 }
289 LOGF(debug, "Added %d parts for TF#%d(%d in iteration %d) of %s/%s/0x%u", hdrTmpl.splitPayloadParts, mTFCounter, tfID,
290 mLoopsDone, link.origin.as<std::string>(), link.description.as<std::string>(), link.subspec);
291 }
292
293 auto& timingInfo = ctx.services().get<o2f::TimingInfo>();
294 timingInfo.firstTForbit = firstOrbit;
295 timingInfo.creation = creationTime;
296 timingInfo.tfCounter = mTFCounter;
297 timingInfo.runNumber = mRunNumber;
298
299 // send sTF acknowledge message
300 unsigned stfSS[2] = {0, 0xccdb};
301 for (int iss = 0; iss < (mSup0xccdb ? 1 : 2); iss++) {
302 o2::header::STFHeader stfHeader{mTFCounter, firstOrbit, 0};
304 stfDistDataHeader.runNumber = mRunNumber;
306 stfDistDataHeader.firstTForbit = stfHeader.firstOrbit;
307 stfDistDataHeader.tfCounter = mTFCounter;
308 const auto fmqChannel = findOutputChannel(stfDistDataHeader);
309 if (!fmqChannel.empty()) { // no output channel
310 auto fmqFactory = device->GetChannel(fmqChannel, 0).Transport();
311 o2::header::Stack headerStackSTF{stfDistDataHeader, o2f::DataProcessingHeader{mTFCounter, 1, creationTime}};
312 auto hdMessageSTF = fmqFactory->CreateMessage(hstackSize, fair::mq::Alignment{64});
313 auto plMessageSTF = fmqFactory->CreateMessage(stfDistDataHeader.payloadSize, fair::mq::Alignment{64});
314 memcpy(hdMessageSTF->GetData(), headerStackSTF.data(), headerStackSTF.size());
315 memcpy(plMessageSTF->GetData(), &stfHeader, sizeof(o2::header::STFHeader));
316 addPart(std::move(hdMessageSTF), std::move(plMessageSTF), fmqChannel);
317 }
318 }
319
320 if (mTFCounter) { // delay sending
321 std::this_thread::sleep_for(std::chrono::microseconds((size_t)mDelayUSec));
322 }
323 bool sentSomething = false;
324 for (auto& msgIt : messagesPerRoute) {
325 LOG(info) << "Sending " << msgIt.second->Size() / 2 << " parts to channel " << msgIt.first;
326 device->Send(*msgIt.second.get(), msgIt.first);
327 sentSomething = msgIt.second->Size() > 0;
328 }
329 if (sentSomething) {
330 ctx.services().get<o2f::MessageContext>().fakeDispatch();
331 }
332
333 mTimer.Stop();
334
335 LOGP(info, "Sent payload of {} bytes in {} parts in {} messages for TF#{} firstTForbit={} timeStamp={} | Timing: {}", tfSize, tfNParts,
336 messagesPerRoute.size(), mTFCounter, firstOrbit, creationTime, mTimer.CpuTime() - tTotStart);
337
338 mSentSize += tfSize;
339 mSentMessages += tfNParts;
340 mReader->setNextTFToRead(++tfID);
341 ++mTFCounter;
342 if (tfID > mMaxTFID || mReader->isProcessingStopped()) {
343 if (!mReader->isProcessingStopped() && !mReader->isEmpty() && --mLoop) {
344 mLoopsDone++;
345 mReader->setNextTFToRead(tfID = 0);
346 LOG(info) << "Shall start new loop " << mLoopsDone << " from the beginning of data";
347 } else {
348 if (!mRawChannelName.empty()) { // send endOfStream message to raw channel
349 o2f::SourceInfoHeader exitHdr;
350 exitHdr.state = o2f::InputChannelState::Completed;
352 try {
353 dh.runNumber = strtoul(device->fConfig->GetProperty<std::string>("runNumber", "").c_str(), nullptr, 10);
354 } catch (...) {
355 }
356 const auto exitStack = o2::header::Stack(dh, o2f::DataProcessingHeader(), exitHdr);
357 auto fmqFactory = device->GetChannel(mRawChannelName, 0).Transport();
358 auto hdEOSMessage = fmqFactory->CreateMessage(exitStack.size(), fair::mq::Alignment{64});
359 auto plEOSMessage = fmqFactory->CreateMessage(0, fair::mq::Alignment{64});
360 memcpy(hdEOSMessage->GetData(), exitStack.data(), exitStack.size());
361 fair::mq::Parts eosMsg;
362 eosMsg.AddPart(std::move(hdEOSMessage));
363 eosMsg.AddPart(std::move(plEOSMessage));
364 device->Send(eosMsg, mRawChannelName);
365 LOG(info) << "Sent EoS message to " << mRawChannelName;
366 } else {
367 ctx.services().get<o2f::ControlService>().endOfStream();
368 }
369 ctx.services().get<o2f::ControlService>().readyToQuit(o2f::QuitRequest::Me);
370 mTimer.Stop();
371 LOGP(info, "Finished: payload of {} bytes in {} messages sent for {} TFs, total timing: Real:{:3f}/CPU:{:3f}", mSentSize, mSentMessages, mTFCounter, mTimer.RealTime(), mTimer.CpuTime());
372 }
373 }
374}
375
376//_________________________________________________________
378{
379 // check which inputs are present in files to read
381 spec.name = "raw-file-reader";
382 std::string rawChannelName = "";
383 if (rinp.rawChannelConfig.empty()) {
384 if (!rinp.inifile.empty()) {
385 auto conf = o2::raw::RawFileReader::parseInput(rinp.inifile, rinp.onlyDet);
386 for (const auto& entry : conf) {
387 const auto& ordescard = entry.first;
388 if (!entry.second.empty()) { // origin and decription for files to process
389 spec.outputs.emplace_back(o2f::OutputSpec(o2f::ConcreteDataTypeMatcher{std::get<0>(ordescard), std::get<1>(ordescard)}));
390 }
391 }
392 }
393 // add output for DISTSUBTIMEFRAME
395 if (!rinp.sup0xccdb) {
396 spec.outputs.emplace_back(o2f::OutputSpec{{"stfDistCCDB"}, o2::header::gDataOriginFLP, o2::header::gDataDescriptionDISTSTF, 0xccdb}); // will be added automatically
397 }
398 if (!rinp.metricChannel.empty()) {
399 spec.options.emplace_back(o2f::ConfigParamSpec{"channel-config", o2f::VariantType::String, rinp.metricChannel, {"Out-of-band channel config for TF throttling"}});
400 }
401 } else {
402 auto nameStart = rinp.rawChannelConfig.find("name=");
403 if (nameStart == std::string::npos) {
404 throw std::runtime_error("raw channel name is not provided");
405 }
406 nameStart += strlen("name=");
407 auto nameEnd = rinp.rawChannelConfig.find(",", nameStart + 1);
408 if (nameEnd == std::string::npos) {
409 nameEnd = rinp.rawChannelConfig.size();
410 }
411 spec.options.emplace_back(o2f::ConfigParamSpec{"channel-config", o2f::VariantType::String, rinp.rawChannelConfig, {"Out-of-band channel config"}});
412 rinp.rawChannelConfig = rinp.rawChannelConfig.substr(nameStart, nameEnd - nameStart);
413 if (!rinp.metricChannel.empty()) {
414 LOGP(alarm, "Cannot apply TF rate limiting when publishing to raw channel, limiting must be applied on the level of the input raw proxy");
415 LOGP(alarm, R"(To avoid reader filling shm buffer use "--shm-throw-bad-alloc 0 --shm-segment-id 2")");
416 }
417 LOG(info) << "Will send output to non-DPL channel " << rinp.rawChannelConfig;
418 }
419
420 spec.algorithm = o2f::adaptFromTask<RawReaderSpecs>(rinp);
421 spec.options.emplace_back(o2f::ConfigParamSpec{"verbosity-level", o2f::VariantType::Int, 0, {"verbosity level"}});
422 spec.options.emplace_back(o2f::ConfigParamSpec{"run-number", o2f::VariantType::Int, 0, {"impose run number"}});
423
424 return spec;
425}
426
428{
429 o2f::WorkflowSpec specs;
430 specs.emplace_back(getReaderSpec(rinp));
431 return specs;
432}
std::ostringstream debug
unsigned int uint32_t
o2::raw::RawFileWriter * raw
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
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 Print launch bounds used for RTC code as debugging for exit after Allow RTC with slave GPUReconstruction instances with optConstexpr and optSpecialcode Maximum number of RTC cache files per backend in the cache the oldest are Prepend RTC compilation commands by this string Load a parameter object containing the launch bounds from a file h configStandalone Processing proc_param TPC Cluster Z Error Parameterization h configStandalone Processing settings for neural network proc_nn std::string Specify inference device(cpu(default), rocm, cuda)") AddOption(nnInferenceDeviceId
char error[CURL_ERROR_SIZE]
uint32_t res
Definition RawData.h:0
o2f::DataProcessorSpec getReaderSpec(ReaderInp rinp)
Reader for (multiple) raw data files.
Class for time synchronization of RawReader instances.
void run(o2f::ProcessingContext &ctx) final
void setMinMaxTFID(uint32_t mn, uint32_t mx)
RawReaderSpecs(const ReaderInp &rinp)
uint32_t getMaxTFID() const
void init(o2f::InitContext &ic) final
uint32_t getMinTFID() const
Static class with identifiers, bitmasks and names for ALICE detectors.
Definition DetID.h:60
ConfigParamRegistry const & options()
Definition InitContext.h:33
int check(ProcessingContext &ctx, int maxInFlight, size_t minSHM)
virtual void endOfStream(EndOfStreamContext &context)
This is invoked whenever we have an EndOfStream event.
Definition Task.h:43
static InputsMap parseInput(const std::string &confUri, const std::string &onlyDet={}, bool verbose=false)
GLint GLsizei count
Definition glcorearb.h:399
GLuint GLuint end
Definition glcorearb.h:469
constexpr o2::header::DataOrigin gDataOriginFLP
Definition DataHeader.h:565
constexpr o2::header::DataDescription gDataDescriptionInfo
Definition DataHeader.h:605
constexpr o2::header::DataOrigin gDataOriginAny
Definition DataHeader.h:563
constexpr o2::header::DataDescription gDataDescriptionDISTSTF
Definition DataHeader.h:608
Defining ITS Vertex explicitly as messageable.
Definition Cartesian.h:288
std::vector< DataProcessorSpec > WorkflowSpec
O2 data header classes and API, v0.1.
Definition DetID.h:51
constexpr o2::header::SerializationMethod gSerializationMethodNone
Definition DataHeader.h:330
framework::WorkflowSpec getRawFileReaderWorkflow(ReaderInp &rinp)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
std::string to_string(gsl::span< T, Size > span)
Definition common.h:52
uint32_t orbit
LHC orbit.
a BaseHeader with state information from the source
constexpr uint32_t size() const noexcept
Definition DataHeader.h:424
the main header struct
Definition DataHeader.h:623
SplitPayloadPartsType splitPayloadParts
Definition DataHeader.h:651
TFCounterType tfCounter
Definition DataHeader.h:684
SerializationMethod payloadSerializationMethod
Definition DataHeader.h:656
TForbitType firstTForbit
Definition DataHeader.h:679
PayloadSizeType payloadSize
Definition DataHeader.h:671
RunNumberType runNumber
Definition DataHeader.h:689
SplitPayloadIndexType splitPayloadIndex
Definition DataHeader.h:666
a move-only header stack with serialized headers This is the flat buffer where all the headers in a m...
Definition Stack.h:33
std::string rawChannelConfig
std::string inifile
std::string onlyDet
std::string metricChannel
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"
o2::InteractionRecord ir(0, 0)