00001
00002 '''
00003 A job module to test the DybOutputFileRoller
00004
00005 Example:
00006
00007 nuwa.py -n -1 -m 'DybIO.TestRoller 10E' -o sim_10E_%04d.root simiotest.root
00008
00009 '''
00010
00011 def configure(argv):
00012 '''
00013 Configure the TestRoller modules.
00014
00015 -m 'DybIO.TestRoller CONDITION [STARTNUMBER]
00016
00017 It takes the following arguments:
00018
00019 CONDITION - set the condition to roll the output files. It is of
00020 the form:
00021
00022 NNNU - NNN = integer, U = character indicating units
00023
00024 STARTOFFSET - optional, set the starting "subrun" offset.
00025 Default is 0 (making the file numbering start at #1).
00026
00027 '''
00028
00029 try:
00030 condition = argv[0]
00031 except IndexError:
00032 raise RuntimeError,configure.__doc__
00033
00034 try:
00035 startnumber = int(argv[1])
00036 except IndexError:
00037 startnumber = 1
00038
00039 from DybTool.DybToolConf import SimPruneTool, OutputFileRollerTool
00040
00041 ofr = OutputFileRollerTool()
00042 ofr.Condition = condition
00043 ofr.StartNumber = startnumber
00044
00045 from DybIO.DybIOConf import DybStorageSvc
00046 dss = DybStorageSvc()
00047
00048 dss.RegSeqVisitors = [ofr]
00049
00050
00051
00052
00053 return
00054
00055
00056
00057