Advanced Athena Tutorial ADL/StoreGate ADL Exercises CERN, May/Mai 5, 2002.

Slides:



Advertisements
Similar presentations
Compilation and Debugging 101. Compilation in C/C++ hello.c Preprocessor Compiler stdio.h tmpXQ.i (C code) hello.o (object file)
Advertisements

Dayu Zhang 9/8/2014 Lab02. Example of Commands pwd --- show your current directory This is home of venus, not your home directory Tilde: means you are.
Georgia Institute of Technology Workshop for CS-AP Teachers Chapter 3 Advanced Object-Oriented Concepts.
Copyright © 2008 Pearson Addison-Wesley. All rights reserved. Chapter 12 Separate Compilation Namespaces Simple Make Files (Ignore all class references.
CS 110 Intro to Computer Science I Sami Rollins Fall 2006.
 2000 Deitel & Associates, Inc. All rights reserved. Chapter 17 - The Preprocessor Outline 17.1Introduction 17.2The #include Preprocessor Directive 17.3The.
© Copyright 1992–2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Chapter 13 - The Preprocessor Outline 13.1Introduction.
 2000 Prentice Hall, Inc. All rights reserved. Chapter 13 - The Preprocessor Outline 13.1Introduction 13.2The #include Preprocessor Directive 13.3The.
1 Basics of Linux On linux machine: Login at your home directory Open a “shell” or “terminal” or “xterm” workspace (4) On windows machine Intall linux.
1 SEEM3460 Tutorial Unix Introduction. 2 Introduction What is Unix? An operation system (OS), similar to Windows, MacOS X Why learn Unix? Greatest Software.
 2003 Prentice Hall, Inc. All rights reserved. 1 Chapter 19 - The Preprocessor Outline 19.1 Introduction 19.2 The #include Preprocessor Directive 19.3.
CprE 288 – Quick intro for compiling C in Linux
Introduction to C++ - How C++ Evolved Most popular languages currently: COBOL, Fortran, C, C++, Java (script) C was developed in 1970s at AT&T (Richie)
Subversion. What is Subversion? A Version Control System A successor to CVS and SourceSafe Essentially gives you a tracked, shared file system.
1 Further C  Multiple source code file projects  Structs  The preprocessor  Pointers.
The Pipeline Processing Framework LSST Applications Meeting IPAC Feb. 19, 2008 Raymond Plante National Center for Supercomputing Applications.
1 SEEM3460 Tutorial Unix Introduction. 2 Introduction Unix-like system is everywhere Linux Android for smartphones Google Chrome OS for Chromebook Web.
Programming in Java Unit 2. Class and variable declaration A class is best thought of as a template from which objects are created. You can create many.
The Structure of a C++ Program. Outline 1. Separate Compilation 2. The # Preprocessor 3. Declarations and Definitions 4. Organizing Decls & Defs into.
Athena and HEC Test Beam Reconstruction Tutorial October 12, 2001 CERN N. Kanaya, M. Marino, S. Rajagopalan, M. Wielers.
UNIX/LINUX Shells Shell is an UNIX/LINUX command interpreter. Shell command can be internal or external. The code to execute an internal command is part.
Our Environment We will exercise on Microsoft Visual C++ v.6 We will exercise on Microsoft Visual C++ v.6 because that is what we have in the univ. because.
Active-HDL Interfaces Building VHPI Applications C Compilation Course 9.
Copyright © 2015 – Curt Hill Version Control Systems Why use? What systems? What functions?
Generation of Radiative B-Decays Decay Channels Bs  Phi + Gamma Bd  K * + Gamma Gareth Brown, RAL PPD5/10/06 Thanks to, Bill, John, Monica and Julie.
The report on the current situation of the BESIII framework zhangxiaomei maqiumei 10/3/2004.
Computer Programming I Hour 2 - Writing Your First C Program.
C Hints and Tips The preprocessor and other fun toys.
Nirmalya Roy School of Electrical Engineering and Computer Science Washington State University Cpt S 223 – Advanced Data Structures C++ Review Part-I.
M. Schott (CERN) Page 1 CERN Group Tutorials CAT Tier-3 Tutorial October 2009.
Use of Gaudi in Reconstruction Weidong Li 23/06/2004.
Programming in Java CSCI-2220 Object Oriented Programming.
 2003 Prentice Hall, Inc. All rights reserved. 1 IS 0020 Program Design and Software Tools Preprocessing Lecture 12 April 7, 2005.
Real time code generation example with Envision UML-C++ ® by CASE-France Application : Multi Threads C++ Electronic Switch This example mainly shows states.
SPMA & SWRep: Basic exercises HEPiX hands-on, NIKHEF 5/03 German Cancio
1 ENGI 2420 Structured Programming (Lab Tutorial 7) Memorial University of Newfoundland.
Tutorial on Testbeam Software - CERN, March 10th 2005 Daniela Rebuzzi – Pavia University and INFN CTB_G4Sim Simulation.
Week 11 Multi-file Programs and Scope of Variables.
Argonne Jamboree January 2010 Esteban Fullana AOD example analysis.
Manage Directories and Files in Linux Part 2. 2 Identify File Types in the Linux System The file types in Linux referred to as normal files and directories.
CS-1030 Dr. Mark L. Hornick 1 Basic C++ State the difference between a function/class declaration and a function/class definition. Explain the purpose.
Setup and run athena locally and on grid Cunfeng feng
Tutorial: Examples (09may00 - ATLAS Software LBNL) May 2000 Prototype Framework Tutorial: Examples Paolo Calafiura, Charles Leggett HCG/NERSC/LBNL.
1 ENGI 2420 Structured Programming (Lab Tutorial 7) Memorial University of Newfoundland.
The Preprocessor Directives Introduction Preprocessing – Occurs before program compiled Inclusion of external files Definition of symbolic constants.
 2000 Prentice Hall, Inc. All rights reserved. Chapter 13 - The Preprocessor Outline 13.1Introduction 13.2The #include Preprocessor Directive 13.3The.
1 Object-Oriented Programming -- Using C++ Andres, Wen-Yuan Liao Department of Computer Science and Engineering De Lin Institute of Technology
Gaudi Framework Tutorial, April Creating Objects and Writing Data.
Dayu Zhang 9/10/2014 Lab03. Outline Brief Review of the 4 Steps in Hello.cpp Example Understand endl and \n Understand Comment Programming Exercise -
BESIII Offline Software Development Environment Ma qiumei * Development environment * Configuration & management tool * Software development.
Athena Tutorial: Liquid Argon Example ATHENA The ATLAS Control Framework Tutorial: Liquid Argon Example Based on original by S. Rajagopalan BNL.
ATLAS Data Dictionary A. Bazan, T. Bouedo, P. Ghez, T. Le Flour, S. Lieunard M. Marino, C. Tull.
27/02/04 ATLAS weekTileCal Athena tutorial, part 21 TileCal Athena tutorial Part 2: Reading GEANT hits from ZEBRA and POOL Reading HLT and testbeam ByteStream.
Athena StoreGate Tutorial: May 30, Objectives Learn how to access data objects using StoreGate How to record/retrieve by TYPE Optionally using keys.
Linux CSE 1222 CSE1222: Lecture 1BThe Ohio State University1.
Starting Analysis with Athena (Esteban Fullana Torregrosa) Rik Yoshida High Energy Physics Division Argonne National Laboratory.
Check of Calibration Hits in the Atlas simulation. Assignment of DM energy to CaloCluster. G.Pospelov Budker Institute of Nuclear Physics, Novosibirsk,
An AOD analysis example Esteban Fullana Torregrosa High Energy Physics Division Argonne National Laboratory.
AOD example analysis Argonne Jamboree January 2010
Chapter 13 - The Preprocessor
CISC124 Assignment 4 on Inheritance due next Monday, the 12th at 7pm.
Getting Started: Developing Code with Cloud9
Our Environment We will exercise on Microsoft Visual C++ v.6
Data and Flowcharts Session
Introduction to Athena
Converting ATLAS Events Into XML Files Janice Drohan (UCL)
C Programming Language
Data and Flowcharts Session
ROOT Support and Developments at FNAL
Presentation transcript:

Advanced Athena Tutorial ADL/StoreGate ADL Exercises CERN, May/Mai 5, 2002

31/05/02Advanced Athena Tutorial ADL Exercises 2 AAT - ADL Exercises ### login, start CMT and go to working directory source setup.sh cd maxidisk/Athena source setup_tut.csh ### Setup_tut.csh script: create empty packages for the Tutorial and checks out ADL and TestRelease: #cmt co -r dictionary Control/dictionary #cmt co TestRelease #cmt create Example1 Example TutorialMay02 #cmt create Example2 Example TutorialMay02 #cmt create LArCell LArCell TutorialMay02 #cmt create TileCell TileCell TutorialMay02 #cmt create CaloCell CaloCell TutorialMay02 #cmt create tutAlg tutAlg TutorialMay02 ### check pwd #--> /afs/cern.ch/user/a/atltrx/maxidisk/Athena ls #--> Control TestRelease TutorialMay02 Let’s Go !

31/05/02Advanced Athena Tutorial ADL Exercises 3 AAT - ADL Exercises Steps of Exercise 1: DataObject 1.Describe your Data: diagrams 2.Write corresponding ADL 3.Put ADL file in standard include directory 4.Edit “requirements“ for package Example1 and run “gmake“ locally 5.Look at the result: what was automatically generated

31/05/02Advanced Athena Tutorial ADL Exercises 4 AAT - ADL Exercises Your Diagram: CaloCell DataObject CaloCell double energy double time double eta double phi double x double y double z double quality double et() ADL Language Interface declaration interface or DataObject or ContainedObject or CollectionObject Attribute declaration [persistent] [readonly] [ ] attribute ; Method declaration ( [ [(, )*] ]); Exercise 1: DataObject - 1

31/05/02Advanced Athena Tutorial ADL Exercises 5 AAT - ADL Exercises Your Diagram: CaloCell DataObject CaloCell double energy double time double eta double phi double x double y double z double quality double et() Exercise 1: DataObject - 2 ADL code for CaloCell DataObject CaloCell { persistent attribute double energy; persistent attribute double time; persistent attribute double eta; persistent attribute double phi; persistent attribute double x; persistent attribute double y; persistent attribute double z; persistent attribute double quality; double et(); };

31/05/02Advanced Athena Tutorial ADL Exercises 6 AAT - ADL Exercises Exercise 1: DataObject - 3 ### create standard include directory (PkgName) cd TutorialMay02/Example1/Example mkdir Example1 cd Example1 vi CaloCell.adl #--> code: you did it ( previous slide )

31/05/02Advanced Athena Tutorial ADL Exercises 7 AAT - ADL Exercises Exercise 1: DataObject- 4 ### edit Example1 requirements cd../cmt vi requirements #--> add this: ### compile ADL (TestRelease NOT needed yet) cd../cmt gmake #--> don’t worry about some error messages ! use CxxFeatures CxxFeatures-00-* Utilities use GaudiInterface GaudiInterface-01-* External use AtlasPolicy AtlasPolicy-01-* use StoreGate StoreGate-02-* Control use dictionary dictionary * Control apply_pattern adl_dual_use_library \ adl_files="*.adl" \ src_files="*.cxx"

31/05/02Advanced Athena Tutorial ADL Exercises 8 AAT - ADL Exercises Exercise 1: DataObject - 5 ### what happened … look: cd../Example1 ls #--> CaloCell.adl CaloCell.h CaloCellInclude.h # automatic creation of correct include files cat CaloCell.h # automatic CLID cd../src ls #--> CaloCell.cxx cat CaloCell.cxx # automatic creation of.cxx with Constructor/Destructor and print of the attributes cd../autogen ls #--> naiveobjy pythonshadow tmp transient # internal and “hidden“ (don’t touch) directories and codes

31/05/02Advanced Athena Tutorial ADL Exercises 9 AAT - ADL Exercises Steps of Exercise 2: interface (inheritance) 1.Describe your Data: diagrams 2.Write corresponding ADL 3.Put ADL file in standard include directory 4.Edit “requirements“ for package Example2 and run “gmake“ locally 5.SG Part I

31/05/02Advanced Athena Tutorial ADL Exercises 10 AAT - ADL Exercises Exercise 2: interface (inheritance) - 1 Your Diagram: CaloCell interface LArCell DataObject CaloCell void add_energy() long sampling() double deltaR(in LArCell other) ADL Language Interface declaration interface or DataObject or ContainedObject or CollectionObject Preprocessor directives: like C++ #include, #define, #ifdef #ifndef, #else, #endif, #undef

31/05/02Advanced Athena Tutorial ADL Exercises 11 AAT - ADL Exercises Exercise 2: interface (inheritance) - 2 Your Diagrams: CaloCell, LArCell interface LArCell DataObject CaloCell void add_energy(in double e) long sampling() double deltaR(in LArCell other) ADL code for CaloCell no change ADL code for LArCell #include "CaloCell.adl" interface LArCell : CaloCell { void add_energy(in double e); long sampling(); double deltaR(in LArCell other); }; Bug: #include "CaloCell/CaloCell.adl"

31/05/02Advanced Athena Tutorial ADL Exercises 12 AAT - ADL Exercises Exercise 2: interface (inheritance) - 3 ### create standard include directory (PkgName) cd $HOME/maxidisk/Athena cd TutorialMay02/Example2/Example mkdir Example2 cd Example2 vi LArCell.adl #--> code: you did it ( previous slide ) ### edit Example2 requirements cd../cmt vi requirements #--> same as for Example1 #--> AND add this: gmake #--> WARNING: should generate 1 error (fixed in next release) #--> Work around: add to../LArCell/LArCellInclude.h this: #--> and rerun “gmake“ class LArCell; use Example1 Example1-00-* TutorialMay02

31/05/02Advanced Athena Tutorial ADL Exercises 13 AAT - ADL Exercises At this point you have fully functional objects ready to use in Athena. You can: –Implement Ctors & Dtors (look for #warning) –Implement Method bodys (look for #error) Changing *.adl will not modify/overwrite hand- coded files. Treat these classes as normally in Algorithms & StoreGate.

31/05/02Advanced Athena Tutorial ADL Exercises 14 StoreGate Tutorial See SG Tutorial Part 1 (Slides 1->14)

Advanced Athena Tutorial ADL/StoreGate ADL Exercises II CERN, May/Mai 5, 2002

31/05/02Advanced Athena Tutorial ADL Exercises 16 AAT - ADL Exercises Steps of Exercise 3: ContainedObject&Collection 1.Describe your Data: diagrams 2.Write corresponding ADL package CaloCell ContainedObject CaloCell package LArCell interface LArCell CollectionObject LArCellCollection 3.Put ADL file in standard include directory 4.Edit “requirements“ for packages CaloCell, LArCell and run “gmake“ locally

31/05/02Advanced Athena Tutorial ADL Exercises 17 AAT - ADL Exercises ADL Language Interface declaration interface or DataObject or ContainedObject or CollectionObject Exercise 3: ContainedObject&Collection - 1 Your Diagrams: CaloCell, LArCell, LArCellCollection ContainedObject CaloCell interface LArCell LArCell CollectionObject LArCellCollection

31/05/02Advanced Athena Tutorial ADL Exercises 18 AAT - ADL Exercises Exercise 3: ContainedObject&Collection - 2 Your Diagram: CaloCell interface LArCell DataObject CaloCell void add_energy() long sampling() double deltaR(in LArCell other) Your Diagrams: CaloCell, LArCell, LArCellCollection ContainedObject CaloCell interface LArCell LArCell CollectionObject LArCellCollection ADL code for CaloCell ADL code for LArCell no change ADL code for LArCellCollection ContainedObject CaloCell #include "LArCell.adl" CollectionObject LArCellCollection { readonly attribute long number; };

31/05/02Advanced Athena Tutorial ADL Exercises 19 AAT - ADL Exercises Exercise 3: ContainedObject&Collection - 3 ### create standard include directory (PkgName) cd $HOME/maxidisk/Athena cd TutorialMay02/CaloCell/CaloCell mkdir CaloCell cd CaloCell vi CaloCell.adl #--> code: ( previous slide ) ### edit CaloCell requirements cd../cmt vi requirements #--> same as for Example1 gmake

31/05/02Advanced Athena Tutorial ADL Exercises 20 AAT - ADL Exercises Exercise 3: ContainedObject&Collection - 4 ### create standard include directory (PkgName) cd $HOME/maxidisk/Athena cd TutorialMay02/LArCell/LArCell mkdir LArCell cd LArCell vi LArCell.adl #--> code: copy it from Example2 vi LArCellCollection.adl #--> code: previous slide ### edit LArCell requirements cd../cmt vi requirements #--> same as for Example1 #--> and add this: gmake use CaloCell CaloCell-00-* TutorialMay02

31/05/02Advanced Athena Tutorial ADL Exercises 21 AAT - ADL Exercises Steps of Exercise 4: polymorphic Container 1.Describe your Data: diagrams 2.Write corresponding ADL package TileCell: same as for LArCell package CaloCell DataObject CaloCellContainer 3.Put ADL file in standard include directory 4.Edit “requirements“ for packages TileCell and run “gmake“ locally 5.SG Part II

31/05/02Advanced Athena Tutorial ADL Exercises 22 AAT - ADL Exercises ADL Language Interface declaration interface or DataObject or ContainedObject or CollectionObject Exercise 4: polymorphic Container - 1 Your Diagrams: CaloCell, LArCell, LArCellCollection + same for Tile + CaloCellContainer ContainedObject CaloCell DataObject CaloCellContainer LArCell CollectionObject LArCellCollection interface LArCell TileCell CollectionObject TileCellCollection interface TileCell

31/05/02Advanced Athena Tutorial ADL Exercises 23 AAT - ADL Exercises Exercise 4: polymorphic Container - 2 Your Diagrams: CaloCell, LArCell, LArCellCollection + same for Tile + CaloCellContainer ContainedObject CaloCell DataObject CaloCellContainer LArCell CollectionObject LArCellCollection interface LArCell TileCell CollectionObject TileCellCollection interface TileCell ADL code for LArxxx no change ADL code for Tilexxx same as for LArxxx = change “LAr“ to “Tile“ everywhere (TileCell.adl and TileCellCollection.adl) ADL code for CaloCellContainer #include "CaloCell.adl" typedef sequence ListCaloCell; DataObject CaloCellContainer { readonly attribute ListCaloCell cells; };

31/05/02Advanced Athena Tutorial ADL Exercises 24 AAT - ADL Exercises Exercise 4: polymorphic Container - 3 ### create standard include directory (PkgName) cd $HOME/maxidisk/Athena cd TutorialMay02/CaloCell/CaloCell cd CaloCell vi CaloCellContainer.adl #--> code: ( previous slide ) cd../cmt gmake #--> WARNING: 1 error at compile time (fixed in next release) #--> Work around: edit../src/CaloCellContainer.cxx #--> and Change this: #--> To this: outStream << " " << *itr1.print() << endl; outStream print() << endl;

31/05/02Advanced Athena Tutorial ADL Exercises 25 ### create standard include directory (PkgName) cd $HOME/maxidisk/Athena cd TutorialMay02/TileCell/TileCell … do exactly same steps as for LArCell (Exercise 3) gmake AAT - ADL Exercises Exercise 4: ContainedObject&Collection - 4

31/05/02Advanced Athena Tutorial ADL Exercises 26 StoreGate Exercises See SG Tutorial Part 2 (Slides 15->20)