This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
ganga:ganga [2012/08/01 17:02] – [Submitting a ROOT-job] decianm | ganga:ganga [2015/06/18 12:02] – Added method to obtain BK info within Ganga rsilvaco | ||
---|---|---|---|
Line 451: | Line 451: | ||
</ | </ | ||
+ | *Note: Due to a weird bug (1.8.2012) 0 is not allowed as an argument... | ||
+ | *Note: When submitting a ROOT-job to the LSF, make sure the Ganga version in the shell you submit the ganga-job from and the one requested in '' | ||
===== Forcing a job to run on a specific site ===== | ===== Forcing a job to run on a specific site ===== | ||
For this, do: | For this, do: | ||
Line 464: | Line 466: | ||
dirac-proxy-init -g lhcb_user | dirac-proxy-init -g lhcb_user | ||
</ | </ | ||
+ | |||
+ | ===== Bookkeeping information within Ganga ===== | ||
+ | A simple method that can be added to the ~/.ganga.py to access information directly from the BK can be seen below: | ||
+ | |||
+ | <code python> | ||
+ | def getBKInfo ( evttype ) : | ||
+ | from subprocess import Popen, PIPE | ||
+ | |||
+ | serr = open ( '/ | ||
+ | pipe = Popen ( [ ' | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | stdout = pipe.stdout | ||
+ | ts = {} | ||
+ | result = {} | ||
+ | | ||
+ | for line in stdout : | ||
+ | | ||
+ | try : | ||
+ | value = eval ( line ) | ||
+ | except : | ||
+ | continue | ||
+ | | ||
+ | if not isinstance ( value , tuple ) : continue | ||
+ | if not isinstance ( value[0] , str ) : continue | ||
+ | if not isinstance ( value[1] , str ) : continue | ||
+ | if not isinstance ( value[2] , str ) : continue | ||
+ | |||
+ | if result.has_key ( value[0] ) : continue | ||
+ | result [ value[0] ] = value[1:] | ||
+ | |||
+ | return result | ||
+ | </ | ||
+ | |||
+ | In this case two additional files ' | ||
+ | |||
===== Help ===== | ===== Help ===== | ||
Line 477: | Line 517: | ||
===== Links ===== | ===== Links ===== | ||
Information for using ganga in LHCb (and where I stole most of the information from): [[http:// | Information for using ganga in LHCb (and where I stole most of the information from): [[http:// | ||
- |