Difference: ProductionAPI (5 vs. 6)

Revision 62011-06-27 - StephanePoss

Line: 1 to 1
 
META TOPICPARENT name="ProductionProcedures"
-- StuartPaterson - 08 Apr 2009
Line: 15 to 15
 For information there are currently two files in DIRAC containing the Production API:

The 2 distinct results of the finalization are explained below:

Changed:
<
<
  • DIRAC/LHCbSystem/Client/Production.py - contains all the API methods;
  • DIRAC/LHCbSystem/Client/ProductionTemplates.py - to generate templates and provide examples.
>
>
  • LHCbDIRAC/Interfaces/API/Production.py - contains all the API methods;
  • LHCbDIRAC/Interfaces/API/ProductionTemplates.py - to generate templates and provide examples.
  Production.py inherits from LHCbJob.py so those who have a familiarity with the DIRAC API should be quite comfortable with the methods allowing some common settings to be applied at the production level if desired e.g.
Line: 40 to 40
 Optimizations still to be performed:
  • Stripping is yet to be fully implemented (pending something to test)
  • Storing production parameters after publishing the workflow - plenty of scope for useful things to be available here: output data directories , ....
Changed:
<
<
  • Factoring out the options into a separate LHCbSystem/Utilities/ProductionOptions.py utility for convenience (this will likely evolve faster than the API)
>
>
  • Factoring out the options into a separate LHCbDIRAC/Core/Utilities/ProductionOptions.py utility for convenience (this will likely evolve faster than the API)
 
  • Improved type checking is not in place purely due to time constraints.

A typical Gauss, Boole simulation workflow explained

Changed:
<
<
This template is also available in DIRAC/LHCbSystem/Client/ProductionTemplates.py and is included in full here before adding commentary line by line:
>
>
This template is also available in LHCbDIRAC/Interfaces/API/ProductionTemplates.py and is included in full here before adding commentary line by line:
 
Changed:
<
<
from LHCbSystem.Client.Production import *
>
>
from LHCbDIRAC.Interfaces.API.Production import *
 gaussBoole = Production() gaussBoole.setProdType('MCSimulation') gaussBoole.setWorkflowName('Production_GaussBoole')
Line: 67 to 67
  First the API must be imported:
Changed:
<
<
from LHCbSystem.Client.Production import *
>
>
from LHCbDIRAC.Interfaces.API.Production import *
  The production object encapsulates the workflow and should be instantiated:
Line: 181 to 181
 import sys xmlfile = str(sys.argv[1]) from DIRAC.Interfaces.API.Dirac import Dirac
Changed:
<
<
from LHCbJob import LHCbJob
>
>
from LHCbJob import LHCbJob
 d = Dirac() j = LHCbJob(xmlfile) print d.submit(j,mode='local')
Line: 270 to 270
 
(DIRAC3-production)[paterson@lxplus223 ~]$ cat gaussBooleBInclusive.py
Changed:
<
<
from LHCbSystem.Client.Production import *
>
>
from LHCbDIRAC.Interfaces.API.Production import *
 gaussBoole = Production() gaussBoole.setProdType('MCSimulation') gaussBoole.setWorkflowName('GaussBoole_500evt_inclusiveB_1')
Line: 320 to 320
 
(DIRAC3-production)[paterson@lxplus223 ~]$ cat insertBKPass4614.py 
# Bookkeeping publishing script created on Wed Apr  8 12:34:44 2009 by
Changed:
<
<
# by $Id: ProductionAPI.txt,v 1.5 2009/04/21 14:26:12 AndrewCSmith Exp $ from BookkeepingClient import BookkeepingClient
>
>
# by $Id: ProductionAPI.txt,v 1.5 2009/04/21 14:32:23 AndrewCSmith Exp $ from BookkeepingClient import BookkeepingClient
 bkClient = BookkeepingClient() bkDict = {'Production': 4614,'Steps': {'Step1': {'ApplicationName': 'Boole', 'ApplicationVersion': 'v16r3', 'ExtraPackages': '', 'DDDb': 'head-20081002', 'OptionFiles': 'Boole-2008.py', 'CondDb': 'head-20081002'}, 'Step0': {'ApplicationName': 'Gauss', 'ApplicationVersion': 'v35r1', 'ExtraPackages': 'AppConfig.v1r1', 'DDDb': 'head-20081002', 'OptionFiles': 'Gauss-2008.py;$APPCONFIGROOT/options/Gauss/RICHmirrorMisalignments.py;$DECFILESROOT/options/10000000.opts', 'CondDb': 'head-20081002'}}, 'GroupDescription': 'MC08-v1', 'SimulationConditions': {'BeamEnergy': '7 TeV', 'Generator': 'Pythia', 'Luminosity': 'Fixed 2 10**32', 'MagneticField': '-1', 'BeamCond': 'Collisions', 'DetectorCond': 'VeloClosed', 'SimDescription': 'Beam7TeV-VeloClosed-MagDown'}} print bkClient.addProduction(bkDict)
Line: 372 to 372
 Templates for both the express stream and full stream reconstruction are available in the ProductionTemplates.py file. The below example is for the express stream reconstruction:
Changed:
<
<
from LHCbSystem.Client.Production import *
>
>
from LHCbDIRAC.Interfaces.API.Production import *
 expressStream = Production() expressStream.setProdType('DataReconstruction') expressStream.setWorkflowName('Production_EXPRESS_FEST')
Line: 403 to 403
 
(DIRAC3-production)[paterson@lxplus243 ~]$ cat insertBKPass12345.py
# Bookkeeping publishing script created on Sun Apr  5 17:15:17 2009 by
Changed:
<
<
# by $Id: ProductionAPI.txt,v 1.5 2009/04/21 14:26:12 AndrewCSmith Exp $ from BookkeepingClient import BookkeepingClient
>
>
# by $Id: ProductionAPI.txt,v 1.5 2009/04/21 14:32:23 AndrewCSmith Exp $ from BookkeepingClient import BookkeepingClient
 bkClient = BookkeepingClient() bkDict = {'Production': 12345, 'Steps': {'Step1': {'ApplicationName': 'DaVinci', 'ApplicationVersion': 'v22r1', 'ExtraPackages': 'AppConfig.v2r2', 'DDDb': 'head-20090112', 'OptionFiles': '$APPCONFIGOPTS/DaVinci/DVMonitorDst.py', 'CondDB': 'head-20090112'}, 'Step0': {'ApplicationName': 'Brunel', 'ApplicationVersion': 'v34r2', 'ExtraPackages': 'AppConfig.v2r2', 'DDDb': 'head-20090112', 'OptionFiles': '$APPCONFIGOPTS/Brunel/FEST-200903.py', 'CondDB': 'head-20090112'}}, 'GroupDescription': 'FEST-Reco-v1', 'DataTakingConditions': 'DataTaking6153'} print bkClient.addProduction(bkDict)
 
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