diff --git a/PhysicsAnalysis/AnalysisCommon/PMGTools/python/test_PMGCrossSectionTool.py b/PhysicsAnalysis/AnalysisCommon/PMGTools/python/test_PMGCrossSectionTool.py index 47ab5ab7f6e30613ebd7e06bbbcf25d24413cc98..c295b7321d420545894d2c9a82fc36bc0a9fd122 100644 --- a/PhysicsAnalysis/AnalysisCommon/PMGTools/python/test_PMGCrossSectionTool.py +++ b/PhysicsAnalysis/AnalysisCommon/PMGTools/python/test_PMGCrossSectionTool.py @@ -2,19 +2,25 @@ # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration import ROOT -import os - def main(): + from PathResolver import PathResolver tool = ROOT.PMGTools.PMGCrossSectionTool('MyXSectionTool') - tool.readInfosFromFiles('/cvmfs/atlas.cern.ch/repo/sw/database/GroupData/dev/PMGTools/PMGxsecDB_mc16.txt') + fn = 'dev/PMGTools/PMGxsecDB_mc16.txt' + fn = PathResolver.FindCalibFile(fn) + vv = ROOT.std.vector('std::string')() + vv.push_back(fn) + + tool.readInfosFromFiles(vv) # take a ttbar sample as example ( users should get this from the EventInfo ) sample_id = 410000 + print '%d sample loaded' % tool.getLoadedDSIDs().size() print + print 'Sample dsid = ', sample_id print 'Sample name = ', tool.getSampleName(sample_id) print 'xsection [pb] = ', tool.getSampleXsection(sample_id) print 'filter eff = ', tool.getFilterEff(sample_id)