You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DataInputDescriptor::DataInputDescriptor(bool alienSupport, int level, o2::monitoring::Monitoring* monitoring, int allowedParentLevel, std::string parentFileReplacement)
DataInputDescriptor* DataInputDescriptor::getParentFile(int counter, int numTF, std::string treename)
@@ -221,17 +247,19 @@ DataInputDescriptor* DataInputDescriptor::getParentFile(int counter, int numTF,
221
247
// This file has no parent map
222
248
returnnullptr;
223
249
}
224
-
auto folderName = (mfilenames[counter]->listOfTimeFrameKeys)[numTF];
250
+
auto folderName = fmt::format("DF_{}", mfilenames[counter]->listOfTimeFrameNumbers[numTF]);
225
251
auto parentFileName = (TObjString*)mParentFileMap->GetValue(folderName.c_str());
252
+
// The current DF is not found in the parent map (this should not happen and is a fatal error)
253
+
auto rootFS = std::dynamic_pointer_cast<TFileFileSystem>(mCurrentFilesystem);
226
254
if (!parentFileName) {
227
-
// The current DF is not found in the parent map (this should not happen and is a fatal error)
228
-
throwstd::runtime_error(fmt::format(R"(parent file map exists but does not contain the current DF "{}" in file "{}")", folderName.c_str(), mcurrentFile->GetName()));
255
+
throwstd::runtime_error(fmt::format(R"(parent file map exists but does not contain the current DF "{}" in file "{}")", folderName.c_str(), rootFS->GetFile()->GetName()));
229
256
returnnullptr;
230
257
}
231
258
232
259
if (mParentFile) {
233
260
// Is this still the corresponding to the correct file?
234
-
if (parentFileName->GetString().CompareTo(mParentFile->mcurrentFile->GetName()) == 0) {
261
+
auto parentRootFS = std::dynamic_pointer_cast<TFileFileSystem>(mParentFile->mCurrentFilesystem);
262
+
if (parentFileName->GetString().CompareTo(parentRootFS->GetFile()->GetName()) == 0) {
235
263
returnmParentFile;
236
264
} else {
237
265
mParentFile->closeInputFile();
@@ -241,7 +269,8 @@ DataInputDescriptor* DataInputDescriptor::getParentFile(int counter, int numTF,
241
269
}
242
270
243
271
if (mLevel == mAllowedParentLevel) {
244
-
throwstd::runtime_error(fmt::format(R"(while looking for tree "{}", the parent file was requested but we are already at level {} of maximal allowed level {} for DF "{}" in file "{}")", treename.c_str(), mLevel, mAllowedParentLevel, folderName.c_str(), mcurrentFile->GetName()));
272
+
throwstd::runtime_error(fmt::format(R"(while looking for tree "{}", the parent file was requested but we are already at level {} of maximal allowed level {} for DF "{}" in file "{}")", treename.c_str(), mLevel, mAllowedParentLevel, folderName.c_str(),
273
+
rootFS->GetFile()->GetName()));
245
274
}
246
275
247
276
LOGP(info, "Opening parent file {} for DF {}", parentFileName->GetString().Data(), folderName.c_str());
auto datasetSchema = std::make_shared<arrow::Schema>(fields);
428
+
429
+
auto fragment = format->MakeFragment(fullpath, {}, *physicalSchema);
368
430
369
-
if (!tree) {
370
-
LOGP(debug, "Could not find tree {}. Trying in parent file.", fullpath.c_str());
431
+
if (!fragment.ok()) {
432
+
LOGP(debug, "Could not find tree {}. Trying in parent file.", fullpath.path());
371
433
auto parentFile = getParentFile(counter, numTF, treename);
372
434
if (parentFile != nullptr) {
373
-
int parentNumTF = parentFile->findDFNumber(0, fileAndFolder.folderName);
435
+
int parentNumTF = parentFile->findDFNumber(0, folder.path());
374
436
if (parentNumTF == -1) {
375
-
throwstd::runtime_error(fmt::format(R"(DF {} listed in parent file map but not found in the corresponding file "{}")", fileAndFolder.folderName, parentFile->mcurrentFile->GetName()));
437
+
auto parentRootFS = std::dynamic_pointer_cast<TFileFileSystem>(parentFile->mCurrentFilesystem);
438
+
throwstd::runtime_error(fmt::format(R"(DF {} listed in parent file map but not found in the corresponding file "{}")", folder.path(), parentRootFS->GetFile()->GetName()));
376
439
}
377
440
// first argument is 0 as the parent file object contains only 1 file
throwstd::runtime_error(fmt::format(R"(Couldn't get TTree "{}" from "{}". Please check https://aliceo2group.github.io/analysis-framework/docs/troubleshooting/#tree-not-found for more information.)", fileAndFolder.folderName + "/" + treename, fileAndFolder.file->GetName()));
443
+
auto rootFS = std::dynamic_pointer_cast<TFileFileSystem>(mCurrentFilesystem);
444
+
throwstd::runtime_error(fmt::format(R"(Couldn't get TTree "{}" from "{}". Please check https://aliceo2group.github.io/analysis-framework/docs/troubleshooting/#tree-not-found for more information.)", fullpath.path(), rootFS->GetFile()->GetName()));
381
445
}
382
446
383
447
// create table output
384
448
auto o = Output(dh);
385
-
auto t2t = outputs.make<TreeToTable>(o);
386
449
387
-
// add branches to read
388
-
// fill the table
389
-
t2t->setLabel(tree->GetName());
390
-
totalSizeCompressed += tree->GetZipBytes();
391
-
totalSizeUncompressed += tree->GetTotBytes();
392
-
t2t->addAllColumns(tree);
393
-
t2t->fill(tree);
394
-
delete tree;
450
+
// FIXME: This should allow me to create a memory pool
0 commit comments