-
Notifications
You must be signed in to change notification settings - Fork 125
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
Bump to 2.3.45, and start using AnaToolHandle #532
Conversation
Everything checked out ok, 👍 to merge. 🍻 Commit sha1: 4dd356f |
4dd356f
to
91a0ab7
Compare
Everything checked out ok, 👍 to merge. 🍻 Commit sha1: 91a0ab7 |
91a0ab7
to
66756bb
Compare
…umber (from the PRW tool) is set as default. Users can switch it off from config, and set a default run number as usual.
66756bb
to
a0f9496
Compare
Everything checked out ok, 👍 to merge. 🍻 Commit sha1: 66756bb |
Everything checked out ok, 👍 to merge. 🍻 Commit sha1: a0f9496 |
Hi, I think we're going to need to add some of these instructions to the xAH documentation somewhere. This is definitely a gotcha and is going to bite me in the butt later because I'm definitely not going to remember how to do this... and would have to remember to search the PRs for this content/message explaining how. |
Hi Giordon, yep, sounds like a good thing to do. Is https://xaodanahelpers.readthedocs.org/en/latest/FAQs.html the right place for it? |
Yeah, this might be the best spot for now. It's super generic. |
Everything checked out ok, 👍 to merge. 🍻 Commit sha1: 3117685 |
3117685
to
f0276d6
Compare
Everything checked out ok, 👍 to merge. 🍻 Commit sha1: f0276d6 |
Bump to 2.3.45, and start using AnaToolHandle
See commit messages for details.
The bottom line is:
EL::initialize()
(this is the case for the efficiency correctors, where tool names get created depending on the configuration), just callmy_tool_handle.make("TOOL_TYPE/NEW_TOOL_NAME");
EL::initialize()
set the properties and initialise the tool handle. A NB: afterinitialize()
has been called on the tool handle, it will effectively become a pointer to the tool itself.EL::execute()
, use the tool via calls likemy_tool_handle->doStuff()
If the tool with that given name needs to be used afterwards, just make a tool handle with the same tool_type/tool_name as intended, and callinitialize()
on it. It will automagically get the pointer to the correct tool, and all its properties will be preserved from the previous initialisation.delete
anywhere.The content of this PR shows an effective example for the above.