TODO: restructuring the datastructure classes; suggestion: write a Superclass GenericDataStructure which is than inherited by PilotDataStructure and SeiscompDataStructure

This commit is contained in:
Sebastian Wehling-Benatelli 2015-04-29 07:57:52 +02:00
parent 0760c2fe3a
commit 426c2d0d4c
2 changed files with 7 additions and 0 deletions

View File

@ -41,6 +41,10 @@ def autoPyLoT(fnames, inputfile):
if parameter.hasParam('datastructure'): if parameter.hasParam('datastructure'):
datastructure = DATASTRUCTURE[parameter.getParam('datastructure')]() datastructure = DATASTRUCTURE[parameter.getParam('datastructure')]()
dsfields = {'root':parameter.rootpath} #see TODO: in data.py
datastructure.modifyFields(dsfields)
def expandSDS(datastructure): def expandSDS(datastructure):
return datastructure.expandDataPath() return datastructure.expandDataPath()
@ -51,6 +55,8 @@ def autoPyLoT(fnames, inputfile):
expandMethod = dsem[datastructure.getName()] expandMethod = dsem[datastructure.getName()]
if __name__ == "__main__": if __name__ == "__main__":
# parse arguments # parse arguments
parser = argparse.ArgumentParser( parser = argparse.ArgumentParser(

View File

@ -146,6 +146,7 @@ class Data(object):
def getEvtData(self): def getEvtData(self):
return self.evtdata return self.evtdata
#TODO: write superclass DataStructure instead of three fully featured individual classes
class GenericDataStructure(object): class GenericDataStructure(object):
''' '''