Skip to content
Snippets Groups Projects
Commit 0551ccee authored by Tamas Gal's avatar Tamas Gal :speech_balloon:
Browse files

Restructure definitions

parent 754fa97c
No related branches found
No related tags found
No related merge requests found
Pipeline #14270 passed with warnings
File moved
File moved
#!/usr/bin/env python3
from km3io.tools import AttrDict
from km3io._definitions.mc_header import data as mc_header
from .mc_header import data as mc_header
from km3io._definitions.trigger import data as trigger
from km3io._definitions.fitparameters import data as fitparameters
from km3io._definitions.reconstruction import data as reconstruction
from km3io._definitions.w2list_genhen import data as w2list_genhen
from km3io._definitions.w2list_gseagen import data as w2list_gseagen
class AttrDict(dict):
"""A dictionary which allows access to its key through attributes."""
def __init__(self, *args, **kwargs):
super(AttrDict, self).__init__(*args, **kwargs)
self.__dict__ = self
from .trigger import data as trigger
from .fitparameters import data as fitparameters
from .reconstruction import data as reconstruction
from .w2list_genhen import data as w2list_genhen
from .w2list_gseagen import data as w2list_gseagen
trigger = AttrDict(trigger)
fitparameters = AttrDict(fitparameters)
......
......@@ -13,13 +13,6 @@ BASKET_CACHE_SIZE = 110 * 1024**2
BASKET_CACHE = uproot.cache.ThreadSafeArrayCache(BASKET_CACHE_SIZE)
class AttrDict(dict):
"""A dictionary which allows access to its key through attributes."""
def __init__(self, *args, **kwargs):
super(AttrDict, self).__init__(*args, **kwargs)
self.__dict__ = self
class cached_property:
"""A simple cache decorator for properties."""
def __init__(self, function):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment