Using files in /eos/project/r/recast/atlas with SampleHandler when running in Docker

Hi all,

I’m trying to implement step 2 of the RECAST for my selection stage. Up to now my input DAOD file (the smallest one I could find) was shipped right inside the Docker image: https://gitlab.cern.ch/atlas-phys/exot/ueh/MultiChargedParticles/2015-2018/AnalysisCode/-/blob/master/MyAnalysis/dataForLocalProcessing/mc16_offProdRound3_SkimmedDxAODs_p4189__m0500z7/DAOD_EXOT17.21861296._000001.pool.root.1
Everything works great in Docker installed on my own PC with that file:

docker run --rm -it gitlab-registry.cern.ch/atlas-phys/exot/ueh/multichargedparticles/2015-2018/analysiscode:latest

Then inside the Docker container:

source /home/atlas/release_setup.sh
source x86_64-centos7-gcc8-opt/setup.sh
cd ../
root -b -q $ROOTCOREDIR/scripts/load_packages.C ATestRun.cxx\(\"submitDir0001\",\ 500,\ 7,\ \"\",\ true\)

Then I read somewhere that my DAOD should be stored in /eos/project/r/recast/atlas instead. Danika was kind enough to place it at /eos/project/r/recast/atlas/ANA-EXOT-2018-54/DAODs/DAOD_EXOT17.21861296._000001.pool.root.1, but I’m not sure how to make the job access that file correctly. While running on lxplus, changing

const char* inputFilePath = gSystem->ExpandPathName("../AnalysisCode/MyAnalysis/dataForLocalProcessing");
SH::ScanDir().filePattern("*.pool.root*").scan(sh,inputFilePath);

to

SH::ScanDir().filePattern("DAOD_EXOT17.21861296._000001.pool.root.1").scan(sh, "/eos/project/r/recast/atlas/ANA-EXOT-2018-54");

works great, but it does not work when I run it inside the Docker on my own laptop:

/build/atnight/localbuilds/nightlies/21.2/athena/PhysicsAnalysis/D3PDTools/SampleHandler/Root/DiskListLocal.cxx:80:exception: could not open directory /eos/project/r/recast/atlas/ANA-EXOT-2018-54
terminate called after throwing an instance of 'RCU::ExceptionMsg'
  what():  /build/atnight/localbuilds/nightlies/21.2/athena/PhysicsAnalysis/D3PDTools/SampleHandler/Root/DiskListLocal.cxx:80:exception: could not open directory /eos/project/r/recast/atlas/ANA-EXOT-2018-54

This is understandable (how silly of me!), so I replaced

SH::ScanDir().filePattern("DAOD_EXOT17.21861296._000001.pool.root.1").scan(sh, "/eos/project/r/recast/atlas/ANA-EXOT-2018-54");

with

SH::DiskListXRD list("eosproject.cern.ch", "/eos/project/r/recast/atlas/ANA-EXOT-2018-54", true);
SH::ScanDir().filePattern("DAOD_EXOT17.21861296._000001.pool.root.1").scan(sh, list);

(this works on lxplus, so at least the syntax is correct)
– but now I get (in Docker)

[ERROR] Server responded with an error: [3010] Unable to open directory /eos/project/r/recast/atlas/ANA-EXOT-2018-54; Operation not permitted

Is /eos/project/r/recast not public?

Thanks!

I figured it out. I needed to do

kinit ysmirnov@CERN.CH

before running the job, but instead I kept doing

kinit ysmirnov@cern.ch

(note the lower case), which prints a message about KDC reply not matching expectations, which I overlooked unfortunately.

So in the end doing the following in the Docker container worked:

kinit ysmirnov@CERN.CH # note the capitals in the domain name!!!
source /home/atlas/release_setup.sh
source x86_64-centos7-gcc8-opt/setup.sh
cd ../
root -b -q $ROOTCOREDIR/scripts/load_packages.C ATestRun.cxx\(\"submitDir0001\",\ 500,\ 7,\ \"\",\ true\)

Sorry for the noise.