00001
00002
00003 __all__ = ['Configure',
00004 'SpadeAlgo',
00005 'Metadata']
00006
00007 spade_subcategory = None
00008
00009 def configure(argv = []):
00010 """Configures this module"""
00011 import sys, getopt
00012 opts,args = getopt.getopt(argv,
00013 "-S:")
00014 for opt,arg in opts:
00015 if opt == "-S":
00016 global spade_subcategory
00017 spade_subcategory = arg
00018 print "======================================================"
00019 print "Spade subcategory set to '" + spade_subcategory + "'"
00020 print "======================================================"
00021 pass
00022 continue
00023
00024 from RootIOSvc.RootIOSvcConf import RootIOFileStateSvc
00025 fss = RootIOFileStateSvc()
00026
00027 from Gaudi.Configuration import ApplicationMgr
00028 theApp = ApplicationMgr()
00029 theApp.ExtSvc.append(fss)
00030
00031
00032 def run(app):
00033 """Installs the SpadeAlgo that writes the SPADE metadate file"""
00034
00035 from SpadeAlgo import SpadeAlgo
00036 algo = SpadeAlgo()
00037 global spade_subcategory
00038 algo.subcategory = spade_subcategory
00039 app.addAlgorithm(algo)