software week 25. nov. 1999 gaudi
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 BSummaryTRANSCRIPT
European Laboratory for Particle Physics
Geneva
The new Job-Options-ServiceThe new Job-Options-Service
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
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
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>
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
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
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)
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
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
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