def test_xrootd(self): if 'X509_USER_PROXY' in os.environ and len(os.environ['X509_USER_PROXY'].strip()) > 0: path1 = 'root://xrootd-cms.infn.it//store/group/phys_higgs/hbb/ntuples/VHbbPostNano/2017/V11/TTToSemiLeptonic_TuneCP5_PSweights_13TeV-powheg-pythia8/RunIIFall17NanoAODv4-PU2017_1282/190510_115113/0000/tree_1.root' tree1 = self.getTree(path1) print ("ENTRIES:", tree1.GetEntries()) self.assertEqual(tree1.GetEntries(), 552904L) fileLocator = FileLocator() path2 = fileLocator.removeRedirector(path1) print ("PATH2:", path2) self.assertTrue(path2.startswith('/store/group/phys_higgs/')) self.assertTrue(path2.endswith('/tree_1.root')) path3 = fileLocator.addRedirector(redirector='root://xrootd-cms.infn.it', fileName=path2) self.assertEqual(path1, path3) else: print("INFO: this test is skipped because no X509 proxy certificate is found which is needed to access the files!")
def test_xrootd(self): if 'X509_USER_PROXY' in os.environ and len(os.environ['X509_USER_PROXY'].strip()) > 0: path1 = 'root://xrootd-cms.infn.it//store/group/phys_higgs/hbb/ntuples/V25/TT_TuneCUETP8M2T4_13TeV-powheg-pythia8/VHBB_HEPPY_V25_TT_TuneCUETP8M2T4_13TeV-powheg-Py8__RunIISummer16MAv2-PUMoriond17_80r2as_2016_TrancheIV_v6-v1/170202_212737/0000/tree_100.root' tree1 = self.getTree(path1) print ("ENTRIES:", tree1.GetEntries()) self.assertEqual(tree1.GetEntries(), 48442) fileLocator = FileLocator() path2 = fileLocator.removeRedirector(path1) print ("PATH2:", path2) self.assertTrue(path2.startswith('/store/group/phys_higgs/')) self.assertTrue(path2.endswith('/tree_100.root')) path3 = fileLocator.addRedirector(redirector='root://xrootd-cms.infn.it', fileName=path2) self.assertEqual(path1, path3) else: print("INFO: this test is skipped because no X509 proxy certificate is found which is needed to access the files!")
def test_xrootd(self): if 'X509_USER_PROXY' in os.environ and len( os.environ['X509_USER_PROXY'].strip()) > 0: path1 = 'root://xrootd-cms.infn.it//store/group/phys_higgs/hbb/ntuples/V25/TT_TuneCUETP8M2T4_13TeV-powheg-pythia8/VHBB_HEPPY_V25_TT_TuneCUETP8M2T4_13TeV-powheg-Py8__RunIISummer16MAv2-PUMoriond17_80r2as_2016_TrancheIV_v6-v1/170202_212737/0000/tree_100.root' tree1 = self.getTree(path1) print("ENTRIES:", tree1.GetEntries()) self.assertEqual(tree1.GetEntries(), 48442) fileLocator = FileLocator() path2 = fileLocator.removeRedirector(path1) print("PATH2:", path2) self.assertTrue(path2.startswith('/store/group/phys_higgs/')) self.assertTrue(path2.endswith('/tree_100.root')) path3 = fileLocator.addRedirector( redirector='root://xrootd-cms.infn.it', fileName=path2) self.assertEqual(path1, path3) else: print( "INFO: this test is skipped because no X509 proxy certificate is found which is needed to access the files!" )