An AGDD “XmlFileBuilder”

Slides:



Advertisements
Similar presentations
Overview of programming in C C is a fast, efficient, flexible programming language Paradigm: C is procedural (like Fortran, Pascal), not object oriented.
Advertisements

Programming Paradigms Introduction. 6/15/2005 Copyright 2005, by the authors of these slides, and Ateneo de Manila University. All rights reserved. L1:
Chapter 2: Using Objects Part 1. To learn about variables To understand the concepts of classes and objects To be able to call methods To learn about.
Introducing Programming a general discussion. What is a Program? Sets of instructions that get the computer to do something Programs may be a few lines.
Archil Surmava Georgian Technical University SCSWT Oct 23, 2012.
Introduction to Functions Programming. COMP102 Prog Fundamentals I: Introduction to Functions /Slide 2 Introduction to Functions l A complex problem is.
Computer Science 1620 Loops.
Engineering Problem Solving With C++ An Object Based Approach Fundamental Concepts Chapter 1 Engineering Problem Solving.
1 Programming for Engineers in Python Autumn Lecture 5: Object Oriented Programming.
1 Engineering Problem Solving With C++ An Object Based Approach Fundamental Concepts Chapter 1 Engineering Problem Solving.
Chapter 2: Algorithm Discovery and Design
 Monday, 9/30/02, Slide #1 CS106 Introduction to CS1 Monday, 9/30/02  QUESTIONS (on HW02, etc.)??  Today: Libraries, program design  More on Functions!
COMP205 Comparative Programming Languages Part 1: Introduction to programming languages Lecture 3: Managing and reducing complexity, program processing.
SCT Geometry Status: December 2000
CS 101 Problem Solving and Structured Programming in C Sami Rollins Spring 2003.
COMP 14: Intro. to Intro. to Programming May 23, 2000 Nick Vallidis.
Chapter 2: Algorithm Discovery and Design
Chapter 2: Algorithm Discovery and Design
Chapter 3 Planning Your Solution
PRE-PROGRAMMING PHASE
CMSC 104, Version 8/061L18Functions1.ppt Functions, Part 1 of 4 Topics Using Predefined Functions Programmer-Defined Functions Using Input Parameters Function.
CCSA 221 Programming in C CHAPTER 2 SOME FUNDAMENTALS 1 ALHANOUF ALAMR.
Chapter 16 The World Wide Web. 2 The Web An infrastructure of information combined and the network software used to access it Web page A document that.
Java Class Syntax CSIS 3701: Advanced Object Oriented Programming.
Programming. What is a Program ? Sets of instructions that get the computer to do something Instructions are translated, eventually, to machine language.
Data Structures & AlgorithmsIT 0501 Algorithm Analysis I.
Chapter 2: Algorithm Discovery and Design Invitation to Computer Science, C++ Version, Third Edition.
Invitation to Computer Science, Java Version, Second Edition.
Java Classes Using Java Classes Introduction to UML.
Functions and subroutines – Computer and Programming.
Loops: Handling Infinite Processes CS 21a: Introduction to Computing I First Semester,
Computer Science 101 Introduction to Programming.
Chapter 8 High-Level Programming Languages. 8-2 Chapter Goals Describe the translation process and distinguish between assembly, compilation, interpretation,
Overview of Programming and Problem Solving Textbook Chapter 1 1.
Computer Programs and Programming Languages What are low-level languages and high-level languages? High-level language Low-level language Machine-dependent.
How to start Visual Studio 2008 or 2010 (command-line program)
Cohesion and Coupling CS 4311
XML in Atlas: from generic to parametric detector description Stan Bentvelsen NIKHEF Amsterdam XML workshop, CERN, May 22.
LAV Software Status Emanuele Leonardi – Tommaso Spadaro Photon Veto WG meeting – 2015/03/24.
© 2006 Pearson Education 1 More Operators  To round out our knowledge of Java operators, let's examine a few more  In particular, we will examine the.
The GeoModel Toolkit for Detector Description Joe Boudreau Vakho Tsulaia University of Pittsburgh CHEP’04 Interlaken.
Copyright © 2003 ProsoftTraining. All rights reserved. Perl Fundamentals.
Hands on AGDD*: Atlas Generic Detector Description in XML
In the name of God Computer Graphics.
Introduction to Python Dr. José M. Reyes Álamo. 2 Three Rules of Programming Rule 1: Think before you program Rule 2: A program is a human-readable set.
Computer Science I Looping. User input. Classwork/Homework: Incorporate looping & user input into a sketch.
CSCI 1226 FALL 2015 MIDTERM #1 REVIEWS.  Types of computers:  Personal computers  Embedded systems  Servers  Hardware:  I/O devices: mice, keyboards,
 Software Development Life Cycle  Software Development Tools  High Level Programming:  Structures  Algorithms  Iteration  Pseudocode  Order of.
