Skip to content

Steps for Querying LogCollect file Location

Valentin Kuznetsov edited this page Aug 9, 2016 · 8 revisions

Simple case - rare case (There is no merge job)

  • Users give a logical file name. (LFN)

i.e. From https://github.com/dmwm/WMArchive/blob/master/test/data/samples/ProcessingSuccessFwjr.json

following is a user input

"/store/unmerged/Integ_Test/BprimeJetToBZ_M800GeV_Tune4C_13TeV-madgraph-tauola/GEN-SIM-RAW/ReDigi_3steps_reqmgr2_test-v1/00000/6820CA85-C6EC-E511-85CC-02163E0149A0.root", 

Although this is not real life example since it starts with unmerged file. user input should be always from merged file. (Merged file could be generated from Processing and Production job without Merge job)
  1. Search the document A.root is in "LFNArray".

  2. if it is exist in "LFNArray" check it is out of the job by checking "steps[0...].output.outputLFNs"

  3. Check the meta_data.jobtype (if it not "Merge" follow the next step if it is "Merge" follow merge job case below)

  4. Find the file which ends with logArchive.tar.gz in LFNArray lists in the same documents (Don't need to check this is output of logArchive since it should always output file in step0[]..output.outputLFNs)

  5. Search again the documents with job type == LogCollect and contains logArchive.tar.gz file above as input file. Check whether that file is in "LFNArray"

  6. return its output file (LFN/PFN) - steps[...].outputLFNs - this is final result.

For Merge job type case

The agent follows up this cycle: inputLFN -> Process job -> Merge jobs -> log collect. We should be able to look-up log archive based on any LFN, either from merged or un-merged jobs.

  • User give logical file name (LFN)

i.e. From https://github.com/dmwm/WMArchive/blob/master/test/data/samples/MergeSuccessFwjr.json

following is a user input

 "/store/backfill/1/Integ_Test/QCD_Pt-40toInf_fwdJet_bwdJet_Tune4C_2p76TeV-pythia8/GEN-SIM/MonteCarlo_eff_reqmgr2_test-v1/00000/EC481587-78EC-E511-8357-02163E00E66E.root", 
  1. Search the document A.root is in "LFNArray" list.
  2. Check the job type, if it is meta_data.jobtype == "Merge"
  3. Retrieve all input files (it should be multiple input files)
    • you can check the file name without unmerged string and exclude logArchive.tar.gz file
    • Of get from steps[...].input[...].lfn
  4. go to step 1 in simple case above for each input files found. (These files are the A.root in simple case)