Kalanand's January 2010 Log

   December 2009   
January 2010
SuMoTuWeThFrSa
     12
3456789
10111213141516
17181920212223
24252627282930
31      
   February 2010   

January 5th

JSON comparison

****** For details see:
https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideGoodLumiSectionsJSONFile

Using "compareJSON.py" will run different comparisons between different JSON files.
With this script you can check

      * The union of two JSON files ("--or")
      * The intersection of two JSON files ("--and")
      * The subtraction of two JSON files ("--sub"): all of the events in the first file not in the second file.
      * The difference of two JSON files ("--diff"): all lumi sections that appear in one of the files and not the other
        (i.e., "compareJSON.py --diff alpha.json beta.json" is equivalent to "compareJSON.py --sub alpha.json beta.json" and "compareJSON.py --sub beta.json alpha.json")

For all options except --diff, you can specify a third file which will contain the output. For example, to see the intersection between alpha.json and beta.json: "compareJSON.py --and alpha.json beta.json output.json".

#########
Example:
#########
compareJSON.py --or Cert_132440-144114_7TeV_StreamExpress_Collisions10_JSON.txt Cert_139779-140159_7TeV_July16thReReco_Collisions10_JSON.txt merged_JSON.txt

Go to December's log


Last modified: Thu Jan 28 12:05:06 CST 2010