Skip to content

Steps for Querying LogCollect file Location

ticoann edited this page Nov 23, 2016 · 8 revisions

Simple case - (There is no merge job)

  • Users give a logical file name. (LFN - A-unmerged.root)

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-unmerged.root is in "LFNArray".

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

  3. If it is exist in "LFNArray" check it is output of the job by checking "steps[0...].output.outputLFNs" Only select the document

  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) - This is intermediate result (specific log for this job).

  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 A.root)

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 (There should be multiple input files in LFNArray). There are 2 ways to check input file list
    • you can select the file name without unmerged string and exclude logArchive.tar.gz file from LFNArray
    • Or get the lfns from steps[...].input[...].lfn - more precise way
  4. go to step 1 in simple case above for each input files found. (These files are the A.root in simple case)