--
JianqiaoDeng - 2022-01-13
①
note from Hyin
②
how to download dst file
③
install run3 Davinci
#how to local test davinci py file "DV_Z_Data_2016.py" ?
//you need to add them at the end of DV_Z_Data_2016.py
from
GaudiConf import IOHelper
IOHelper().inputFiles(['/afs/cern.ch/user/j/jideng/public/DaVinciDev_v44r10p1/00103398_00013311_1.ew.dst'])
//then, run this:
../build.x86_64-centos7-gcc7-opt/run gaudirun.py DV_Z_Data_2016.py
_____________________________________________________________________________
#How to download Davinci files from Dirac?
lhcb-proxy-init
python get_files_from_dirac.py >> sim09b_down
mv sim09b_down sim09b_down.sh
sh sim09b_down.sh
//go to /afs/cern.ch/work/j/jideng/gangadir/workspace/jideng/LocalXML/148 and merge the root files
hadd -f sim09b_down.root
*/*/*.root
//the content of python get_files_from_dirac.py:
workdir = '/afs/cern.ch/work/j/jideng/gangadir/workspace/jideng/LocalXML/'
jobsname = [148]
#the Davinci job name
for job in jobsname:
path = '%s%s'%(workdir, job)
for parent, dirnames, filenames in os.walk(path):
for subjob in dirnames:
if subjob.isdigit():
output='%s%s/%s/output/'%(workdir, job, subjob)
# log file
logfile= '%s/__postprocesslocations__'%output
if os.path.exists(logfile):
filex = open('%s'%logfile, 'r')
strnew = (filex.read())[32:-1]
#32 is the begin of path in postprocesslocations strfinal = strnew[0:strnew.find(":")]
print('lb-dirac dirac-dms-get-file %s'%strfinal)
print('mv TRK_MC_ML_D.root %s'%output)
//the content of postprocesslocations, the path begin at 32th place:
DiracFile:::&&TRK_MC_ML_D.root->/lhcb/user/j/jideng/2023_01/700943/700943212/TRK_MC_ML_D.root:::['CERN
USER']:::FBC51CE1-4ED0-2B23-1996-8069443EFF37