Public Member Functions | |
def | __init__ |
def | initialize |
def | execute |
Public Attributes | |
count | |
rio | |
riop |
An algorithm that will change the RootIOCnvSvc's output file map.
Definition at line 10 of file OutputFrobicator.py.
def RootIOTest::OutputFrobicator::OutFrob::__init__ | ( | self, | ||
name = "OutFrob" | ||||
) |
def RootIOTest::OutputFrobicator::OutFrob::initialize | ( | self | ) |
Definition at line 17 of file OutputFrobicator.py.
00019 : 00020 sc = GaudiAlgo.initialize(self) 00021 if sc.isFailure(): 00022 print 'Failed to initialize GaudiAlgo base class' 00023 return sc 00024 self.rio = self.svc('IRootIOSvc','RootIOCnvSvc') 00025 if not self.rio: 00026 print 'Failed to get RootIOCnvSvc, bogus!' 00027 return FAILURE 00028 self.riop = Bindings.iProperty('RootIOCnvSvc',self.rio) return SUCCESS
def RootIOTest::OutputFrobicator::OutFrob::execute | ( | self | ) |
Definition at line 29 of file OutputFrobicator.py.
00031 : 00032 self.count += 1 00033 print self.count 00034 00035 outstreams = self.riop.OutputStreams 00036 for k,v in outstreams.iteritems(): 00037 print '\t%s --> %s'%(k,v) 00038 basenum,ext = os.path.splitext(v) 00039 base,num = basenum.split("_") 00040 newname = '%s_%03d%s'%(base,self.count,ext) 00041 print 'Changing output stream "%s" output file from "%s" to "%s"'%(k,v,newname) 00042 self.rio.associateOutput(newname,k) 00043 continue 00044 00045 #for k,v in self.riop.properties().iteritems(): 00046 # print '\t"%s" --> (%s)%s [%s]'%(k,v.ptype(),v.value(),v.documentation()) 00047 00048 return SUCCESS
Definition at line 14 of file OutputFrobicator.py.
Definition at line 22 of file OutputFrobicator.py.
Definition at line 26 of file OutputFrobicator.py.