Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-04-10 08:39:16

0001 #!/usr/bin/env python
0002 # Licensed under the Apache License, Version 2.0 (the "License");
0003 # you may not use this file except in compliance with the License.
0004 # You may obtain a copy of the License at
0005 # http://www.apache.org/licenses/LICENSE-2.0
0006 #
0007 # Authors:
0008 # - Paul Nilsson, paul.nilsson@cern.ch, 2018-9
0009 
0010 # This script demonstrates how to download a file using the Rucio download client.
0011 # Note: Rucio needs to be setup with 'lsetup rucio'.
0012 
0013 try:
0014     from rucio.client.downloadclient import DownloadClient
0015 except Exception:
0016     print("Rucio client has not been setup, please run \'lsetup rucio\' first")
0017 else:
0018     f_ific = {'did_scope': 'mc16_13TeV', 'did': 'mc16_13TeV:EVNT.16337107._000147.pool.root.1',
0019               'rse': 'IFIC-LCG2_DATADISK',  # Python 2 - is unicode necessary for the 'rse' value? was u'IFIC-LCG2_DATADISK'
0020               'pfn': 'root://t2fax.ific.uv.es:1094//lustre/ific.uv.es/grid/atlas/atlasdatadisk/rucio/mc16_13TeV/59/29/EVNT.16337107._000147.pool.root.1',
0021               'did_name': 'EVNT.16337107._000147.pool.root.1', 'transfer_timeout': 3981, 'base_dir': '.'}
0022 
0023     download_client = DownloadClient()
0024     print(download_client.download_pfns([f_ific], 1))