Automate cutflow addition
Currently, this is set as a separate output stream and a boolean for every algorithm. It will be much easier for everyone involved if we moved this to the histogram output... and then made all other algorithms access BasicEventSelection (if it exists) to determine whether or not the cutflow has been enabled. This may not be feasible as we look up an algorithm by name... there should be a way to check if the cutflow histogram exists in the output file.
https://groups.cern.ch/group/hn-atlas-PATHelp/Lists/Archive/Flat.aspx?RootFolder=%2Fgroup%2Fhn-atlas-PATHelp%2FLists%2FArchive%2FA%20wk%28%29-getOutputFile%28%29%20non-destructive&FolderCTID=0x0120020084D7E80CB0C3394A8D54EF07C309B044
Sounds like a good idea @kratsg - have you though more about the details?
@gfacini The cutflow should be defined in the xAH::Algorithm class :)
Every algorithm has access to it which means we can declare a static variable and only deal with initializing and writing the cutflow object, perhaps?
@gstark I think this sounds good. How does one tell each algo where the cutflow is or what its name is?
On Fri, Jul 24, 2015 at 1:25 PM, Giordon Stark [email protected] wrote:
@gfacini https://github.com/gfacini The cutflow should be defined in the xAH::Algorithm class :)
Every algorithm has access to it which means we can declare a static variable and only deal with initializing and writing the cutflow object, perhaps?
— Reply to this email directly or view it on GitHub https://github.com/UCATLAS/xAODAnaHelpers/issues/76#issuecomment-124487417 .
@gfacini That's the point, the algorithms don't need to be told. They can just call specific member functions defined in xAH::Algorithm that does all the lifting. So their job would be to simply record numbers, but not care about how it's done.