|
[Rivet] [Rivet-svn] r2130 - in trunk: . bin include/Rivet pyext src/CoreAndy Buckley andy.buckley at ed.ac.ukMon Dec 14 15:49:12 GMT 2009
Frank Siegert wrote: > Andy Buckley, Monday 14 December 2009: >> Frank Siegert wrote: >>> Andy Buckley, Wednesday 09 December 2009: >>>> Frank Siegert wrote: >>>>> Would it be possible, to leave the parsing of the first event in >>>>> AnalysisHandler in any way? I know why you moved it, because you >>>>> needed the first event before doing the analyses init. But maybe >>>>> that could be done by having AnalysisHandler extract the >>>>> information and call the analysis init in an "if (firstevent)" >>>>> block within AnalysisHandler::analyze? >>>>> >>>>> What do you think? >>>> I think you're right that there's a problem in the design, but I >>>> think that getting rid of the "if (firstevent)" test in Run was one >>>> of the nicer features of the re-design. And having the first event >>>> info available in the analysis init() methods is a *really* nice >>>> feature. >>> But how does this contradict my suggestion? It would still be >>> available in the analysis init() method. >> At present the Analysishandler only knows about events from the >> AnalysisHandler::analyze() method onwards, so the Analysis::init()s, >> which are called from AnalysisHandler::initialize() can't know about >> the first event's beam configuration. We'd have to change the API >> anyway to get around this. > > My suggestion was: Move the Analysis::init()s into an "if (firstevent)" > block in AnalysisHandler::analyze(). I understand that this is not as > clean as your solution, but it is not impossible. I had just been thinking through this myself and come to the same conclusion. Sorry for being a bit blind to that! I'll commit something that does this, with a few safety checks, and you can let me know if it works as you'd like. Andy -- Dr Andy Buckley SUPA Advanced Research Fellow Particle Physics Experiment Group, University of Edinburgh
More information about the Rivet mailing list |