CSCI-383 Object-Oriented Programming & Design Lecture 25.
Update G4builder issues Talk written almost entirely by Stan Bentvelsen with a few updates from Christopher Lester ATLAS G4 Workshop December 2000 CAMBRIDGE.
ALGORITHMS AND FLOWCHARTS. Why Algorithm is needed? 2 Computer Program ? Set of instructions to perform some specific task Is Program itself a Software.
Chapter 2: Algorithm Discovery and Design Invitation to Computer Science.
CSCI 161 Lecture 3 Martin van Bommel. Operating System Program that acts as interface to other software and the underlying hardware Operating System Utilities.
Lecture #1: Introduction to Algorithms and Problem Solving Dr. Hmood Al-Dossari King Saud University Department of Computer Science 6 February 2012.
Introduction to Computer Programming Concepts M. Uyguroğlu R. Uyguroğlu.
Software Engineering Algorithms, Compilers, & Lifecycle.
3.1 Fundamentals of algorithms
In the name of God Computer Graphics.
Engineering Problem Solving With C An Object Based Approach
Java for Beginners Level 6 University Greenwich Computing At School
Computer Programming.
CSC 221: Computer Programming I Spring 2010
DDC 1023 – Programming Technique
CSC 221: Computer Programming I Fall 2005
ALGORITHMS AND FLOWCHARTS
Java for Beginners University Greenwich Computing At School DASCO
Phil Tayco Slide version 1.0 Created Nov. 26, 2017
Java for Beginners University Greenwich Computing At School DASCO
CS150 Introduction to Computer Science 1
Java for Beginners University Greenwich Computing At School DASCO
Presentation transcript:

An AGDD “XmlFileBuilder”

AGDD_XmlFileBuilder Why do we need XmlFile builders?Why do we need XmlFile builders? What do we want from them?What do we want from them? What can AGDD_XmlFileBuilder do?What can AGDD_XmlFileBuilder do? Where can you get it?Where can you get it?

AGDD/XML files contain... Repeated numbers. Eg: tubes of similar design sharing common diameters but having different lengths. Functionally related numbers. Eg: translation x =width/2+cos(θ stereo ) Algorithmically related numbers. Eg: The problems … part 1 const int N=10; // number of trds for(int n=0; n<N; n++) { // loop over each trd trdSkew[n]=atan(n); // set skew angle }

AGDD/XML files contain... Repeated strings. Eg: ID definitions, and subsequent IDREFs. Functionally computed strings. Eg: waferName = “SCT_” + ( inner ? “inner” : “outer”) + “_wafer”; Algorithmically computed strings. Eg: The problems … part 2 const int N=10; // number of wafer types for(int n=0; n<N; n++) { // loop over each wafer // set name for wafer type... waferTypeName = “SCT_waferType_” + n; }

AGDD/XML files do have sources … – –Databases Assembly Breakdown (ABS) Production database – –Drawings – –Even peoples memories! … and all these change and update frequently. The problems … part 3 XmlFileBuilders can read some of these, and help keep XML files up to date.

XmlFileBuilders - what do we want from them? Freedom:Freedom: – –Freedom to use the full power of any developed language (C++, Java, Fortran, Perl, …) when building our XML file. Simplicity:Simplicity: – –Close relationship between builder code and output XML, but...

