|Message: Create a new 1D histogram at each run in the same ROOT file||Not Logged In (login)|
Click on the Forum title, e.g. on the "Forums by Category" page, to read a sequence of postings to the Forum and its threads all in one page. If you are only interested in one thread or the thread following a specific posting, click the thread or the posting, which takes you to a smaller page, which contains only the part you are interested in and may be easier to navigate.
Messages are "chained" if there are only replies at the first level, i.e. 1/1.html, 1/1/1.html etc. In case of "chained" messages the message number is replaced by the icon and there is no indentation.
Inline: Display the subject line only or also the text of the posting(s); for the choice "All" the "Outline" choices are switched off.
|1||0||1||no text / full text of posting|
|2||1||All||text for level 1 only / text for All postings|
Outline: Choose the depth of the posting thread, successive toggle controls provide increasing detail.
|1||2||1||2 levels / 1 level (original posting)|
|2||3||2||3 levels / 2 levels|
|3||3||All||3 levels / all levels (all postings)|
Hello, my simulation uses an input file like this one
/gun/energy 1173.228 keV /run/beamOn 1000000 #99.85%
/gun/energy 1332.492 keV /run/beamOn 1000000 #99.9826%
/gun/particle ion /gun/ion 27 60 /run/beamOn 1000000
I am looking for a way to create a ROOT file with the following content
|->t |->H0 |->H1 |->H2
* t, a ntuple that contains all the event of the three runs (1173 keV gamma-ray, 1332 keV gamma-ray and 60Co decay), * H0, an 1D histogram that contains the output of the first run (1173 keV gamma-ray), * H1, an 1D histogram that contains the output of the first run (1332 keV gamma-ray), * H2, an 1D histogram that contains the output of the first run (60Co decay).
My code works if I have only one histogram in my ROOT file. The "problem" is that the ROOT file is opened and that the histograms are booked in RunAction::BeginOfRunAction (and the ROOT file is saved and closed in RunAction::EndOfRunAction). This means that the ROOT file is overwritten at each new run.
Do you know any example where the analysisManager is defined "globally" (in the main function for example) in such way it is created and opened at the beginning of the macro and saved and closed when all the runs within the macro have been passed? Of course, I am interested in by a solution that is thread-safe and with which I can use multithreading.
If no such example exists, could you give me some hints on the way to do that?
Thanks in advance
|Inline Depth:||Outline Depth:||Add message:|