ROOT Version (6.12/04):
Platform, compiler (MacOS 10.12.6, clang 9.0):
I have a script that defines a class (e.g. MainEvent), and then there are two function constructors:
MainEvent::MainEvent (run_no) that finds four root files twith the same run_no, gets the data and so on, and a second one TH1F* MainEvent::Clusters() that makes one TH2F from the data from the four files, then finds the clusters and returns a TH1F histogram. The first one (MainEvent, void) calls the second one (Clusters) in it. In the end I make a loop over many runs and I run " new MainEvent (run_no) " over many runs.
My question is how can I pass the TH1F from each run to pile them up (add them for all runs)? I cannot pass the histo from MainEvent (I get error: constructor cannot have a return type). Any advice is highly appreciated. Thank you!