XmlFileBuilders - what do we want from them … Benefits:Benefits: – –“Out of order” building – –Reference management – –Syntax handling ( … ) – –Strong syntax checking – –Independence of output format / DTD – –Define complex constructions

What is AGDD_XmlFileBuilder? In the ATLAS software under offline/DetectorDescription/AGDD_XmlFileBuilderIn the ATLAS software under offline/DetectorDescription/AGDD_XmlFileBuilder The set of C++ tools comprisesThe set of C++ tools comprises –library –user tool classes –( and implementation classes … )

AGDD XmlFileBuilder in Action // Make new box: Box * myBox = new Box; // Set it’s parameters: myBox->setName(“myWafer”); myBox->setBox(length, width, height); myBox->setMaterial(silicon); // various possibilities...

AGDD XmlFileBuilder in Action // Make a positioner. We will use PosXYZ: PosXYZ * boxPos = new PosXYZ; PosXYZ * boxPos = new PosXYZ; // Set the positioner’s parameters: boxPos->setVolume(myBox); // Says what to position boxPos->setRot(10*degree, 0, 0); // Gives a rotation boxPos->setXYZ(0, 100*mm, 0); // Gives a translation

AGDD XmlFileBuilder in Action // Make a composition: Compos * doubleWafer = new Compos; Compos * doubleWafer = new Compos; // Fill the compostion: doubleWafer->setName(“double_wafer”); // Name the compos doubleWafer->addPos(boxPos); // What to put in doubleWafer->addPos(someOtherBoxPos); // … etc...

AGDD XmlFileBuilder in Action // Make a section: Section * mySection = new Section; Section * mySection = new Section; // Set the top volume, and print XML file! mySection->setName(“SCT_sensitive”); mySection->setTopVolume(doubleWafer); mySection->setAuthor(“Christopher Lester”); mySection->buildTheRoot(); // Fixes geometry in stone! mySection->sendMeTo(cout); // Alternatively print to a file...

Advanced features Use shapes which are not in the DTD, without forcing Marc to produce a new version of Persint! // Make a halfTrd: HalfTrd * shapeNotInDTD = new HalfTrd; // Set the top volume, and print XML file! shapeNotInDTD->setName(“wedge”); shapeNotInDTD->setHalfTrd(a, b1, b2, thickness); a b2 b1

Advanced features When two things are similar but not quite the same... // A function to return a complicated object: Compos * makeComplicatedLayer(int layerNumber) { Compos * layer = new Compos; layer->setName(“SCT_layer_”+layerNumber); if (layerNumber==2) { // Build the layer in a special way } else { /* Build the layer in the normal way */ }; return layer; };

Benefits summary Frees users from some limitations of AGDD/XML (see “What do we want?” slides)Frees users from some limitations of AGDD/XML (see “What do we want?” slides) Permits external sources of “fundamental parameters” from which to build XML filesPermits external sources of “fundamental parameters” from which to build XML files Meets goals for functional and algorithmical operations on parametersMeets goals for functional and algorithmical operations on parameters Permits complex objects to be manipulatedPermits complex objects to be manipulated

AGDD_XmlFileBuilder In the ATLAS software under offline/DetectorDescription/AGDD_XmlFileBuilderIn the ATLAS software under offline/DetectorDescription/AGDD_XmlFileBuilder Some examples in offline/InnerDetector/InDetDetDescr/SCT_AGDD_XmlFileBuilderSome examples in offline/InnerDetector/InDetDetDescr/SCT_AGDD_XmlFileBuilder

Down-sides: Someone has to maintain it ! :(Someone has to maintain it ! :( Tools must update with each DTDTools must update with each DTD –OK if update is minor –Hard work if change is major? At least the geometry code has a hope of staying the sameAt least the geometry code has a hope of staying the same Three things to version:Three things to version: –Inputs –Tools –GeoCode

AGDD_XmlFileBuilder Internal workings...