/analysis/ commands not found

I recently changed my code to Geant4.11.0 but now I encounter a problem with the /analysis/ commands in my macro-files. I want to change the filename of my root files in the macro file. Before I used,
/analysis/setFileName test_thread
which I also, in vain, tried to change to
/analysis/ntuple/setFileNameToAll test_thread
Other commands, such as /analysis/verbose 1 give the same ‘command not found’ error.
I define my analysisManager in the BeginOfRunAction;
auto analysisManager = G4RootAnalysisManager::Instance();
//G4String fileName = “test”;
Using analysisManager->OpenFile(fileName); worked without a problem.

Can you try to move the first G4RootAnalysisManager::Instance(); call in your RunAction constructor? The commands are created with the analysis manager instance, so this would make them created earlier.

Best regards,

1 Like

Thank you, this solved the problem. I must have removed this earlier occurrence of the analysis manager when changing my code to the newer version.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.