示例#1
0
def configure( gaudi = None  ) :
    """ Configuration of the job """

    import HistoEx
    
    if not gaudi :
        from GaudiPython.Bindings import AppMgr
        gaudi = AppMgr()

    HistoEx.configure( gaudi )

    alg = HistoEx1('HistoEx1')
    gaudi.addAlgorithm( alg )

    alg.HistoPrint = True

    return SUCCESS
示例#2
0
def configure( gaudi = None ) :
    """ the main configuration method """

    if not gaudi :
        from GaudiPython.Bindings import AppMgr
        gaudi = AppMgr()

    # reuse the previous example
    import HistoEx2
    HistoEx2.configure( gaudi )

    # create the algorithms
    alg1 = Aida2RootEx1()
    alg2 = Aida2RootEx2()
    # append them to the list of Top-Level algorithms
    gaudi.addAlgorithm( alg1 )
    gaudi.addAlgorithm( alg2 )

    return SUCCESS
示例#3
0
def run(input_files, output_file):

    ## Bit of extra configuration
    from GaudiConf import IOHelper
    IOHelper().inputFiles(input_files)
    HistogramPersistencySvc().OutputFile = output_file.replace('.root', '_histos.root')

    ## GaudiPython
    import GaudiPython
    import cppyy
    cppyy.load_reflection_info('libLinkerEvent')
    cppyy.load_reflection_info('libLinkerInstancesDict')

    from GaudiPython.Bindings import AppMgr
    appMgr = AppMgr(outputlevel = 3)
    appMgr.config()

    appMgr.HistogramPersistency = 'ROOT'
    ntSvc = GaudiPython.iService('NTupleSvc')
    ntSvc.Output = ["MATCHZERRLUN DATAFILE='{0}' OPT='NEW'".format(output_file)]

    from Hlt1Muons.MatchAlgo import MatchResidualAlgo
    match_algo = MatchResidualAlgo("MatchResidualAlgo", MatchVeloMuon = mvm.getFullName())
    match_algo.NTupleLUN = 'MATCHZERRLUN'
    appMgr.addAlgorithm(match_algo)

    from Hlt1Muons.MatchAlgo import MatchChi2Algo
    chi2_algo = MatchChi2Algo("MatchChi2Algo", MatchVeloMuon = mvm_chi2.getFullName())
    chi2_algo.NTupleLUN = 'MATCHZERRLUN'
    appMgr.addAlgorithm(chi2_algo)

    if mvm_old:
        chi2_algo_old = MatchChi2Algo("MatchChi2AlgoOld", MatchVeloMuon = mvm_old.getFullName())
        chi2_algo_old.NTupleLUN = 'MATCHZERRLUN'
        appMgr.addAlgorithm(chi2_algo_old)

    appMgr.initialize()
    appMgr.run(options.nevents)
    appMgr.stop()
    appMgr.finalize()
    appMgr.exit()
示例#4
0
appMgr = AppMgr()
appMgr.HistogramPersistency = "ROOT"
hpSvc = appMgr.service('HistogramPersistencySvc')
hpSvc.OutputFile = options.OutputDirectory + '/' + options.runNumber + '/' + options.analysisType + '_' + options.runNumber + '.root'

ntSvc = appMgr.ntupleSvc()
ntSvc.Output = [
    "FILE1 DATAFILE='" + options.OutputDirectory + '/' + options.runNumber +
    '/' + options.analysisType + '_' + options.runNumber +
    "Tuple.root'  TYP='ROOT'  OPT='NEW'"
]

eventTimeDecoder = appMgr.toolsvc().create("OdinTimeDecoder",
                                           interface="IEventTimeDecoder")

appMgr.addAlgorithm('LbAppInit')

from Configurables import HCRawBankDecoder

if options.TAE > 0:
    for k in ['Prev', 'Next']:
        for i in range(options.TAE):
            location = k + repr(options.TAE - i)
            decoderName = "HCRawBankDecoder/HCRawBankDecoder" + location
            appMgr.addAlgorithm(decoderName)

appMgr.addAlgorithm("HCRawBankDecoder/HCRawBankDecoder")

mainAlgorithm = None

if options.analysisType == 'NTuple':