Hello, in EventAction and StackingAction I fille two histograms
analysisManager->FillH1(0, fEdep);
analysisManager->FillH1(1, energy/keV);
I need to print the histograms in a text file, then in the RunAction I wrote the loop
void B1RunAction::EndOfRunAction(const G4Run* run)
{
int i;
// save histograms & ntuple
//
auto analysisManager = G4AnalysisManager::Instance();
G4H1* h0 = analysisManager->GetH1(0);
G4H1* h1 = analysisManager->GetH1(1);
for (i=1;i<=h0->GetNbinsX();i++)
{
G4cout << i << " " << h0->GetBinContent(i) << " " << h1->GetBinContent(i) << G4endl;
}
analysisManager->Write();
analysisManager->CloseFile();
}
But I get errors because
GetNbinsX and GetBinContent aren’t members of tools::histo::h1d’
How can I solve to get these values?