FairRoot
FairRoot copied to clipboard
FairRunAna::Run() unclear description
Is your feature request related to a problem? Please describe.
Current implementation of FairRunAna::Run()
does not match the description.
What we have now in FairRunAna
is:
/**Run from event number NStart to event number NStop */
void Run(Int_t NStart = 0, Int_t NStop = 0) override;
/**Run for the given single entry*/
void Run(Long64_t entry);
Only the first function with NStart < NStop works as described. The second function is never invoked, i.e. it is impossible to run single event this way.
Unexpected behavior: Run(-1) - breaks in FairRunInfo::WriteInfo() Run(0) - runs all input (100 events) Run(15) - runs first 15 events
Run(-1,any int) - breaks in FairRunInfo::WriteInfo() Run(15,-1) - runs from event 15 till the end Run(15,0) - runs first 15 events Run(15,15) - breaks in FairRunInfo::WriteInfo() Run(15,16) - runs event number 15
Describe the solution you'd like Fix the comments to match the behavior.
Change Run(Long64_t entry)
to RunSingle(Long64_t entry)
Break properly in FairRunAna::Run()
when first int
parameter is negative
.
Change the behavior of: Run(15,0) - runs first 15 events to: Run(15,0) - run from event 15 till the end
Run(15,15) - breaks in FairRunInfo::WriteInfo() to Run(15,15) - run event number 15
Run(15,16) - runs event number 15 to Run(15,16) - run event 15 and 16
Describe alternatives you've considered
Maybe RunEvent(Long64_t entry)
is better than RunSingle(Long64_t entry)
?
Maybe we should keep: Run(15,0) - run first 15 events, I really would like to hear your opinion.
Additional context
There is also:
/**Run over the whole input file with timpe window delta_t as unit (entry)*/
void Run(Double_t delta_t);
Although it is a little bit harder to confuse because it is using a double, it's still error-prone. E.g. if the value is taken from some config container with auto
.