Hello everyone!
I wrote a little program that read/writes pandas dataframes into/from the formatted CSV files written by the G4AnalysisManager. While doing this I found that in the G4CsvAnalysisReader class, the SetFileName() and GetNtuple() methods append to the variable for the CSV file name a string containing the Ntuple name and (what I understand to be) its index. The issue with this is that Geant then can’t find the file. I haven’t been successful in finding what is causing this in the source code. The one clue I have is that the documentation vaguely mentions “While the histograms and profiles objects handled by the analysis reader are of the same type as those handled by the analysis manager, the reader’s ntuple type is different.”
###If this code is in a UserActionClass, say RunAction
#include "G4CsvAnalysisReader.hh"
using G4AnalysisReader = G4CsvAnalysisReader;
void RunAction::BeginRunAction(cont G4Run run){
auto analysisReader = G4AnalysisReader::Instance();
G4String FileNameInput = "test_file.csv";
analysisReader->SetFileName(FileNameInput);
analysisReader->GetNtuple("TUPLENAME");
G4double ntupleIndex;
analysisReader->SetNtupleDColumn("Energy",ntupleIndex);
}
###This will look for "test_file_nt_TUPLENAME_t13.csv" where 13 is a seemingly randominteger.
###If you try to name your file "test_file_nt_TUPLENAME_t13.csv" in the first place,
### you will get "test_file_nt_TUPLENAME_t13_nt_TUPLENAME_t9.csv"
Here is the error Geant4 spits out:
G4WT6 >
-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : Analysis_W001
issued by : G4CsvRFileManager::OpenRFile
Cannot open file test_file_nt_index_t6.csv
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------
G4WT6 >
-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : Analysis_W001
issued by : G4TRNtupleManager<NT>::SetNtupleTColumn
ntuple -1 does not exist.
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------
Any help would be appreciated, thank you 
Geant4 Version: geant4-11-03
Operating System: Arch Linux
Compiler/Version: gcc 14.2.1
CMake Version: 4.0.1