| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

DybIO::TestLoader Namespace Reference


Functions

def configure

Function Documentation

def DybIO::TestLoader::configure (   argv = None  ) 

Definition at line 12 of file TestLoader.py.

00012                         :
00013     if argv is None: argv = list()
00014 
00015     # Use nuwa.py style -I option
00016     from optparse import OptionParser
00017     parser = OptionParser(usage=__doc__)
00018     parser.add_option("-I", "--input-streams",default="{}",
00019                       help="Input file map")
00020     parser.add_option("-t","--test-type",type="int",default=0,
00021                       help="Test type [0-4]");
00022 
00023     opts,args = parser.parse_args(args=argv)
00024     
00025     # Turn dict string-rep into dict
00026     print opts.input_streams
00027     opts.input_streams = eval(opts.input_streams)
00028     print opts.input_streams
00029 
00030     # Regularize default streams, args are assumed to be .root files
00031     try:
00032         default = opts.input_streams['default']
00033     except KeyError:
00034         default = []
00035         default += args
00036     opts.input_streams['default'] = default
00037 
00038     from Gaudi.Configuration import ApplicationMgr
00039     theApp = ApplicationMgr()
00040 
00041     # Do a minimal version of RootIOSvc.Configure()
00042     from RootIOSvc.RootIOSvcConf import RootIOCnvSvc
00043     rio = RootIOCnvSvc()
00044     theApp.ExtSvc.append(rio)
00045 
00046     from RootIOSvc import wash_streams
00047     print opts.input_streams
00048     rio.InputStreams = wash_streams(opts.input_streams)
00049 
00050     from DybIO.DybIOConf import TestInputLoadAlg, DybInputLoadTool, DybNextEntryPolicyTool
00051     alg = TestInputLoadAlg()
00052 
00053     loader = DybInputLoadTool()
00054     loader.RootIOSvc = rio
00055     loader.ConversionSvc = rio
00056     alg.Loader = loader
00057 
00058     policy = DybNextEntryPolicyTool()
00059     policy.Start = 0
00060     policy.Mode = "sequential"
00061     alg.Policy = policy
00062 
00063     alg.Path = '/Event/Sim/SimHeader'
00064     alg.TestType = int(opts.test_type)
00065 
00066     theApp.TopAlg.append(alg);
00067     return
00068 

| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 20:47:47 2011 for DybIO by doxygen 1.4.7