Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Smart calculator option passing #116

Open
rsmith54 opened this issue Jun 10, 2016 · 1 comment
Open

Smart calculator option passing #116

rsmith54 opened this issue Jun 10, 2016 · 1 comment

Comments

@rsmith54
Copy link
Owner

Right now, it's non-trivial and kind of ugly to pass arguments through to the calculators, as reported by @kpachal, for example when trying to have an m_isTruth flag.

There are two nicer ways to fix this I have considerd.

  1. Fix the kind of ugly "m_calculatorName" setup to actually take the calculator object. This is probably the best...
    1a) Just set the members of the calculators from the script.

  2. Pass a dict into the calculate alg or the calculator (if we implement 1a) which allows all the derived calculators to have their own set of options saved in a std::map (translating dict -> map), or a boost variant if we want to allow any kind of key-value pair (I don't know this too well, but this is the right class to do this).

Probably the best is doing both of these, and then people could just pass the args from their run script and not fill up their headers with worthless member variables. This is probably a bit annoying to code, but probably worth it since it would be nice to be able to set these options from the python scripts but also avoid the ugly list of 100 bools that ends up plaguing many algorithm headers.

@rsmith54
Copy link
Owner Author

Okay I just thought about this one a little bit.

Ideally if we actually wanted to do this I would probably actually use the xAODAnaHelpers algorithm class instead of the EventLoop one and put it in that class. Obviously this requires talking to the xAODAnaHelper guys and it might not be worth it (it's maybe a bit confusing to some people although I think it's a lot more powerful/flexible in the end).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant