Skip to content

Instantly share code, notes, and snippets.

@wiso
Last active July 14, 2017 14:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wiso/b87a1ef19573cd2c5b93e61cb33f1856 to your computer and use it in GitHub Desktop.
Save wiso/b87a1ef19573cd2c5b93e61cb33f1856 to your computer and use it in GitHub Desktop.
Loop on RooFit RooArgSet with python
def loop_iterator(iterator):
object = iterator.Next()
while object:
yield object
object = iterator.Next()
def iter_collection(rooAbsCollection):
iterator = rooAbsCollection.createIterator()
return loop_iterator(iterator)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment