Difference: AndrzejZuranskiCMSSW (1 vs. 2)

Revision 22012-01-11 - AndrzejZuranski

Line: 1 to 1
 
META TOPICPARENT name="AndrzejZuranski"

Misc. CMSSW notes / howtos

Line: 32 to 32
 

Misc. CRAB related notes / howtos

Added:
>
>

DBS Publication problem with pile-up Input Files?

Solution is to hack the crab_fjr files with a following script:


import os,sys

# directory where crab_fjr files reside
input_dir = sys.argv[1]

for file in os.listdir(input_dir):
        if file.find("crab_fjr")==-1 : continue
        import re
        chop1 = re.compile('<Inputs>.*?</Inputs>',re.DOTALL)
        chop2 = re.compile('<InputFile>.*?</InputFile>',re.DOTALL)
        f = open(input_dir+"/"+file)
        data = f.read()
        f.close()
        data = chop1.sub('',data)
        data = chop2.sub('',data)
        f = open ('tmp','w')
        f.write(data)
        f.close()
        os.system('mv tmp '+input_dir+'/'+file)

Revision 12012-01-11 - AndrzejZuranski

Line: 1 to 1
Added:
>
>
META TOPICPARENT name="AndrzejZuranski"

Misc. CMSSW notes / howtos

How to list L1 Trigger decisions from EDM file?

Using FWLite and pyROOT:

import ROOT
from DataFormats.FWLite import Events, Handle

events = Events ('myEdmFile.root')

handle = Handle ('L1GlobalTriggerObjectMapRecord')
label = ("hltL1GtObjectMap")

ROOT.gROOT.SetBatch()

for event in events:

        event.getByLabel(label,handle)
        l1trig = handle.product()
        for i in range(128):
                try:
                        trg = l1trig.getObjectMap(i)
                        print trg.algoBitNumber(), trg.algoName(), trg.algoGtlResult()
                except ReferenceError:
                        pass

Misc. CRAB related notes / howtos

 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback