Code&Semantic Observations

Slides:



Advertisements
Similar presentations
H.G.Essel: Go4 - J. Adamczewski, M. Al-Turany, D. Bertini, H.G.Essel, S.Linev CHEP 2004 Go4 v2.8 Analysis Design.
Advertisements

AliRoot I/O and Folder Alice Offline-Week V 2002 Piotr Krzysztof Skowroński June 11, 2002.
Code Review Offline Week Piotr Krzysztof Skowroński 10 March 2004.
Andreas Morsch CERN/ALICE 3rd LHC Computing WorkshopMarseille, September 30, 1999 Base Classes for Simulation The ALICE Simulation Strategy Andreas Morsch.
Operating Systems Concepts 1. A Computer Model An operating system has to deal with the fact that a computer is made up of a CPU, random access memory.
Programming Languages and Paradigms Object-Oriented Programming.
Design patterns. What is a design pattern? Christopher Alexander: «The pattern describes a problem which again and again occurs in the work, as well as.
Abstract Factory Design Pattern making abstract things.
CSE 425: Object-Oriented Programming I Object-Oriented Programming A design method as well as a programming paradigm –For example, CRC cards, noun-verb.
Framework for Raw Data Thomas Kuhr Offline Week 29/06/2004.
David N. Brown Lawrence Berkeley National Lab Representing the BaBar Collaboration The BaBar Mini  BaBar  BaBar’s Data Formats  Design of the Mini 
Storage Management. The stack and the heap Dynamic storage allocation refers to allocating space for variables at run time Most modern languages support.
ALICE Simulation Framework Ivana Hrivnacova 1 and Andreas Morsch 2 1 NPI ASCR, Rez, Czech Republic 2 CERN, Geneva, Switzerland For the ALICE Collaboration.
Andreas Morsch, CERN EP/AIP CHEP 2003 Simulation in ALICE Andreas Morsch For the ALICE Offline Project 2003 Conference for Computing in High Energy and.
The ALICE Simulation Strategy Andreas Morsch For the ALICE Offline Group Joint STAR/ALICE Offline Meeting Brookhaven National Laboratory, Upton, NY April.
C++ Memory Overview 4 major memory segments Key differences from Java
Gaudi Framework Tutorial, April Algorithm Tools: what they are, how to write them, how to use them.
Lecture by: Prof. Pooja Vaishnav.  Language Processor implementations are highly influenced by the kind of storage structure used for program variables.
Design Patterns David Talby. This Lecture Re-routing method calls Chain of Responsibility Coding partial algorithms Template Method The Singleton Pattern.
CBM ECAL simulation status Prokudin Mikhail ITEP.
HLT/AliRoot integration C.Cheshkov, P.Hristov 2/06/2005 ALICE Offline Week.
The High Performance Simulation Project Status and short term plans 17 th April 2013 Federico Carminati.
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.
Chapter 7 Implementation. Implementation Approaches F Big bang –Code entire system and test in an unstructured manner F Top-down –Start by implementing.
Features needed in the “final” AliRoot release P.Hristov 26/10/2006.
April 6, 2000 LHCb Event Data Model Pavel Binko, Gloria Corti LHCb / CERN 1 LHCb Software week LHCb Event Data Model Pavel Binko Gloria Corti LHCb / CERN.
Recap Introduction to Inheritance Inheritance in C++ IS-A Relationship Polymorphism in Inheritance Classes in Inheritance Visibility Rules Constructor.
Javier Castillo 1 Muon Embedding Status & Open Issues PWG3 - CERN - 15/02/2011.
Requirements for the O2 reconstruction framework R.Shahoyan, 14/08/
October 10-12, 1 AliRoot: I/O organisation ROOT in the ALICE experiment I/O Structure Run-Time Data-Exchange.
Marco Cattaneo, 6-Apr Issues identified in sub-detector OO software reviews Calorimeters:18th February Tracking:24th March Rich:31st March.
Gaudi Framework Tutorial, Algorithm Tools: what they are and how to use them.
AliRoot Classes for access to Calibration and Alignment objects Magali Gruwé CERN PH/AIP ALICE Offline Meeting February 17 th 2005 To be presented to detector.
CSE 374 Programming Concepts & Tools Hal Perkins Fall 2015 Lecture 20 – C++ Subclasses and Inheritance.
AliRoot survey: Reconstruction P.Hristov 11/06/2013.
21/5/03J.E Campagne Opera Framework: Status Report.
AliRoot survey: Calibration P.Hristov 11/06/2013.
D. Elia (INFN Bari)ALICE Offline week / CERN Update on the SPD Offline Domenico Elia in collaboration with H. Tydesjo, A. Mastroserio Overview:
MAUS Status A. Dobbs CM43 29 th October Contents MAUS Overview Infrastructure Geometry and CDB Detector Updates CKOV EMR KL TOF Tracker Global Tracking.
I.BelikovWeekly Offline Meeting, CERN, 14 Sep Common track parameterization for the barrel detectors.
HYDRA Framework. Setup of software environment Setup of software environment Using the documentation Using the documentation How to compile a program.
Monthly video-conference, 18/12/2003 P.Hristov1 Preparation for physics data challenge'04 P.Hristov Alice monthly off-line video-conference December 18,
January 2009 offline detector review - 2 nd go 1 ● Offline – Geometry – Material budget – Simulation – Raw data – OCDB parameters – Reconstruction ● Calibration.
Hough-4-14.
V4-18-Release P. Hristov 21/06/2010.
CSC 427: Data Structures and Algorithm Analysis
Analysis Frame for MC data
Done By: Ashlee Lizarraga Ricky Usher Jacinto Roches Eli Gomez
Process Management Process Concept Why only the global variables?
PPR Production – What Is Available
CS 215 Final Review Ismail abumuhfouz Fall 2014.
CMSC202 Computer Science II for Majors Lecture 12 – Linked Lists
Chapter 10 Design Patterns.
CSE687 - Object Oriented Design class notes Survey of the C++ Programming Language Jim Fawcett Spring 2004.
v4-18-Release: really the last revision!
Storage Management.
Review: Two Programming Paradigms
AliRoot status and PDC’04
Progress with MUON reconstruction
ALICE Offline Week, CERN
Analysis framework - status
TPC status - Offline Q&A
Pointers and Linked Lists
(CMS GEANT4 simulation)
Inheritance and Polymorphism:
Linked Lists.
Use of Geant4 in experiment interactive frameworks AliRoot
CISC/CMPE320 - Prof. McLeod
BES III Software: Short-term Plan ( )
B+-trees In practice, B-trees are not used much as defined earlier.
Presentation transcript:

Code&Semantic Observations P.Hristov Off-line Week March 10, 2004 CERN

STEER Simulation classes Reconstruction classes IO classes Generation of particles Hits Track references Summable digits Digits AliSimulation Reconstruction classes Clusters/RecPoints Tracks Vertex PID ESD AliReconstruction IO classes Loaders AliStream Classes, related to “conditions” Geometry Magnetic field Configuration Event headers General/service classes AliRun … Obsolete classes?

STEER I AliRun: delete gAlice->GetRunLoader(); delete gAlice; AliRunLoader rl = AliRunLoader::Open(“galice.root”); gAlice = rl->GetAliRun(); => Something is wrong, we should instantiate AliRun only when it is needed, and can be initiated correctly. Do we need the global pointer gAlice? Many shortcut methods can be removed Obsolete parts of the code (Tree2Tree, etc.) What should be the main function of AliRun?

STEER II AliModule & AliDetector AliMC & AliStack Used in simulation & reconstruction => could we separate the two main use cases? Do we need both? What would be the relation with AliReconstructor class (see the talk of Thomas)? AliMC & AliStack Could AliMC be singleton which is not accessed via AliRun? Could we make more clean distinction of responsibilities between AliMC and AliStack? Could we avoid the mapping in AliStack?

STEER III: AliStream AliRunDigitizer AliRunDigitizer AliStream galice.root with sdigits galice.root AliRunLoader galice.root with sdigits galice.root with sdigits sdigits sdigits sdigits Do we really need this functionality?

STEER IV Could we fix the interfaces using pure virtual classes? Missing base classes: Calibration Alignment What else? Could we revise the “dependences” (inheritance, usage, composition, aggregation, etc.)?

Tasks Features: Main issues: Conversion to tasks: only partially done Recursive call of subtask tree via ExecuteTask/Exec/TTask::ExecuteTasks Browsing & debugging Main issues: Access by name should be avoided Object ownership: strict discipline in Add/CleanTasks/Clear needed Conversion to tasks: only partially done

Tasks II Advantages Concerns How should we continue? Uniform implementation of methods Recursive behavior Dynamic creation of task trees Possibility to present/browse/debug Concerns More suitable for interactive jobs Needs fully implemented task chains Gives easy access by name => possible misusage Simplicity: do we need this functionality? How should we continue?

Pointers Usage of pointers as data members: question of composition vs aggregation. If the object- data member has to be deleted in the destructor, one better uses it directly Exceptions: if the size of (simple) container is variable or too big, use “new” Root containers: set correctly object ownership If you use pointers as data members, you must initialize them Do not delete objects if you are not the owner New/delete: avoid memory leaks

Pointers II f->GetA()->GetB()->GetC()->Do(); usually occurs if the class responsibilities are not well defined Could we improve such cases? Transient pointers: do not forget to indicate by exclamation mark “//!” that given pointer should not be stored