| # Gaudi Framework, version v22r0 |

Home |  | Generated: 9 Feb 2011

# 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.

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

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

Definition at line 28 of file CollectionMerge.py.

    00029                                                       :
    00030     num_input = len(self.input)
    00031     log_name = 'INPUT_'+str(num_input)
    00032     tup_name = log_name+'/'+tuple
    00033     self.merger_input.append(tup_name)
    00034     self.input.append(log_name + " DATAFILE='"+file+"' OPT='READ' TYP='"+typ+"'")

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

Definition at line 35 of file CollectionMerge.py.

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

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

Definition at line 44 of file CollectionMerge.py.

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

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

Definition at line 24 of file CollectionMerge.py.

    00025                     :
    00026     self.appMgr.finalize()
    00027     self.appMgr.exit()

## Member Data Documentation

CollectionMerge::CollectionMerge::appMgr

Definition at line 9 of file CollectionMerge.py.

CollectionMerge::CollectionMerge::collSvc

Definition at line 20 of file CollectionMerge.py.

CollectionMerge::CollectionMerge::input

Definition at line 7 of file CollectionMerge.py.

CollectionMerge::CollectionMerge::merger

Definition at line 21 of file CollectionMerge.py.

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::output

Definition at line 8 of file CollectionMerge.py.

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

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

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines