Skip to content

Caching behavior of permutation of XRootDFiles #396

@AlkaidCheng

Description

@AlkaidCheng

A new request will be triggered if a new permutation of XRootDFiles is given, despite the files having already been processed and available in the local cache.

from servicex import ServiceXSpec, General, Sample, deliver

def run_query(input_filename=None):
    import uproot
    #
    return uproot.open({input_filename: "CollectionTree"}).arrays(['EventInfoAux.eventNumber'])

filename = ("root://eosuser.cern.ch//eos/atlas/atlascerngroupdisk/phys-higgs/HSG1/MxAOD/h028/mc16a/Nominal/"
            "mc16a.PowhegPy8_bbH125.MxAODDetailedNoSkim.e6050_s3126_r9364_p4180_h028.root")

filename2 = ("root://eosuser.cern.ch//eos/atlas/atlascerngroupdisk/phys-higgs/HSG1/MxAOD/h028/mc16e/Nominal/"
             "mc16e.PowhegPy8_bbH125.MxAODDetailedNoSkim.e6050_s3126_r10724_p4180_h028.root")

spec = ServiceXSpec(
    General=General(
        ServiceX="servicex-uc-af",
        Codegen="python",
        OutputFormat="root-file",
        Delivery="LocalCache",
    ),
    Sample=[
        Sample(
            Name="foo",
            XRootDFiles=[filename, filename2],
            Function=run_query
        )
    ]
)

deliver(spec)

spec = ServiceXSpec(
    General=General(
        ServiceX="servicex-uc-af",
        Codegen="python",
        OutputFormat="root-file",
        Delivery="LocalCache",
    ),
    Sample=[
        Sample(
            Name="foo",
            XRootDFiles=[filename2, filename],
            Function=run_query
        )
    ]
)

deliver(spec)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions