Difference: DaVinciTutorial0 (1 vs. 37)

Revision 372014-06-17 - NathanaelFarley

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

DaVinci Tutorial 0

We start with just running DaVinci for the first time, and getting some meaningful output.
Line: 6 to 6
 
Added:
>
>

ALERT! Read this first

This tutorial will not work with the Grid as of 2014-08-17 (probably due to changes in the Dirac API). It will still work locally, just don't be surprised if you try it with the option
<!-- SyntaxHighlightingPlugin -->
j.backend=Dirac()
<!-- end SyntaxHighlightingPlugin -->
and it doesn't work.
 

Prerequisites and Slides.

  • Ideally you should really have done the GangaTutorial1, but it is not absolutely necessary.

Revision 362014-06-12 - NathanaelFarley

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

DaVinci Tutorial 0

We start with just running DaVinci for the first time, and getting some meaningful output.
Line: 6 to 6
 
Deleted:
<
<

Warning

All the following works on lxplus which is running slc6. If you intend to run on the GRID go to lxplus5 (slc5) instead as the GRID sites are not yet able to deal with slc6 binaries.



 

Prerequisites and Slides.

  • Ideally you should really have done the GangaTutorial1, but it is not absolutely necessary.

Revision 352013-07-04 - RobLambert

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

DaVinci Tutorial 0

We start with just running DaVinci for the first time, and getting some meaningful output.
Line: 10 to 10
 All the following works on lxplus which is running slc6. If you intend to run on the GRID go to lxplus5 (slc5) instead as the GRID sites are not yet able to deal with slc6 binaries.


Changed:
<
<
>
>
 

Prerequisites and Slides.

Line: 119 to 119
 
Added:
>
>
META FILEATTACHMENT attachment="Ready-set-go.jpg" attr="" comment="ready-set-go" date="1372949693" name="Ready-set-go.jpg" path="Ready-set-go.jpg" size="79279" user="rlambert" version="1"
 
META PREFERENCE name="DAVINCIVERSION" title="DAVINCIVERSION" type="Set" value="v33r0p1"
META PREFERENCE name="TUTORIALVERSION" title="TUTORIALVERSION" type="Set" value="v10r4"
META PREFERENCE name="GANGAVERSION" title="GANGAVERSION" type="Set" value="5-8-16"

Revision 342013-07-04 - PatrickSKoppenburg

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

DaVinci Tutorial 0

We start with just running DaVinci for the first time, and getting some meaningful output.
Line: 6 to 6
 
Added:
>
>

Warning

All the following works on lxplus which is running slc6. If you intend to run on the GRID go to lxplus5 (slc5) instead as the GRID sites are not yet able to deal with slc6 binaries.
 

Changed:
<
<

- Prerequisites and Slides.

>
>

Prerequisites and Slides.

 
Changed:
<
<

- Creating Ganga template for DaVinci jobs

>
>

Creating Ganga template for DaVinci jobs

  Ganga is the preferred frontend for LHCb jobs, before you start with DaVinci you should really have done the GangaTutorial1, but it is not absolutely necessary.
Line: 42 to 45
 
<!-- Omitted for now, presuming it works!
t.application.optsfile = "~/cmtuser/myOptions/DaVinci-Simplest.py" -->
Changed:
<
<

- Running it!

>
>

Running it!

  %SYNTAX{ syntax="python"}% j=Job(t)
Line: 51 to 54
 %ENDSYNTAX% Once the job has completed, you can peek the stdout, and get familiar with what DaVinci looks like for such a simple job.
Changed:
<
<

- Submit Options

>
>

Submit Options

  If you want the output to a file instead of to the terminal do:
<!-- SyntaxHighlightingPlugin -->
j.backend=Local()
<!-- end SyntaxHighlightingPlugin -->
Line: 59 to 62
  The input file used for this tutorial, though, is a PFN located at CERN (for simplicity)... in the next step we will get some data from the book-keeping, allowing you to run anywhere in the world via the GRID.
Changed:
<
<

- What did I just do?

>
>

What did I just do?

 
  • You made a "job" inside "Ganga".
  • A Ganga job is a set of instructions to run something, somewhere, and is very flexible.
Line: 77 to 80
 emacs Tutorial0.py & %ENDSYNTAX%
Changed:
<
<

- Understanding the XMLSummary

>
>

Understanding the XMLSummary

  You'll need to use the latest version of ganga (5-8-16) to ensure this part works.
Line: 89 to 92
 
  • The XMLSummary can be merged using a standard ganga merger (unlike stdout which is tough to merge)
  • Also there are some nice new ways of interpreting this information directly inside Ganga with the j.metadata.
Changed:
<
<

- Understanding the options

>
>

Understanding the options

 
  1. Open up the options file you just submitted...(from ganga type:)
    <!-- SyntaxHighlightingPlugin -->
!emacs $t.application.optsfile[0].name &
<!-- end SyntaxHighlightingPlugin -->
  1. Can you understand what it is doing?

Revision 332012-10-24 - KristofDeBruyn

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

DaVinci Tutorial 0

We start with just running DaVinci for the first time, and getting some meaningful output.
Line: 34 to 34
 envDict['DAVINCIROOT'] dir=envDict['DAVINCIROOT'] + '/options' ls $dir
Changed:
<
<
t.application.optsfile = dir+'/DaVinci-Simplest.py
>
>
t.application.optsfile = dir+'/DaVinci-Simplest.py'
 %ENDSYNTAX%

NB: Be very careful not to copy-paste leading spaces; python does not like that at all.

Revision 322012-10-24 - RobLambert

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

DaVinci Tutorial 0

We start with just running DaVinci for the first time, and getting some meaningful output.
Line: 32 to 32
 envDict=t.application.getenv() #example to demonstrate what ganga does behind-the-scenes (takes a few seconds sometimes) print envDict # the result of calling SetupProject DaVinci envDict['DAVINCIROOT']
Changed:
<
<
dir=envDict['DAVINCIROOT'] + '/tests/options'
>
>
dir=envDict['DAVINCIROOT'] + '/options'
 ls $dir t.application.optsfile = dir+'/DaVinci-Simplest.py %ENDSYNTAX%

Revision 312012-10-24 - PatrickSKoppenburg

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

DaVinci Tutorial 0

We start with just running DaVinci for the first time, and getting some meaningful output.
Line: 116 to 116
 
Changed:
<
<
META PREFERENCE name="DAVINCIVERSION" title="DAVINCIVERSION" type="Set" value="v33r0"
>
>
META PREFERENCE name="DAVINCIVERSION" title="DAVINCIVERSION" type="Set" value="v33r0p1"
 
META PREFERENCE name="TUTORIALVERSION" title="TUTORIALVERSION" type="Set" value="v10r4"
META PREFERENCE name="GANGAVERSION" title="GANGAVERSION" type="Set" value="5-8-16"
|*META PREFERENCE*|name="SYNTAXHIGHLIGHTINGPLUGIN_FORMAT_PREPEND" title="SYNTAXHIGHLIGHTINGPLUGIN_FORMAT_PREPEND" type="Set" value="
"|

Revision 302012-10-24 - RobLambert

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

DaVinci Tutorial 0

We start with just running DaVinci for the first time, and getting some meaningful output.
Line: 8 to 8
 
Changed:
<
<

- Making a place to store your common options

>
>

 
Changed:
<
<
Often your collaborators and colleagues will have some Erasmus package to store options files ... you don't need to be that complicated yet though
<!-- SyntaxHighlightingPlugin -->
mkdir ~/cmtuser/myOptions
cp /afs/cern/ch/user/r/rlambert/public/DVTutorial/DaVinci-Simplest.py ~/cmtuser/myOptions
<!-- end SyntaxHighlightingPlugin -->
>
>

- Prerequisites and Slides.

 

- Creating Ganga template for DaVinci jobs

Ganga is the preferred frontend for LHCb jobs, before you start with DaVinci you should really have done the GangaTutorial1, but it is not absolutely necessary.

Changed:
<
<
To run whichever DaVinci you want, the only thing you need locally should ideally be an options file. If your options are stored in Erasmus, you might not even need that!
>
>
To run whichever DaVinci you want, you don't and/or shouldn't need to store anything locally. On most CERN computers and on a lot of institutes the CERN software is already installed for you. At most the only thing you need locally should ideally be an options file. If your options are stored in Erasmus, you might not even need that!
  You might already have done part of this. It doesn't harm to redo it.
Line: 29 to 28
 
    • If you have last used ganga an age ago, or this is your first time
      <!-- SyntaxHighlightingPlugin -->
ganga -g
<!-- end SyntaxHighlightingPlugin -->
  1. Now start an interactive session:
    <!-- SyntaxHighlightingPlugin -->
ganga
<!-- end SyntaxHighlightingPlugin -->
  1. At the ganga prompt type:
    <!-- SyntaxHighlightingPlugin -->
t = JobTemplate( name="DVTutorial0", application = DaVinci())
<!-- end SyntaxHighlightingPlugin -->
Changed:
<
<
  1. You can access the environment for the package directly in Ganga, and setup your simple options file.%SYNTAX{ syntax="python"}%
envDict=t.application.getenv()
>
>
  1. You can access the environment for the package directly in Ganga, and setup a simple options file taken from the standard DaVinci options.%SYNTAX{ syntax="python"}%
envDict=t.application.getenv() #example to demonstrate what ganga does behind-the-scenes (takes a few seconds sometimes)
 print envDict # the result of calling SetupProject DaVinci
Changed:
<
<
t.application.optsfile = "~/cmtuser/myOptions/DaVinci-Simplest.py"
>
>
envDict['DAVINCIROOT'] dir=envDict['DAVINCIROOT'] + '/tests/options' ls $dir t.application.optsfile = dir+'/DaVinci-Simplest.py
 %ENDSYNTAX%

NB: Be very careful not to copy-paste leading spaces; python does not like that at all.

Changed:
<
<
<!--envDict['DAVINCITESTSROOT']
dir=envDict['DAVINCITESTSROOT'] + '/tests/options'
ls $dir
t.application.optsfile = dir+'/DaVinci-Simplest.py' -->
>
>
<!-- Omitted for now, presuming it works!
t.application.optsfile = "~/cmtuser/myOptions/DaVinci-Simplest.py" -->
 

- Running it!

Revision 292012-10-23 - RobLambert

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

DaVinci Tutorial 0

We start with just running DaVinci for the first time, and getting some meaningful output.
Line: 65 to 65
 
  • A Ganga job is a set of instructions to run something, somewhere, and is very flexible.
  • This job was told to configure DaVinci and then call gaudirun.py with your options file
  • Ganga objects have their own help, can be printed and/or exported to save for later
Added:
>
>
  • Ganga objects are stored for you in your Jobs (automatic) Templates (automatic) and Box (manual)
 %SYNTAX{ syntax="python"}% print j
Added:
>
>
jobs #hit enter templates #hit enter box #hit enter help(box)
 help (j.application)
Changed:
<
<
export (j , "Tutorial.py") emacs Tutorial.py &
>
>
export(j , "Tutorial0.py") emacs Tutorial0.py &
 %ENDSYNTAX%

- Understanding the XMLSummary

Line: 106 to 111
 
  • You can return to this tutorial whenever you have a job which doesn't work, to check your environment is not screwed up.

Next

Changed:
<
<
  • Tutorial 0p5 will interface this now working job with the tutorial packages needed later (many examples and cool things to try)
>
>
  • Tutorial 0.5 will interface this now working job with the tutorial packages needed later (many examples and cool things to try)
 


Revision 282012-10-23 - RobLambert

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

DaVinci Tutorial 0

We start with just running DaVinci for the first time, and getting some meaningful output.
Line: 6 to 6
 
Changed:
<
<

Creating Ganga template for DaVinci jobs

>
>

- Making a place to store your common options

 
Changed:
<
<
Ganga is the preferred fronetend for LHCb jobs, before you start with DaVinci you should really have done the GangaTutorial1. You don't need to copy any files locally to run the latest version of DaVinci in ganga.
>
>
Often your collaborators and colleagues will have some Erasmus package to store options files ... you don't need to be that complicated yet though
<!-- SyntaxHighlightingPlugin -->
mkdir ~/cmtuser/myOptions
cp /afs/cern/ch/user/r/rlambert/public/DVTutorial/DaVinci-Simplest.py ~/cmtuser/myOptions
<!-- end SyntaxHighlightingPlugin -->

- Creating Ganga template for DaVinci jobs

Ganga is the preferred frontend for LHCb jobs, before you start with DaVinci you should really have done the GangaTutorial1, but it is not absolutely necessary.

To run whichever DaVinci you want, the only thing you need locally should ideally be an options file. If your options are stored in Erasmus, you might not even need that!

  You might already have done part of this. It doesn't harm to redo it.
Changed:
<
<
Set environment for Ganga:
<!-- SyntaxHighlightingPlugin -->
SetupProject Ganga
<!-- end SyntaxHighlightingPlugin -->
and take the latest version (5-8-16 at time of writing). If you have last used ganga before version 5.1 you may need to do
<!-- SyntaxHighlightingPlugin -->
ganga -g
<!-- end SyntaxHighlightingPlugin -->
Now start an interactive session:
<!-- SyntaxHighlightingPlugin -->
ganga
<!-- end SyntaxHighlightingPlugin -->
At the ganga prompt type:
<!-- SyntaxHighlightingPlugin -->
t = JobTemplate( application = DaVinci())
<!-- end SyntaxHighlightingPlugin -->
You can access the environment for the package directly in Ganga, and get one of the standard DaVinci test options files to run with. %SYNTAX{ syntax="python"}%
>
>
  1. Set environment for Ganga:
    <!-- SyntaxHighlightingPlugin -->
SetupProject Ganga
<!-- end SyntaxHighlightingPlugin -->
    • and take the latest version (5-8-16 at time of writing).
    • If you have last used ganga an age ago, or this is your first time
      <!-- SyntaxHighlightingPlugin -->
ganga -g
<!-- end SyntaxHighlightingPlugin -->
  1. Now start an interactive session:
    <!-- SyntaxHighlightingPlugin -->
ganga
<!-- end SyntaxHighlightingPlugin -->
  1. At the ganga prompt type:
    <!-- SyntaxHighlightingPlugin -->
t = JobTemplate( name="DVTutorial0", application = DaVinci())
<!-- end SyntaxHighlightingPlugin -->
  1. You can access the environment for the package directly in Ganga, and setup your simple options file.%SYNTAX{ syntax="python"}%
 envDict=t.application.getenv()
Changed:
<
<
envDict['DAVINCITESTSROOT']
>
>
print envDict # the result of calling SetupProject DaVinci t.application.optsfile = "~/cmtuser/myOptions/DaVinci-Simplest.py" %ENDSYNTAX%

NB: Be very careful not to copy-paste leading spaces; python does not like that at all.

<!--envDict['DAVINCITESTSROOT']
 dir=envDict['DAVINCITESTSROOT'] + '/tests/options' ls $dir
Changed:
<
<
t.application.optsfile = dir+'/DVTestReadDst.py' %ENDSYNTAX% Be very careful not to copy-paste leading spaces; python does not like that at all.
>
>
t.application.optsfile = dir+'/DaVinci-Simplest.py' -->
 
Changed:
<
<

Running it!

>
>

- Running it!

  %SYNTAX{ syntax="python"}% j=Job(t)
Added:
>
>
j.backend=Interactive()
 j.submit() %ENDSYNTAX% Once the job has completed, you can peek the stdout, and get familiar with what DaVinci looks like for such a simple job.
Changed:
<
<

Submit Options

>
>

- Submit Options

 
Changed:
<
<
If you want the output to the terminal do:
<!-- SyntaxHighlightingPlugin -->
j.backend=Interactive()
<!-- end SyntaxHighlightingPlugin -->
you can also use LSF, Local, Dirac... For small tests, interactive or local is usually best. For larger amounts of data, you'll need to run either on the LSF batch system or on the Grid.
  • Before you submit you can export the file:
<!-- SyntaxHighlightingPlugin -->
export (j , "Tutorial.py")
<!-- end SyntaxHighlightingPlugin -->
>
>
If you want the output to a file instead of to the terminal do:
<!-- SyntaxHighlightingPlugin -->
j.backend=Local()
<!-- end SyntaxHighlightingPlugin -->
Now you have a job which works, you can try submitting the same job to LSF or even Dirac backends.
 
Changed:
<
<

Adding the XMLSummary: Getting some information back!

>
>
The input file used for this tutorial, though, is a PFN located at CERN (for simplicity)... in the next step we will get some data from the book-keeping, allowing you to run anywhere in the world via the GRID.
 
Changed:
<
<
You'll need to use the latest version of ganga (5-8-16) to ensure this part works.
>
>

- What did I just do?

 
Changed:
<
<
The stdout is very confusing, however it can be condensed into an xml file for easy reading. This XMLSummary can be added to any LHCb application.
>
>
  • You made a "job" inside "Ganga".
  • A Ganga job is a set of instructions to run something, somewhere, and is very flexible.
  • This job was told to configure DaVinci and then call gaudirun.py with your options file
  • Ganga objects have their own help, can be printed and/or exported to save for later
 %SYNTAX{ syntax="python"}%
Changed:
<
<
dir=envDict['XMLSUMMARYKERNELROOT']+'/options' t.application.optsfile.append(dir+'/add-XMLSummary.py') t.outputsandbox.append('summary.xml')
>
>
print j help (j.application) export (j , "Tutorial.py") emacs Tutorial.py &
 %ENDSYNTAX%
Deleted:
<
<
or:
<!-- SyntaxHighlightingPlugin -->
t.application.extraopts='''from Gaudi.Configuration import *
from Configurables import LHCbApp
LHCbApp().XMLSummary='summary.xml'
'''
t.outputsandbox.append('summary.xml')
<!-- end SyntaxHighlightingPlugin -->
Then run a new job:
<!-- SyntaxHighlightingPlugin -->
j=Job(t)
j.submit()
<!-- end SyntaxHighlightingPlugin -->
Once the job has completed, you can peek the summary.xml file, which will list the files you have interacted with, the counters you have produced in algorithms, and the status of the job.
 
Changed:
<
<
The XMLSummary can be interpreted directly in python, and is documented with a full FAQ here:XMLSummaryFAQ
>
>

- Understanding the XMLSummary

 
Changed:
<
<

Next

  • You can try out some of the other standard options files, and/or move onto the Tutorial in DaVinciTutorial0p5
>
>
You'll need to use the latest version of ganga (5-8-16) to ensure this part works.
 
Added:
>
>
The stdout is very confusing, however it can be condensed into an xml file for easy reading.
  • This XMLSummary can be added to any LHCb application, and it is Automatically added by the latest Ganga.
  • peek the summary.xml file, which will list the files you have interacted with, the counters you have produced in algorithms, and the status of the job.
  • j.peek("summary.xml")
  • The XMLSummary can be interpreted directly in python, and is documented with a full FAQ here:XMLSummaryFAQ
  • The XMLSummary can be merged using a standard ganga merger (unlike stdout which is tough to merge)
  • Also there are some nice new ways of interpreting this information directly inside Ganga with the j.metadata.

- Understanding the options

  1. Open up the options file you just submitted...(from ganga type:)
    <!-- SyntaxHighlightingPlugin -->
!emacs $t.application.optsfile[0].name &
<!-- end SyntaxHighlightingPlugin -->
  1. Can you understand what it is doing?
  2. Compare this with what appears in the XMLSummary and the stdout.
  3. Does the job do what you expect?
  4. Was the job successful?

DaVinci-Simple.py is the simplest options file required to run DaVinci and make some output you can play with in other tutorials. Notice that there are still several parts you need to set yourself even in the simplest case. Ask a colleague what they are for if you are stuck.


.

What did you learn?

  • You now have a DaVinci job which runs and produces some output.
  • This is the first hurdle in LHCb software, congratulations!!
  • Now that you have one job which works, you only need to copy and edit it around with j.copy(True), or by editing the template you made above, to produce anything you might want ...
  • You can return to this tutorial whenever you have a job which doesn't work, to check your environment is not screwed up.

Next

  • Tutorial 0p5 will interface this now working job with the tutorial packages needed later (many examples and cool things to try)
  • Move onto the Tutorial in DaVinciTutorial0p5
 
Changed:
<
<
-- RobLambert - 18-Jan-2010
>
>

 
META PREFERENCE name="DAVINCIVERSION" title="DAVINCIVERSION" type="Set" value="v33r0"
META PREFERENCE name="TUTORIALVERSION" title="TUTORIALVERSION" type="Set" value="v10r4"

Revision 272012-10-22 - RobLambert

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

DaVinci Tutorial 0

We start with just running DaVinci for the first time, and getting some meaningful output.
Line: 26 to 26
 You can access the environment for the package directly in Ganga, and get one of the standard DaVinci test options files to run with. %SYNTAX{ syntax="python"}% envDict=t.application.getenv()
Changed:
<
<
envDict['DAVINCIROOT'] dir=envDict['DAVINCIROOT'] + '/options'
>
>
envDict['DAVINCITESTSROOT'] dir=envDict['DAVINCITESTSROOT'] + '/tests/options'
 ls $dir
Changed:
<
<
t.application.optsfile = dir+'/DaVinci-ReadDst.py'
>
>
t.application.optsfile = dir+'/DVTestReadDst.py'
 %ENDSYNTAX% Be very careful not to copy-paste leading spaces; python does not like that at all.

Revision 262012-10-22 - RobLambert

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

DaVinci Tutorial 0

We start with just running DaVinci for the first time, and getting some meaningful output.
Line: 29 to 29
 envDict['DAVINCIROOT'] dir=envDict['DAVINCIROOT'] + '/options' ls $dir
Changed:
<
<
t.application.optsfile = [ File( dir+'/DaVinci-ReadDst.py' ) ]
>
>
t.application.optsfile = dir+'/DaVinci-ReadDst.py'
 %ENDSYNTAX% Be very careful not to copy-paste leading spaces; python does not like that at all.

Revision 252012-10-16 - PatrickSKoppenburg

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

DaVinci Tutorial 0

We start with just running DaVinci for the first time, and getting some meaningful output.
Line: 83 to 83
  -- RobLambert - 18-Jan-2010
Changed:
<
<
META PREFERENCE name="DAVINCIVERSION" title="DAVINCIVERSION" type="Set" value="v30r2"
META PREFERENCE name="TUTORIALVERSION" title="TUTORIALVERSION" type="Set" value="v10r2p1"
META PREFERENCE name="GANGAVERSION" title="GANGAVERSION" type="Set" value="v507r9"
>
>
META PREFERENCE name="DAVINCIVERSION" title="DAVINCIVERSION" type="Set" value="v33r0"
META PREFERENCE name="TUTORIALVERSION" title="TUTORIALVERSION" type="Set" value="v10r4"
META PREFERENCE name="GANGAVERSION" title="GANGAVERSION" type="Set" value="5-8-16"
 |*META PREFERENCE*|name="SYNTAXHIGHLIGHTINGPLUGIN_FORMAT_PREPEND" title="SYNTAXHIGHLIGHTINGPLUGIN_FORMAT_PREPEND" type="Set" value="
"|

Revision 242012-03-20 - PatrickSKoppenburg

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

DaVinci Tutorial 0

We start with just running DaVinci for the first time, and getting some meaningful output.
Line: 51 to 51
 

Adding the XMLSummary: Getting some information back!

Changed:
<
<
You'll need to use the latest version of ganga (v504r5) to ensure this part works.
>
>
You'll need to use the latest version of ganga (5-8-16) to ensure this part works.
  The stdout is very confusing, however it can be condensed into an xml file for easy reading. This XMLSummary can be added to any LHCb application.
Line: 83 to 83
  -- RobLambert - 18-Jan-2010
Changed:
<
<
META PREFERENCE name="DAVINCIVERSION" title="DAVINCIVERSION" type="Set" value="v30r0p1"
>
>
META PREFERENCE name="DAVINCIVERSION" title="DAVINCIVERSION" type="Set" value="v30r2"
 
META PREFERENCE name="TUTORIALVERSION" title="TUTORIALVERSION" type="Set" value="v10r2p1"
META PREFERENCE name="GANGAVERSION" title="GANGAVERSION" type="Set" value="v507r9"
|*META PREFERENCE*|name="SYNTAXHIGHLIGHTINGPLUGIN_FORMAT_PREPEND" title="SYNTAXHIGHLIGHTINGPLUGIN_FORMAT_PREPEND" type="Set" value="
"|

Revision 232012-03-09 - PatrickSKoppenburg

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

DaVinci Tutorial 0

We start with just running DaVinci for the first time, and getting some meaningful output.
Line: 83 to 83
  -- RobLambert - 18-Jan-2010
Changed:
<
<
META PREFERENCE name="DAVINCIVERSION" title="DAVINCIVERSION" type="Set" value="v30r1p1"
>
>
META PREFERENCE name="DAVINCIVERSION" title="DAVINCIVERSION" type="Set" value="v30r0p1"
 
META PREFERENCE name="TUTORIALVERSION" title="TUTORIALVERSION" type="Set" value="v10r2p1"
META PREFERENCE name="GANGAVERSION" title="GANGAVERSION" type="Set" value="v507r9"
|*META PREFERENCE*|name="SYNTAXHIGHLIGHTINGPLUGIN_FORMAT_PREPEND" title="SYNTAXHIGHLIGHTINGPLUGIN_FORMAT_PREPEND" type="Set" value="
"|

Revision 222012-03-09 - PatrickSKoppenburg

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

DaVinci Tutorial 0

We start with just running DaVinci for the first time, and getting some meaningful output.
Line: 83 to 83
  -- RobLambert - 18-Jan-2010
Changed:
<
<
META PREFERENCE name="DAVINCIVERSION" title="DAVINCIVERSION" type="Set" value="v29r2"
META PREFERENCE name="TUTORIALVERSION" title="TUTORIALVERSION" type="Set" value="v10r2"
META PREFERENCE name="GANGAVERSION" title="GANGAVERSION" type="Set" value="v507r1"
>
>
META PREFERENCE name="DAVINCIVERSION" title="DAVINCIVERSION" type="Set" value="v30r1p1"
META PREFERENCE name="TUTORIALVERSION" title="TUTORIALVERSION" type="Set" value="v10r2p1"
META PREFERENCE name="GANGAVERSION" title="GANGAVERSION" type="Set" value="v507r9"
 |*META PREFERENCE*|name="SYNTAXHIGHLIGHTINGPLUGIN_FORMAT_PREPEND" title="SYNTAXHIGHLIGHTINGPLUGIN_FORMAT_PREPEND" type="Set" value="
"|

Revision 212011-12-02 - PatrickSKoppenburg

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

DaVinci Tutorial 0

We start with just running DaVinci for the first time, and getting some meaningful output.
Line: 83 to 83
  -- RobLambert - 18-Jan-2010
Changed:
<
<
META PREFERENCE name="DAVINCIVERSION" title="DAVINCIVERSION" type="Set" value="v28r1p1"
META PREFERENCE name="TUTORIALVERSION" title="TUTORIALVERSION" type="Set" value="v10r1"
META PREFERENCE name="GANGAVERSION" title="GANGAVERSION" type="Set" value="v505r26"
>
>
META PREFERENCE name="DAVINCIVERSION" title="DAVINCIVERSION" type="Set" value="v29r2"
META PREFERENCE name="TUTORIALVERSION" title="TUTORIALVERSION" type="Set" value="v10r2"
META PREFERENCE name="GANGAVERSION" title="GANGAVERSION" type="Set" value="v507r1"
 |*META PREFERENCE*|name="SYNTAXHIGHLIGHTINGPLUGIN_FORMAT_PREPEND" title="SYNTAXHIGHLIGHTINGPLUGIN_FORMAT_PREPEND" type="Set" value="
"|

Revision 202011-03-25 - PatrickSKoppenburg

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

DaVinci Tutorial 0

We start with just running DaVinci for the first time, and getting some meaningful output.
Line: 83 to 83
  -- RobLambert - 18-Jan-2010
Changed:
<
<
META PREFERENCE name="DAVINCIVERSION" title="DAVINCIVERSION" type="Set" value="v28r1p2"
>
>
META PREFERENCE name="DAVINCIVERSION" title="DAVINCIVERSION" type="Set" value="v28r1p1"
 
META PREFERENCE name="TUTORIALVERSION" title="TUTORIALVERSION" type="Set" value="v10r1"
META PREFERENCE name="GANGAVERSION" title="GANGAVERSION" type="Set" value="v505r26"
|*META PREFERENCE*|name="SYNTAXHIGHLIGHTINGPLUGIN_FORMAT_PREPEND" title="SYNTAXHIGHLIGHTINGPLUGIN_FORMAT_PREPEND" type="Set" value="
"|

Revision 192011-03-25 - PatrickSKoppenburg

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

DaVinci Tutorial 0

We start with just running DaVinci for the first time, and getting some meaningful output.
Line: 83 to 83
  -- RobLambert - 18-Jan-2010
Changed:
<
<
META PREFERENCE name="DAVINCIVERSION" title="DAVINCIVERSION" type="Set" value="v28r1p1"
>
>
META PREFERENCE name="DAVINCIVERSION" title="DAVINCIVERSION" type="Set" value="v28r1p2"
 
META PREFERENCE name="TUTORIALVERSION" title="TUTORIALVERSION" type="Set" value="v10r1"
META PREFERENCE name="GANGAVERSION" title="GANGAVERSION" type="Set" value="v505r26"
|*META PREFERENCE*|name="SYNTAXHIGHLIGHTINGPLUGIN_FORMAT_PREPEND" title="SYNTAXHIGHLIGHTINGPLUGIN_FORMAT_PREPEND" type="Set" value="
"|

Revision 182011-03-25 - PatrickSKoppenburg

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

DaVinci Tutorial 0

We start with just running DaVinci for the first time, and getting some meaningful output.
Line: 84 to 84
 -- RobLambert - 18-Jan-2010

META PREFERENCE name="DAVINCIVERSION" title="DAVINCIVERSION" type="Set" value="v28r1p1"
Changed:
<
<
META PREFERENCE name="TUTORIALVERSION" title="TUTORIALVERSION" type="Set" value="v10r0"
>
>
META PREFERENCE name="TUTORIALVERSION" title="TUTORIALVERSION" type="Set" value="v10r1"
 
META PREFERENCE name="GANGAVERSION" title="GANGAVERSION" type="Set" value="v505r26"
|*META PREFERENCE*|name="SYNTAXHIGHLIGHTINGPLUGIN_FORMAT_PREPEND" title="SYNTAXHIGHLIGHTINGPLUGIN_FORMAT_PREPEND" type="Set" value="
"|

Revision 172011-03-23 - PatrickSKoppenburg

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

DaVinci Tutorial 0

We start with just running DaVinci for the first time, and getting some meaningful output.
Line: 83 to 83
  -- RobLambert - 18-Jan-2010
Changed:
<
<
META PREFERENCE name="DAVINCIVERSION" title="DAVINCIVERSION" type="Set" value="v26r3p2"
META PREFERENCE name="TUTORIALVERSION" title="TUTORIALVERSION" type="Set" value="v8r7"
META PREFERENCE name="GANGAVERSION" title="GANGAVERSION" type="Set" value="v505r16"
>
>
META PREFERENCE name="DAVINCIVERSION" title="DAVINCIVERSION" type="Set" value="v28r1p1"
META PREFERENCE name="TUTORIALVERSION" title="TUTORIALVERSION" type="Set" value="v10r0"
META PREFERENCE name="GANGAVERSION" title="GANGAVERSION" type="Set" value="v505r26"
 |*META PREFERENCE*|name="SYNTAXHIGHLIGHTINGPLUGIN_FORMAT_PREPEND" title="SYNTAXHIGHLIGHTINGPLUGIN_FORMAT_PREPEND" type="Set" value="
"|

Revision 162011-01-05 - JeremyDickensExCern

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

DaVinci Tutorial 0

We start with just running DaVinci for the first time, and getting some meaningful output.

Revision 152010-12-01 - RobLambert

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

DaVinci Tutorial 0

We start with just running DaVinci for the first time, and getting some meaningful output.
Line: 83 to 83
  -- RobLambert - 18-Jan-2010
Changed:
<
<
META PREFERENCE name="DAVINCIVERSION" title="DAVINCIVERSION" type="Set" value="v24r7p2"
META PREFERENCE name="TUTORIALVERSION" title="TUTORIALVERSION" type="Set" value="v8r3p1"
META PREFERENCE name="GANGAVERSION" title="GANGAVERSION" type="Set" value="v504r5"
>
>
META PREFERENCE name="DAVINCIVERSION" title="DAVINCIVERSION" type="Set" value="v26r3p2"
META PREFERENCE name="TUTORIALVERSION" title="TUTORIALVERSION" type="Set" value="v8r7"
META PREFERENCE name="GANGAVERSION" title="GANGAVERSION" type="Set" value="v505r16"
 |*META PREFERENCE*|name="SYNTAXHIGHLIGHTINGPLUGIN_FORMAT_PREPEND" title="SYNTAXHIGHLIGHTINGPLUGIN_FORMAT_PREPEND" type="Set" value="
"|

Revision 142010-10-01 - unknown

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

DaVinci Tutorial 0

We start with just running DaVinci for the first time, and getting some meaningful output.
Line: 56 to 56
 The stdout is very confusing, however it can be condensed into an xml file for easy reading. This XMLSummary can be added to any LHCb application. %SYNTAX{ syntax="python"}%
Changed:
<
<
dir=e['XMLSUMMARYKERNELROOT']+'/options'
>
>
dir=envDict['XMLSUMMARYKERNELROOT']+'/options'
 t.application.optsfile.append(dir+'/add-XMLSummary.py') t.outputsandbox.append('summary.xml') %ENDSYNTAX%

Revision 132010-10-01 - unknown

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

DaVinci Tutorial 0

We start with just running DaVinci for the first time, and getting some meaningful output.
Line: 25 to 25
 %ENDSYNTAX% You can access the environment for the package directly in Ganga, and get one of the standard DaVinci test options files to run with. %SYNTAX{ syntax="python"}%
Changed:
<
<
e=t.application.getenv() e['DAVINCIROOT'] dir=e['DAVINCIROOT'] + '/options'
>
>
envDict=t.application.getenv() envDict['DAVINCIROOT'] dir=envDict['DAVINCIROOT'] + '/options'
 ls $dir t.application.optsfile = [ File( dir+'/DaVinci-ReadDst.py' ) ] %ENDSYNTAX%

Revision 122010-10-01 - unknown

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

DaVinci Tutorial 0

We start with just running DaVinci for the first time, and getting some meaningful output.
Line: 6 to 6
 
Deleted:
<
<

Platform Warning

Ganga is not yet fully operational on slc5. We encourage newcomers to log in to lxplus4.cern.ch to run this tutorial.
 

Creating Ganga template for DaVinci jobs

Ganga is the preferred fronetend for LHCb jobs, before you start with DaVinci you should really have done the GangaTutorial1.

Revision 112010-04-12 - MoritzKarbach

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

DaVinci Tutorial 0

We start with just running DaVinci for the first time, and getting some meaningful output.
Line: 37 to 37
 %ENDSYNTAX% Be very careful not to copy-paste leading spaces; python does not like that at all.
Changed:
<
<

Runing it!

>
>

Running it!

  %SYNTAX{ syntax="python"}% j=Job(t)

Revision 102010-02-18 - RobLambert

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

DaVinci Tutorial 0

We start with just running DaVinci for the first time, and getting some meaningful output.
Line: 45 to 45
 %ENDSYNTAX% Once the job has completed, you can peek the stdout, and get familiar with what DaVinci looks like for such a simple job.
Added:
>
>

Submit Options

If you want the output to the terminal do:

<!-- SyntaxHighlightingPlugin -->
j.backend=Interactive()
<!-- end SyntaxHighlightingPlugin -->
you can also use LSF, Local, Dirac... For small tests, interactive or local is usually best. For larger amounts of data, you'll need to run either on the LSF batch system or on the Grid.
  • Before you submit you can export the file:
<!-- SyntaxHighlightingPlugin -->
export (j , "Tutorial.py")
<!-- end SyntaxHighlightingPlugin -->
 

Adding the XMLSummary: Getting some information back!

You'll need to use the latest version of ganga (v504r5) to ensure this part works.

Revision 92010-02-01 - RobLambert

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

DaVinci Tutorial 0

We start with just running DaVinci for the first time, and getting some meaningful output.
Line: 71 to 71
 %ENDSYNTAX% Once the job has completed, you can peek the summary.xml file, which will list the files you have interacted with, the counters you have produced in algorithms, and the status of the job.
Changed:
<
<
The XMLSummary can be interpreted directly in python, and is documented witha full FAQ here:XMLSummaryFAQ
>
>
The XMLSummary can be interpreted directly in python, and is documented witha full FAQ here:XMLSummaryFAQ
 

Next

  • You can try out some of the other standard options files, and/or move onto the Tutorial in DaVinciTutorial0p5

Revision 82010-02-01 - RobLambert

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

DaVinci Tutorial 0

We start with just running DaVinci for the first time, and getting some meaningful output.
Line: 61 to 61
 t.application.extraopts='''from Gaudi.Configuration import * from Configurables import LHCbApp LHCbApp().XMLSummary='summary.xml'
Added:
>
>
''' t.outputsandbox.append('summary.xml')
 %ENDSYNTAX% Then run a new job: %SYNTAX{ syntax="python"}%

Revision 72010-01-28 - RobLambert

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

DaVinci Tutorial 0

We start with just running DaVinci for the first time, and getting some meaningful output.
Line: 72 to 72
 The XMLSummary can be interpreted directly in python, and is documented witha full FAQ here:XMLSummaryFAQ

Next

Changed:
<
<
  • If you want to learn how to write your own options files, and your own C++, move to DaVinciTutorial1.
  • If you want to learn how to use existing options files, and existing C++, move to DaVinciTutorial4.
>
>
  • You can try out some of the other standard options files, and/or move onto the Tutorial in DaVinciTutorial0p5
 

-- RobLambert - 18-Jan-2010

Revision 62010-01-28 - PatrickSKoppenburg

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

DaVinci Tutorial 0

We start with just running DaVinci for the first time, and getting some meaningful output.
Line: 78 to 78
 

-- RobLambert - 18-Jan-2010 \ No newline at end of file

Added:
>
>
META PREFERENCE name="DAVINCIVERSION" title="DAVINCIVERSION" type="Set" value="v24r7p2"
META PREFERENCE name="TUTORIALVERSION" title="TUTORIALVERSION" type="Set" value="v8r3p1"
META PREFERENCE name="GANGAVERSION" title="GANGAVERSION" type="Set" value="v504r5"
|*META PREFERENCE*|name="SYNTAXHIGHLIGHTINGPLUGIN_FORMAT_PREPEND" title="SYNTAXHIGHLIGHTINGPLUGIN_FORMAT_PREPEND" type="Set" value="
"|

Revision 52010-01-28 - PatrickSKoppenburg

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

DaVinci Tutorial 0

We start with just running DaVinci for the first time, and getting some meaningful output.

Revision 42010-01-28 - PatrickSKoppenburg

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

DaVinci Tutorial 0

We start with just running DaVinci for the first time, and getting some meaningful output.

Revision 32010-01-26 - RobLambert

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

DaVinci Tutorial 0

We start with just running DaVinci for the first time, and getting some meaningful output.
Line: 47 to 47
 

Adding the XMLSummary: Getting some information back!

Changed:
<
<
... currently there is a bug in Ganga preventing this... so just move on to tutorial1...
>
>
You'll need to use the latest version of ganga (v504r5) to ensure this part works.
  The stdout is very confusing, however it can be condensed into an xml file for easy reading. This XMLSummary can be added to any LHCb application.
Line: 56 to 56
 t.application.optsfile.append(dir+'/add-XMLSummary.py') t.outputsandbox.append('summary.xml') %ENDSYNTAX%
Added:
>
>
or:
<!-- SyntaxHighlightingPlugin -->
t.application.extraopts='''from Gaudi.Configuration import *
from Configurables import LHCbApp
LHCbApp().XMLSummary='summary.xml'
<!-- end SyntaxHighlightingPlugin -->
 Then run a new job:
<!-- SyntaxHighlightingPlugin -->
j=Job(t)
j.submit()
<!-- end SyntaxHighlightingPlugin -->
Changed:
<
<
Once the job has completed, you can peek the summary.xml file, which will list .
>
>
Once the job has completed, you can peek the summary.xml file, which will list the files you have interacted with, the counters you have produced in algorithms, and the status of the job.
  The XMLSummary can be interpreted directly in python, and is documented witha full FAQ here:XMLSummaryFAQ

Revision 22010-01-25 - RobLambert

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

DaVinci Tutorial 0

We start with just running DaVinci for the first time, and getting some meaningful output.
Line: 66 to 66
 The XMLSummary can be interpreted directly in python, and is documented witha full FAQ here:XMLSummaryFAQ

Next

Changed:
<
<
  • If you want to learn how to write your own options files, move to DaVinciTutorial1.
>
>
  • If you want to learn how to write your own options files, and your own C++, move to DaVinciTutorial1.
  • If you want to learn how to use existing options files, and existing C++, move to DaVinciTutorial4.
 

-- RobLambert - 18-Jan-2010

Revision 12010-01-18 - RobLambert

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

DaVinci Tutorial 0

We start with just running DaVinci for the first time, and getting some meaningful output. If you ever need to go back to the drawing board, you can start with this tutorial.

Platform Warning

Ganga is not yet fully operational on slc5. We encourage newcomers to log in to lxplus4.cern.ch to run this tutorial.

Creating Ganga template for DaVinci jobs

Ganga is the preferred fronetend for LHCb jobs, before you start with DaVinci you should really have done the GangaTutorial1. You don't need to copy any files locally to run the latest version of DaVinci in ganga.

You might already have done part of this. It doesn't harm to redo it. Set environment for Ganga:

<!-- SyntaxHighlightingPlugin -->
SetupProject Ganga
<!-- end SyntaxHighlightingPlugin -->
and take the latest version (5-8-16 at time of writing). If you have last used ganga before version 5.1 you may need to do
<!-- SyntaxHighlightingPlugin -->
ganga -g
<!-- end SyntaxHighlightingPlugin -->
Now start an interactive session:
<!-- SyntaxHighlightingPlugin -->
ganga
<!-- end SyntaxHighlightingPlugin -->
At the ganga prompt type:
<!-- SyntaxHighlightingPlugin -->
t = JobTemplate( application = DaVinci())
<!-- end SyntaxHighlightingPlugin -->
You can access the environment for the package directly in Ganga, and get one of the standard DaVinci test options files to run with.
<!-- SyntaxHighlightingPlugin -->
e=t.application.getenv()
e['DAVINCIROOT']
dir=e['DAVINCIROOT'] + '/options'
ls $dir
t.application.optsfile = [ File( dir+'/DaVinci-ReadDst.py' ) ]
<!-- end SyntaxHighlightingPlugin -->
Be very careful not to copy-paste leading spaces; python does not like that at all.

Runing it!

<!-- SyntaxHighlightingPlugin -->
j=Job(t)
j.submit()
<!-- end SyntaxHighlightingPlugin -->
Once the job has completed, you can peek the stdout, and get familiar with what DaVinci looks like for such a simple job.

Adding the XMLSummary: Getting some information back!

... currently there is a bug in Ganga preventing this... so just move on to tutorial1...

The stdout is very confusing, however it can be condensed into an xml file for easy reading. This XMLSummary can be added to any LHCb application.

<!-- SyntaxHighlightingPlugin -->
dir=e['XMLSUMMARYKERNELROOT']+'/options'
t.application.optsfile.append(dir+'/add-XMLSummary.py')
t.outputsandbox.append('summary.xml')
<!-- end SyntaxHighlightingPlugin -->
Then run a new job:
<!-- SyntaxHighlightingPlugin -->
j=Job(t)
j.submit()
<!-- end SyntaxHighlightingPlugin -->
Once the job has completed, you can peek the summary.xml file, which will list .

The XMLSummary can be interpreted directly in python, and is documented witha full FAQ here:XMLSummaryFAQ

Next

  • If you want to learn how to write your own options files, move to DaVinciTutorial1.

-- RobLambert - 18-Jan-2010

 
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