Source

mana-core-athenarootcomps / share / tests / test_athena_ntuple_dumper.py

Full commit
from glob import glob
if 1:
    _cbntfiles = [
        'root://eosatlas//eos/atlas/user/b/binet/utests/utests/filter-d3pd/ntuple.0.root',
        'root://eosatlas//eos/atlas/user/b/binet/utests/utests/filter-d3pd/ntuple.1.root',
        ]

if 0:
    _cbntfiles = [
        'root://eosatlas//eos/atlas/user/b/binet/utests/utests/filter-d3pd/small.ntuple.0.root',
        'root://eosatlas//eos/atlas/user/b/binet/utests/utests/filter-d3pd/small.ntuple.1.root',
        ]
    _cbntfiles = [
        '/tmp/binet/data/small.ntuple.0.root',
        '/tmp/binet/data/small.ntuple.1.root',
        ]

import AthenaRootComps.ReadAthenaRoot
svcMgr.EventSelector.InputCollections = _cbntfiles
svcMgr.EventSelector.TupleName = "egamma"

from AthenaCommon.AlgSequence import AlgSequence
job = AlgSequence()

import AthenaRootComps.AthenaRootCompsConf as arcc
job += arcc.Athena__RootAsciiDumperAlg("rootdumper")

if not 'EVTMAX' in dir():
    EVTMAX=-1
theApp.EvtMax = EVTMAX

if not 'DOWRITE' in dir():
    DOWRITE=1
if DOWRITE:
    svcMgr += CfgMgr.DecisionSvc()
    import AthenaRootComps.WriteAthenaRoot as arcw
    out = arcw.createNtupleOutputStream("StreamD3PD", "d3pd.root", "egamma")
    out.ItemList += [
        "int#el_n",
        "std::vector<float>#el_eta",
        "std::vector<std::vector<float> >#el_jetcone_dr",
        ]
    out.ForceRead = True