| # Gaudi Framework, version v21r8 |

Home |  | Generated: 17 Mar 2010

# CollectionMerge::CollectionMerge Class Reference

List of all members.

## Public Member Functions
def | __init__
def | finalize
def | defineInput
def | defineOutput
def | execute
## Public Attributes
| merger_input
| merger_output
| input
| output
| appMgr
| collSvc
| merger

## Detailed Description

Definition at line 3 of file CollectionMerge.py.

## Member Function Documentation

def CollectionMerge::CollectionMerge::__init__ | ( |  | self | ) |

Definition at line 4 of file CollectionMerge.py.

    00004                     :
    00005     self.merger_input  = []
    00006     self.merger_output = []
    00007     self.input         = []
    00008     self.output        = []
    00009     self.appMgr = gaudimodule.AppMgr()
    00010     self.appMgr.EvtMax = 1
    00011     self.appMgr.EvtSel = 'NONE'
    00012     self.appMgr.Dlls   += ['GaudiPoolDb']
    00013     self.appMgr.ExtSvc += ['PoolDbCacheSvc','TagCollectionSvc']
    00014     self.appMgr.service('PoolRootEvtCnvSvc').DbType     = 'POOL_ROOT'
    00015     self.appMgr.service('PoolRootKeyEvtCnvSvc').DbType  = 'POOL_ROOTKEY'
    00016     self.appMgr.service('PoolRootTreeEvtCnvSvc').DbType = 'POOL_ROOTTREE'
    00017     self.appMgr.service('PoolDbCacheSvc').Dlls          = ['lcg_RootStorageSvc','lcg_XMLCatalog','SealSTLDict']
    00018     self.appMgr.service('PoolDbCacheSvc').OutputLevel   = 4
    00019     self.appMgr.topAlg += ['CollectionCloneAlg']
    00020     self.collSvc = self.appMgr.service('TagCollectionSvc')
    00021     self.merger=self.appMgr.algorithm('CollectionCloneAlg')
    00022     self.merger.EvtTupleSvc = 'TagCollectionSvc'
    00023
      def finalize(self):

def CollectionMerge::CollectionMerge::finalize | ( |  | self | ) |

Definition at line 24 of file CollectionMerge.py.

    00024                     :
    00025     self.appMgr.finalize()
    00026     self.appMgr.exit()
    00027
      def defineInput(self,tuple,file,typ='POOL_ROOTTREE'):

def CollectionMerge::CollectionMerge::defineInput | ( |  | self,
|  |  | tuple,
|  |  | file,
|  |  | typ = `'POOL_ROOTTREE'` |
| ) |  |  |

Definition at line 28 of file CollectionMerge.py.

    00028                                                       :
    00029     num_input = len(self.input)
    00030     log_name = 'INPUT_'+str(num_input)
    00031     tup_name = log_name+'/'+tuple
    00032     self.merger_input.append(tup_name)
    00033     self.input.append(log_name + " DATAFILE='"+file+"' OPT='READ' TYP='"+typ+"'")
    00034
      def defineOutput(self,tuple,file,selector=None,criteria=None,opt='RECREATE',typ='POOL_ROOTTREE'):

def CollectionMerge::CollectionMerge::defineOutput | ( |  | self,
|  |  | tuple,
|  |  | file,
|  |  | selector = `None`,
|  |  | criteria = `None`,
|  |  | opt = `'RECREATE'`,
|  |  | typ = `'POOL_ROOTTREE'` |
| ) |  |  |

Definition at line 35 of file CollectionMerge.py.

    00035                                                                                                   :
    00036     self.output = ['OUTPUT' + " DATAFILE='"+file+"' OPT='"+opt+"' TYP='"+typ+"'"]
    00037     self.merger_output = "DATA='OUTPUT/"+tuple+"'"
    00038     if ( criteria is not None ):
    00039       self.merger_output  = self.merger_output  + " SEL='"+criteria+"'"
    00040     if ( selector is not None ):
    00041       self.merger_output  = self.merger_output  + " FUN='"+selector+"'"
    00042     print self.merger_output
    00043
      def execute(self, do_finalize=1):

def CollectionMerge::CollectionMerge::execute | ( |  | self,
|  |  | do_finalize = `1` |
| ) |  |  |

Definition at line 44 of file CollectionMerge.py.

    00044                                   :
    00045     self.collSvc.Input = self.input
    00046     self.collSvc.Output = self.output
    00047     self.merger.Input = self.merger_input
    00048     self.merger.Output = self.merger_output
    00049     self.appMgr.initialize()
    00050     self.appMgr.algorithm('CollectionCloneAlg').execute()
    00051     if ( do_finalize ):
    00052       self.finalize()
    00053
    if __name__ == '__main__':

## Member Data Documentation

CollectionMerge::CollectionMerge::merger_input

Definition at line 5 of file CollectionMerge.py.

CollectionMerge::CollectionMerge::merger_output

Definition at line 6 of file CollectionMerge.py.

CollectionMerge::CollectionMerge::input

Definition at line 7 of file CollectionMerge.py.

CollectionMerge::CollectionMerge::output

Definition at line 8 of file CollectionMerge.py.

CollectionMerge::CollectionMerge::appMgr

Definition at line 9 of file CollectionMerge.py.

CollectionMerge::CollectionMerge::collSvc

Definition at line 20 of file CollectionMerge.py.

CollectionMerge::CollectionMerge::merger

Definition at line 21 of file CollectionMerge.py.

The documentation for this class was generated from the following file:

- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v21r8/GaudiPoolDb/options/CollectionMerge.py