software week 25. nov. 1999 gaudi

11
Software Week 25. Nov. 1999 GAUDI http://www.cern.ch/probst [email protected]

Upload: ethel-atkinson

Post on 18-Jan-2018

216 views

Category:

Documents


0 download

DESCRIPTION

Overview User-Interaction Overview short overview of the “User-Interaction with the GAUDI-Framework” Part A: A reminder of the Job-Options- Service Part B: The new “Job-Options File”-Format Summary of the advantages of the new format Part APart BSummary

TRANSCRIPT

Page 1: Software Week 25. Nov. 1999 GAUDI

Software Week

25. Nov. 1999

GAUDI

http://www.cern.ch/probst [email protected]

Page 2: Software Week 25. Nov. 1999 GAUDI

European Laboratory for Particle Physics

Geneva

The new Job-Options-ServiceThe new Job-Options-Service

Page 3: Software Week 25. Nov. 1999 GAUDI

Overview

User-InteractionOverview

• short overview of the “User-Interaction with the GAUDI-Framework”

• Part A: A reminder of the Job-Options- Service

• Part B: The new “Job-Options File”-Format• Summary of the advantages of the new

format

Part A Part B Summary

Page 4: Software Week 25. Nov. 1999 GAUDI

short overviewthe interaction of the user with the

GAUDI-Framework

Job-Options-File

myAlgorithm...double myCut;...

.cpp.txt

...myAlgorithm.myCut = 77.23;... Job-Options-

Service

C++-Class

B A

User-InteractionOverview Part A Part B Summary

Page 5: Software Week 25. Nov. 1999 GAUDI

Part AA reminder of the Job-Options-Service

Properties? For what reason?• Member-Variables in C++-Classes controls / defines behavior• Methods to set up these member-variables:

Constructor (Initialization-List)Assignment (m_var = value;)

Recompilation of Class necessary!

Job-Option-Service• Reads out properties of a “Job-Options-File” into a “JobOptionsCatalogue”• Sets properties at runtime from JobOptionsCatalogue• No recompilation of Class necessary, only change Job-Options-File

User-InteractionOverview Part A Part B Summary

Possible C++Types• bool• int• double• string• std::vector <bool>• std::vector <int>• std::vector <double>• std::vector <string>

Page 6: Software Week 25. Nov. 1999 GAUDI

Part AA reminder of the Job-Options-Service

How to use the Job-Options-Service within C++-Classes• Several methods to deal with properties:• declare a member variable as a property: declareProperty( "HistogramFlag", m_produceHistogram = false );

• declares a member variable as a property.

• setting up properties from the JobOptionsCatalogue: setProperties();

• sets up all properties for the own (calling) object by reading out the value(s) from the JobOptionsCatalogue (automatically done by the framework!)

• assigning values to properties: SmartIF<IProperty> prop(IID_IProperty, AppMgrInstance); prop->setProperty(StringProperty("JobOptionsPath","jobOptions.txt"));

• assigns a value to a property

User-InteractionOverview Part A Part B Summary

Page 7: Software Week 25. Nov. 1999 GAUDI

Part Bthe new „Job-Options-File“ Format

New features:

• Possibility of including other Property-Files• Access definitions in the include-file (overwriting, extend vectors)• 3 types of statements (Assign-, Append- and Include-Statement)• Printout of compiled lines (“copy & paste”)• Checking of syntax and “internal” semantic errors• No need for an explicit declaration of value-type• well-defined syntax (C++ - like)• Boolean value is written as “true” or “false”• Comments like in C++ ( // - end of line, between /* */)

User-InteractionOverview Part A Part B Summary

Page 8: Software Week 25. Nov. 1999 GAUDI

Part Bthe new „Job-Options-File“ Format

User-InteractionOverview Part A Part B Summary

Include-Statement(includes a Standard-Option-File)

Append-Statementappending vectors defined in the

included file

Assignment-Statement(this one is overwriting a value defined

in the include-fileStrategy: The last wins)

Page 9: Software Week 25. Nov. 1999 GAUDI

Part Bthe new „Job-Options-File“ Format

Include-Directive:• including an other Job-Options-File• provide a “Standard-Setup” of the Framework• usage: #include “filename”

Assignment-Statement:• Assign a value (or vector of values) to an Object / Property• usage: Object.Property = value;

Append-Statement:• Extends a previous defined vector• usage: Object.Property += vectorValue; (Vector of…)

Possible Property-Types• boolean true• int 123• double 12.34• string “String”• Vector of boolean {true, false}• Vector of int {12, 153, -1e5}• Vector of double {1.2, -2.47e8}• Vector of string {“Str1”, “Str2”}

User-InteractionOverview Part A Part B Summary

Page 10: Software Week 25. Nov. 1999 GAUDI

SummaryAdvantages of the new Format

• possibility to provide a “Standard-Configuration” by including “Standard-Job-Options-Files”• influence “Standard-Configuration” by the possibility to overwrite or extend values.• Syntax easier than before (no need for extra-declaration of value-type)• Printout of compiled lines enables “copy & paste-actions”• Printout of errors and error-positions in the Job-Options- File

User-InteractionOverview Part A Part B Summary

Page 11: Software Week 25. Nov. 1999 GAUDI

SummaryObtain additional Information

E-mail: [email protected]: http://www.cern.ch/probst

• Additional Documentation• Presentation

Thanks for your attention...

User-InteractionOverview Part A Part B Summary