Problem 2099

Summary: Missing verbosity check
Product: Geant4 Reporter: Luigi Pertoldi <gipert>
Component: processes/hadronic/models/radioactive_decayAssignee: dennis.herbert.wright
Status: REOPENED INVALID    
Severity: minor CC: Alberto.Ribon, dennis.herbert.wright, Koichi.Murakami, laurent.desorgher, Vladimir.Ivantchenko
Priority: P4    
Version: 10.4   
Hardware: All   
OS: All   

Description Luigi Pertoldi 2018-11-06 16:32:53 CET
In the G4RadioactiveDecay::BuildPhysicsTable implementation, I would replace the following line:

if(G4Threading::IsMasterThread()) { StreamInfo(G4cout, "\n"); }

with

if(G4Threading::IsMasterThread() && GetVerboseLevel() > 0) { StreamInfo(G4Cout, "\n"); }

Otherwise, there's no way to suppress the corresponding screen output
Comment 1 Laurent Desorgher 2019-01-24 10:08:05 CET
I do not think that it is a good idea to remove the printing of basic info of the radioactive decay model. The stream info informs the user  on the parameters that are used in the radioactive decay model. I believe that this information should be always printed. 

Best regards
Comment 2 Luigi Pertoldi 2019-01-28 19:51:46 CET
(In reply to Laurent Desorgher from comment #1)
> I do not think that it is a good idea to remove the printing of basic info
> of the radioactive decay model. The stream info informs the user  on the
> parameters that are used in the radioactive decay model. I believe that this
> information should be always printed. 
> 
> Best regards

The message should be printed out with the default verbose level, indeed, I'm not saying it should be suppressed. I'm just saying it should follow the usual printing rules represented by verbosity levels. The user should have the possibility to suppress the message, if he needs so (for example if he wants to print the same information in a different way).

In my case, for example, I'm developing a tool that has its own output structure, and I don't want Geant4 to interfere into this.

This is not removing a feature, it's just fixing a bug!

Best,
Luigi
Comment 3 Vladimir.Ivantchenko 2019-12-12 21:54:20 CET
Hello Laurent, Dennis
Comment 4 Vladimir.Ivantchenko 2019-12-12 21:57:49 CET
Hello, Dennis, Laurent,

in EM and in de-excitation module we use approach: verbosity=1 is the default and print basic information, verbosity=0 means silence. Higher verbosity level means different level of debugging debugging.

I do not think we should use different approach in Radioactive decay and in other places.

Cheers,
Vladimir
Comment 5 dennis.herbert.wright 2020-02-27 16:08:25 CET
The verbosity levels in this model are now set consistently in the code and conform to those in G4PhotonEvaporation.
Comment 6 Luigi Pertoldi 2022-11-11 14:38:30 CET
Hello,

I think there is still something wrong (version 11.0.2). I'm setting all possible verbosity levels to 0 in my application but the output of G4RadioactiveDecay::StreamInfo() is still there.

I tried manually setting G4HadronicParameters::Instance()->SetVerboseLevel(0) in my physics list, at ::ConstructProcesses(), but the setting seems to have no effect.

Luigi