117 double PercentDone = 0;
120 cout <<
"----------------------------------------------------------" << endl
123 cout <<
"New Cycle" << endl;
124 cout <<
"Old Folder Size = " << mFolderNames.size() << endl;
127 mNowFolderNames =
GetFName(mWorkDir);
128 cout <<
"Now NFolder = " << mNowFolderNames.size() << endl;
129 for (
size_t i = 0;
i < mNowFolderNames.size();
i++) {
130 mNowFileNames.push_back(
GetFName(mNowFolderNames[
i]));
134 std::set_difference(mNowFolderNames.begin(), mNowFolderNames.end(), mFolderNames.begin(), mFolderNames.end(), std::inserter(mDiffFolderName, mDiffFolderName.begin()));
136 cout <<
"Difference Size Between New and Initial Runs = " << mDiffFolderName.size() << endl;
139 if (mDiffFolderName.size() == 0) {
140 cout <<
"No New Run -- No Need to Reset" << endl;
146 if (mDiffFolderName.size() > 0) {
147 cout <<
"New Run Started -- Reset All Histograms" << endl;
150 for (
int i = 0;
i < sNError;
i++) {
156 std::ifstream RunFileType(sRunTypeFileName);
157 RunFileType >> mRunType;
159 LOG(
debug) <<
"NEW CONFIG: RunFileType = " << mRunType;
161 if (mRunType ==
"FakeHitRate") {
162 std::ifstream EventPush(sFakeRateDefConfig);
163 EventPush >> mEventPerPush >> mTrackError >> mWorkDir;
166 if (mRunType ==
"ThresholdScan") {
167 std::ifstream EventPush(sThresholdDefConfig);
168 EventPush >> mEventPerPush >> mTrackError >> mWorkDir;
171 LOG(
debug) <<
"NEW CONFIG: EventPerPush = " << mEventPerPush <<
" TrackError = " << mTrackError <<
" mWorkDir = " << mWorkDir;
172 LOG(
debug) <<
"DONE Reset Histogram Decision";
175 LOG(
debug) <<
"Start Creating New Now Vector";
179 for (
size_t i = 0;
i < mFolderNames.size();
i++) {
180 std::set_difference(mNowFileNames[
i].begin(), mNowFileNames[
i].
end(), mFileNames[
i].begin(), mFileNames[
i].
end(), std::inserter(mDiffFileNamePush, mDiffFileNamePush.begin()));
181 mDiffFileNames.push_back(mDiffFileNamePush);
182 cout <<
"Difference File Size Between New and Initial Runs " << mDiffFileNames[
i].size() << endl;
184 mDiffFileNamePush.clear();
187 LOG(
debug) <<
"DONE GRABING Existing";
190 for (
size_t i = mFolderNames.size();
i < mNowFolderNames.size();
i++) {
191 mDiffFileNames.push_back(mNowFileNames[
i]);
192 cout <<
"New File Size Between New and Initial Runs " << mDiffFileNames[
i].size() << endl;
195 LOG(
debug) <<
"Total New Files = " << mDiffFileNames.size();
197 LOG(
debug) <<
"DONE Creating Difference";
199 LOG(
debug) <<
"mDiffFileNames Size = " << mDiffFileNames.size();
205 for (
size_t i = 0;
i < mNowFolderNames.size();
i++) {
207 LOG(
debug) <<
"i = " <<
i <<
" mDiffFileNames[i].size() = " << mDiffFileNames[
i].size();
211 size_t pos = mNowFolderNames[
i].find_last_of(
"/");
213 if (
pos != std::string::npos) {
214 mRunID = mNowFolderNames[
i].substr(
pos + 1);
217 LOG(
debug) <<
"FileDone = " << mFileDone << endl;
221 if (mDiffFileNames[
i].
size() > 0 && mFileDone == 1) {
223 mFileRemain = mDiffFileNames[
i].size();
225 cout <<
"RunID = " << mRunID << endl;
226 cout <<
"File Location = " << mDiffFileNames[
i][0] << endl;
229 size_t last_index1 = mRunID.find_last_not_of(
"0123456789");
230 string RunIDS = mRunID.substr(last_index1 + 1);
234 pos = mDiffFileNames[
i][0].find_last_of(
"/");
235 if (
pos != std::string::npos) {
236 FileIDS = mDiffFileNames[
i][0].substr(
pos + 1);
239 cout <<
"Before FileIDS = " << FileIDS << endl;
241 size_t last_index2 = FileIDS.find_last_not_of(
"0123456789");
242 FileIDS = FileIDS.substr(last_index2 + 1);
245 mRunNumber = std::stoi(RunIDS);
246 mFileID = std::stoi(FileIDS);
248 ofstream fout(Form(
"ErrorData/ErrorLogRun%d_File%d.dat", mRunNumber, mFileID));
249 fout <<
" START OF ERROR REPORT For Run " << mRunNumber <<
" File " << mFileID << endl;
252 mInputName = mDiffFileNames[
i][0];
254 mEventRegistered = 0;
255 LOG(
debug) <<
"mInputName = " << mInputName;
260 if (mNewFileInj == 1) {
261 cout <<
"New File Injected, Now Updating the Canvas and Light" << endl;
262 mDigitsTest.emplace_back(0, 0, 0, 0);
263 mMultiDigitsTest.push_back(mDigitsTest[0]);
264 mErrorsVecTest.push_back(mErrors);
266 mFileInfo = mFileDone + mFileRemain * 10;
273 mErrorsVecTest.clear();
275 mMultiDigitsTest.clear();
276 if (mFolderNames.size() < mNowFolderNames.size()) {
277 mFileNames.push_back(NewNextFold);
279 cout <<
"Done!!! You should see the Canvas Updated " << endl;
298 auto& rawErrorReader =
reinterpret_cast<RawReader&
>(mRawReader);
301 if (NChip < NChipMax) {
307 const auto& statRU = rawErrorReader.getRUDecodingStatSW(ruInfo->idSW);
310 int pixelSize = mChipData->
getData().size();
312 NEvent = statRU->nPackets;
314 mTotalPixelSize = mTotalPixelSize + pixelSize;
316 if (NEvent > (mEventRegistered + 1) * mEventPerPush) {
318 if (mTotalPixelSize < mMaxPixelSize || mTotalPixelSize == mMaxPixelSize) {
319 cout <<
"Digit OK for 1 Push" << endl;
320 mNDigits.push_back(mTotalPixelSize);
321 mEventRegistered = mEventRegistered + 1;
322 mErrorsVec.push_back(mErrors);
323 cout <<
"TotalPixelSize = " << mTotalPixelSize <<
" Pushed" << endl;
326 if (mTotalPixelSize > mMaxPixelSize) {
327 cout <<
"Digit Spilt into 2 Pusbhes" << endl;
328 mNDigits.push_back(mTotalPixelSize / 2);
329 mNDigits.push_back(mTotalPixelSize / 2);
330 mErrorsVec.push_back(mErrors);
331 mErrorsVec.push_back(mErrors);
332 mEventRegistered = mEventRegistered + 1;
333 cout <<
"TotalPixelSize = " << mTotalPixelSize <<
" Pushed" << endl;
341 if (NEvent % 1000000 == 0 && TimePrint == 0) {
342 cout <<
"Event Number = " << NEvent << endl;
346 if (NEvent % 100000 != 0) {
351 if (mErrors[
i] < 4294967295) {
352 mErrors[
i] = mErrors[
i] + (int)statRU->errorCounts[
i];
356 if (mTrackError == 1) {
357 if (NEventPre != NEvent) {
361 if ((
int)statRU->errorCounts[
i] > 0) {
366 if (ErrorDetcted == 1) {
367 fout <<
"Event Number = " << NEvent << endl;
368 fout <<
" ------------------------------------------------" << endl;
370 if (statRU->errorCounts[
i]) {
374 fout <<
" ------------------------------------------------" << endl;
381 for (
auto& pixel :
pixels) {
382 if (Index < IndexMax) {
385 int col = pixel.getCol();
386 int row = pixel.getRow();
387 mDigits.emplace_back(ChipID,
row,
col, 0);
394 cout <<
"Final TotalPixelSize = " << mTotalPixelSize << endl;
395 mNDigits.push_back(mTotalPixelSize);
396 mErrorsVec.push_back(mErrors);
397 LOG(
debug) <<
"Run " << mNowFolderNames[
i] <<
" File " << mInputName <<
" Integrated Raw Pixel Pushed " << mDigits.size();
398 if (mFolderNames.size() < mNowFolderNames.size()) {
399 mFileNames.push_back(NewNextFold);
401 mFileNames[
i].push_back(mInputName);
402 fout <<
" END OF ERROR REPORT " << endl;
408 LOG(
debug) <<
"mIndexPush Before = " << mIndexPush <<
" mDigits.size() = " << mDigits.size();
410 if (mDigits.size() > 0) {
411 PercentDone = double(mIndexPush) / double(mDigits.size());
413 cout <<
"Percentage Processed = " << Form(
"%.2f", 100. * PercentDone) << endl;
415 if (mIndexPush < mDigits.size()) {
416 for (
int i = 0;
i < mNDigits[
j];
i++) {
417 mMultiDigits.push_back(mDigits[mIndexPush +
i]);
419 LOG(
debug) <<
"j = " <<
j <<
" NDgits = " << mNDigits[
j] <<
" mMultiDigits Pushed = " << mMultiDigits.size();
420 LOG(
debug) <<
"i = " << 10 <<
" ErrorShould = " << mErrors[10] <<
" ErrorInjected = " << mErrorsVec[
j][10];
423 cout <<
"RunIDS = " << mRunNumber <<
" FileIDS = " << mFileID << endl;
429 mIndexPushEx = mIndexPush + mNDigits[
j];
430 LOG(
debug) <<
"IndexPushEx = " << mIndexPushEx <<
" mDigits.size() " << mDigits.size();
431 if (mIndexPushEx > mDigits.size() - 5) {
434 LOG(
debug) <<
"FileDone = " << mFileDone;
435 LOG(
debug) <<
"FileRemain = " << mFileRemain;
437 mFileInfo = mFileDone + mFileRemain * 10;
441 LOG(
debug) <<
"mIndexPush = " << mIndexPush <<
" Chip ID Pushing " << mDigits[mIndexPush].getChipIndex();
445 mMultiDigits.clear();
446 mIndexPush = mIndexPush + mNDigits[
j];
450 LOG(
debug) <<
"mIndexPush After = " << mIndexPush;
464 mFolderNames.clear();
467 mFolderNames = mNowFolderNames;
470 mNowFolderNames.clear();
471 mNowFileNames.clear();
472 mDiffFileNames.clear();
473 mDiffFolderName.clear();
475 LOG(
debug) <<
"Pushing Reset Histogram Decision";
477 cout <<
"Resetting Pushing Things" << endl;
480 if (mIndexPush > mDigits.size() - 5) {
495 cout <<
"Start Sleeping" << endl;
507 std::this_thread::sleep_for(std::chrono::milliseconds(1000));
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 folder
DataAllocator & outputs()
The data allocator is used to allocate memory for the output data.