Skip to content

Commit

Permalink
Some docs
Browse files Browse the repository at this point in the history
  • Loading branch information
nsmith- committed Apr 2, 2021
1 parent 4bfb59a commit a8e650a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions coffea/nanoevents/schemas/nanoaod.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,14 +153,21 @@ def __init__(self, base_form, version="latest"):

@classmethod
def v7(cls, base_form):
"""Build the NanoEvents assuming NanoAODv7
For example, one can use ``NanoEventsFactory.from_root("file.root", schemaclass=NanoAODSchema.v7)``
to ensure NanoAODv7 compatibility.
"""
return cls(base_form, version="7")

@classmethod
def v6(cls, base_form):
"""Build the NanoEvents assuming NanoAODv6"""
return cls(base_form, version="6")

@classmethod
def v5(cls, base_form):
"""Build the NanoEvents assuming NanoAODv5"""
return cls(base_form, version="5")

def _build_collections(self, branch_forms):
Expand Down

0 comments on commit a8e650a

Please sign in to comment.