| Summary: | If Ntuple name is empty AIDA/XML output file is corrupted | ||
|---|---|---|---|
| Product: | Geant4 | Reporter: | Andrea Dotti <andrea.dotti> |
| Component: | analysis | Assignee: | Ivana.Hrivnacova |
| Status: | RESOLVED FIXED | ||
| Severity: | minor | ||
| Priority: | P5 | ||
| Version: | 10.0 | ||
| Hardware: | All | ||
| OS: | All | ||
n co Hello, Thank you for reporting this problem. We will add a protection against such situation and make it available with the next patch. Best regards, The problem is now fixed in the development version and the fix is also provided for the next patch release. Creating objects (h1d, h2d or ntuple) with empty names is not allowed, a warning will be issued and the object is not created in such case. Best regards, |
Hello, this is a minor issue, actually caused by a mis-use of an API. However a protection could be added to analysis module to prevent this. The problem is that if user uses an empty string "" for n-tuple name and selects XML format, the output file is corrupted (truncated). I think that an exception could be thrown just to inform user in such a case. Here is a way to reproduce the problem: #include "g4xml.hh" { G4AnalysisManager* analysisManager = G4AnalysisManager::Instance(); analysisManager->SetFileName("BlaBla"); analysisManager->CreateNtuple("", "Hits"); //<<<<<<<<<< Bug! [...] }