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:06] – [Submitting a ROOT-job] decianm | ganga:ganga [2016/01/19 17:30] – [Bookkeeping information within Ganga] egraveri | ||
---|---|---|---|
Line 452: | Line 452: | ||
*Note: Due to a weird bug (1.8.2012) 0 is not allowed as an argument... | *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 465: | 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 ' | ||
+ | |||
+ | More info can be found here: [[https:// | ||
+ | |||
+ | and here: [[https:// | ||
===== Help ===== | ===== Help ===== | ||
To see the documentation, | To see the documentation, | ||
- | ===== The n Commandments when working with Ganga ===== | + | ===== The N Commandments when working with Ganga ===== |
*Thou shall be patient. | *Thou shall be patient. | ||
*Thou shall never use PFNs when thou needest LFNs. | *Thou shall never use PFNs when thou needest LFNs. | ||
- | *Thou shall write an email to '' | + | *Thou shall write an email to '' |
*Thou shall start a test-job before running the full job. The ways of making mistakes are manifold. | *Thou shall start a test-job before running the full job. The ways of making mistakes are manifold. | ||
*Thou shall always check if thy output will be bearable for thy quota. | *Thou shall always check if thy output will be bearable for thy quota. | ||
Line 478: | Line 520: | ||
===== 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:// | ||
- |