AIDA-2020 Advanced European Infrastructures for Detectors at Accelerators. Scientific/Technical Note
|
|
- Aleesha Booth
- 5 years ago
- Views:
Transcription
1 AIDA-2020-NOTE AIDA-2020 Scientific/Technical Note PODIO: Design Document for the PODIO Event Data Model Toolkit B. Hegner (CERN) et al 30 June 2016 The AIDA-2020 project has received funding from the European Union s Horizon 2020 Research and Innovation programme under Grant Agreement no This work is part of AIDA-2020 Work Package 3: Advanced software. The electronic version of this AIDA-2020 Publication is available via the AIDA-2020 web site < or on the CERN Document Server at the following URL: < Copyright c CERN for the benefit of the AIDA-2020 Consortium
2 PODIO Design Document for the PODIO Event Data Model Toolkit Benedikt Hegner, CERN, 1211 Geneva 23, Switzerland Frank Gaede, DESY, Notkestr. 85, Hamburg, Germany
3 Abstract PODIO is a C++ library that supports the automatic creation and efficient handling of HEP event data, developed as a new EDM toolkit for future particle physics experiments in the context of the AIDA2020 EU programme. Experience from LHC and the Linear collider community shows that existing solutions partly suffer from overly complex data models with deep object-hierarchies or unfavourable I/O performance. The PODIO project was created in order to address these problems. PODIO is based on the idea of employing plainold-data (POD) data structures wherever possible, while avoiding deep object-hierarchies and virtual inheritance. At the same time it provides the necessary high-level interface towards the developer physicist, such as the support for inter-object relations, and automatic memory-management, as well as a ROOT-assisted Python interface.to simplify the creation of efficient data models, PODIO employs code generation from a simple yams-based markup language. In addition, it was developed with concurrency in mind in order to support the usage of modern CPU features, for example giving basic support for vectorisation techniques. Document History Document version Date Author B.Hegner (CERN), F.Gaede (DESY) PODIO Design Document I
4 Contents 1 Introduction 1 2 Quick-start 1 3 Data Models and Data Model Definitions Basic Concepts and Supported Features Definition of custom components Definition of custom data classes Defining members Definition of references between objects: Explicit definition of methods Global options Examples for Supported Interface Object Ownership Object Creation and Storage Object References Looping through Collections Support for Notebook-Pattern EventStore functionality Object Retrieval Design and Implementation Details Layout of Objects The User Layer The Internal Data Layer The POD Layer The Collections Vectorization support / notebook pattern Handling mutability Advanced Topics Persistency Writing Back-End Reading Back-End Thread-safety Changing user data Serialization Not-thread-safe components Implementing a transient Event Class PODIO Design Document II
5 1 Introduction PODIO, or plain-old-data I/O, is a C++ library to support the creation and handling of data models in particle physics. It is based on the idea of employing plain-old-data (POD) data structures wherever possible, while avoiding deep-object hierarchies and virtual inheritance. This is to both improve runtime performance and simplify the implementation of persistency services. At the same time it provides the necessary high-level functionality to the physicist, such as support for inter-object relations, and automatic memory-management. In addition, it provides a (ROOT assisted) Python interface. To simplify the creation of efficient data models, PODIO employs code generation from a simple yaml-based markup syntax. To support the usage of modern software technologies, PODIO was written with concurrency in mind and gives basic support for vectorization technologies. This document describes first how to define and create a specific data model, then how to use the created data. Afterwards it will explain the overall design and a few of the technical details of the implementation. Many of the design choices are inspired by previous experience of the LCIO[1] package used for the studies of the international linear collider, and the Gaudi[2] Object Description applied in the LHCb collaboration at the LHC. 2 Quick-start An up-to-date installation and quick start guide for the impatient user can be found on the PODIO github page[3]. 3 Data Models and Data Model Definitions To describe a data model PODIO provides a data model definition syntax. This is to ease the creation of optimised data formats, which may take advantage of a so-called struct-of-array data layout. From the user-provided data model description PODIO creates all the files necessary to use this data model. 3.1 Basic Concepts and Supported Features PODIO encourages the usage of composition, rather than inheritance. One of the reasons for doing so is the focus on efficiency friendly plain-old-data. For this reason, PODIO does not support inheritance within the defined data model. Instead, users can combine multiple components to build a to be used datatype. To allow the datatypes to be real PODs, the data stored within the data model are constrained to be POD-compatible data. Those are 1. basic types like int, double, etc 2. components built up from basic types or other components 3. Fixed sized arrays of those types In addition, PODIO supports the storage of one-to-one and one-to-many relations between objects. In the following the syntax for defining a given data model is explained. A later section contains more details about the code being created from this. PODIO Design Document 1
6 3.2 Definition of custom components A component is just a flat struct containing data. it can be defined via: components: # My example component MyComponent: x : float y : float z : float a : AnotherComponent 3.3 Definition of custom data classes Here an excerpt from datamodel.yaml for a simple class, just containing one member of the type int. datatypes : EventInfo : Description : "My first data type" Author : "It s me" Members : - int Number // event number Using this definition, three classes will be created: EventInfo, EventInfoData and EventInfoCollection. These have the following signature: class EventInfoData { public: int Number; } class EventInfo { public: int Number() const; void Number(int); } Defining members The definition of a member is done in the Members section in the form: Members: <type> <name> // <comment> where type can be any buildin-type or a component Definition of references between objects: There can be one-to-one-relations and one-to-many relations being stored in a particular class. This happens either in the OneToOneRelations or OneToManyRelations section of the data definition. The definition has again the form: PODIO Design Document 2
7 OneToOneRelations: <type> <name> // <comment> OneToManyRelations: <type> <name> // <comment> Explicit definition of methods In a few cases, it makes sense to add some more functionality to the created classes. Thus this library provides two ways of defining additional methods and code. Either by defining them inline or in external files. Extra code has to be provided separately for const and non-const additions. ExtraCode: declaration: <string> implementation : <string> declarationfile: <string> (to be implemented!) implementationfile: <string> (to be implemented!) ConstExtraCode: declaration: <string> implementation : <string> declarationfile: <string> (to be implemented!) implementationfile: <string> (to be implemented!) The code being provided has to use the macro {name} in place of the concrete name of the class. 3.4 Global options Some customization of the generated code is possible through flags. These flags are listed in the section options: options: getsyntax: False exposepodmembers: True components: # My simple component ExampleComponent: x : int datatypes: ExampleType: Description: My datatype with a component member Author: Mr me Members: - ExampleComponent comp // component from above getsyntax: steers the naming of get and set methods. If set to true, methods are prefixed with get and set following the capitalized member name, otherwise the member name is used for both. exposepodmembers: whether get and set methods are also generated for members of a membercomponent. In the example corresponding methods would be generated to directly set / get x through ExampleType. 4 Examples for Supported Interface The following snippets show the support of PODIO for the different use cases. The event store used in the examples is just an example implementation, and has to be replaced with the store used in the framework of your choice Object Ownership Every data created is either explicitly owned by collections or automatically garbage-collected. There is no need for any new or delete call on user side. PODIO Design Document 3
8 4.0.2 Object Creation and Storage Objects and collections can be created via factories, which ensure proper object ownership: auto& hits = store.create<hitcollection>("hits") auto hit1 = hits.create(1.4,2.4,3.7,4.2); // init with values auto hit2 = hits.create(); // default-construct object hit2.energy(42.23); In addition, individual objects can be created in the free. If they aren t attached to a collection, they are automatically garbage-collected: auto hit1 = Hit(); auto hit2 = Hit(); hits.push_back(hit1); <automatic deletion of hit2> In this respect all objects behave like objects in Python Object References The library supports the creation of one-to-many relations: auto& hits = store.create<hitcollection>("hits"); auto hit1 = hits.create(); auto hit2 = hits.create(); auto& clusters = store.create<clustercollection>("clusters"); auto cluster = clusters.create(); cluster.addhit(hit1); cluster.addhit(hit2); The references can be accessed via iterators on the referencing objects for (auto i = cluster.hits_begin(), \ end = cluster.hits_end(); i!=end; ++i){ std::cout << i->energy() << std::endl; } or via direct accessors auto size = cluster.hits_size(); auto hit = cluster.hits(<anumber>); If asking for an entry outside bounds, a std::out of range exception is thrown Looping through Collections Looping through collections is supported in two ways. Via iterators: for(auto i = hits.begin(), end = hits.end(); i!= end; ++i) { std::cout << i->energy() << std::endl; } and via direct object access: for(int i = 0, end = hits.size(), i!= end, ++i){ std::cout << hit[i].energy() << std::endl; } PODIO Design Document 4
9 4.0.5 Support for Notebook-Pattern The notebook pattern uses the assumption that it is better to create a small copy of only the data that are needed for a particular calculation. This pattern is supported by providing access like auto x_array = hits.x<10>(); // returning values of auto y_array = hits.y<10>(); // the first 10 elements The resulting std::array can then be used in (auto-)vectorizable code. If less objects than requested are contained in the collection, the remaining entries are default initialized EventStore functionality The event store contained in the package is for educational purposes and kept very minimal. It has two main methods: /// create a new collection template<typename T> T& create(const std::string& name); /// access a collection. template<typename T> const T& get(const std::string& name); Please note that a put method for collections is not foreseen Object Retrieval Collections can be retrieved explicitly: auto& hits = store.get<hitcollection>("hits"); if (hits.isvalid()) { } Or implicitly when following an object reference. In both cases the access to data that has been retrieved is const. Python Interface The class EventStore provides all the necessary (read) access to event files. It can be used as follows: from EventStore import EventStore store = EventStore(<list of files>) for event in store: hits = store.get("hits") for hit in hits: 5 Design and Implementation Details The driving considerations for the PODIO design are: 1. the concrete data are contained within plain-old-data structures (PODs) 2. user-exposed data types are concrete and do not use inheritance 3. The C++ and Python interface should look as close as possible PODIO Design Document 5
10 4. The user does not do any explicit memory management 5. Classes are generated using a higher-level abstraction and code generators The following sections give some more technical details and explanations for the design choices. More concrete implementation details can be found in the doxygen documentation. 5.1 Layout of Objects The data model is based on four different kind of objects and layers, namely 1. user visible (physics) classes (e.g. Hit). These act as transparent references to the underlying data, 2. a transient object knowing about all data for a certain physics object, including inter-object references (e.g. HitObject), 3. a plain-old-data (POD) type holding the persistent object information (e.g. HitData), and 4. a user-visible collection containing the physics objects (e.g. HitCollection). These layers are described in the following The User Layer The user visible objects (e.g. Hit) act as light-weight references to the underlying data, and provide the necessary user interface. For each of the data-members and one-to-one relations declared in the data model definition, corresponding setters and getters are created. For each of the one-to-many relations a vector-like interface is provided. With the chosen interface, the code written in C++ and Python looks almost identical, if taking proper advantage of the auto keyword The Internal Data Layer The internal objects give access to the object data, i.e. the POD, and the references to other objects. These objects inherit from podio::objbase, which takes care of object identification (podio::objectid), and object-ownership. The ObjectID consists of the index of the object and an ID of the collection it belongs to. If the object does not belong to a collection yet, the data object owns the POD containing the real data, otherwise the POD is owned by the respective collection. For details about the inter-object references and their handling within the data objects please see below The POD Layer The plain-old-data (POD) contain just the data declared in the Members section of the datamodel definition. Ownership and lifetime of the PODs is managed by the other parts of the infrastructure, namely the data objects and the data collections The Collections The collections created serve three purposes: 1. giving access to or creating the data items 2. preparing objects for writing into PODs or preparing them after reading 3. support for the so-called notebook pattern PODIO Design Document 6
11 5.1.5 Vectorization support / notebook pattern As an end-user oriented library, PODIO provides only a limited support for struct-of-arrays (SoA) memory layouts. In the vision, that the data used for heavy calculations is best copied locally, the library provides convenience methods for extracting the necessary information from the collections. More details can be found in the examples section of this document. 5.2 Handling mutability Depending on the policy of the client of PODIO, data collections may be read-only after creation, or may be altered still. While the base assumption of PODIO is that once-created collections are immutable once leaving the scope of its creator, it still allows for explicit unfreezing collections afterwards. This feature has to handled with care, as it heavily impacts thread-safety. 6 Advanced Topics 6.1 Persistency The library is build such that it can support multiple storage backends. However, the tested storage system being used is ROOT. The following explains the requirements for a user-provided storage backend Writing Back-End There is no interface a writing class has to fulfill. It only needs to take advantage of the interfaces provided in PODIO. To persistify a collection, three pieces of information have to be stored: 1. the ID of the collection, 2. the vector of PODs in the collection, and 3. the relation information in the collection Before writing out a collection, the data need to be put into the proper structure. For this, the method prepareforwrite needs to be invoked. In the case of trivial POD members this results in a no-op. In case, the collection contains references to other collections, the pointers are being translated into collid:objindex pairs. A serialization solution would - in principle - then look like this: collection->prepareforwrite(); void* buffer = collection->getbufferaddress(); auto refcollections = collection->referencecollections(); write buffer, collection ID, and refcollections Reading Back-End There are two possibilities to implement a reading-back end. In case one uses the podio::eventstore, one simply has to implement the IReader interface. If not taking advantage of this implementation, the data reader or the event store have to implement the ICollectionProvider interface. Reading of a collection happens then similar to: your creation of the collection and reading of the PODs from disk PODIO Design Document 7
12 collection->setbuffer(buffer); auto refcollections = collection->referencecollections(); your filling of refcollections from disk collection->setid( <collection ID read from disk> ); collection->prepareafterread(); collection->setreferences( &collectionprovider ); The strong assumption here is that all references are being followed up directly and no later ondemand reading is done. 6.2 Thread-safety PODIO was written with thread-safety in mind and avoids the usage of globals and statics. However, a few assumptions about user code and use-patterns were made. The following lists the caveats of the library when it comes to parallelization Changing user data As explained in the section about mutability of data, thread-safety is only guaranteed if data are considered read-only after creation Serialization During the calls of prepareforwriting and prepareafterreading on collections other operations like object creation or addition will lead to an inconsistent state Not-thread-safe components The example event store provided with PODIO is as of writing not thread-safe. Neither is the chosen serialization. 6.3 Implementing a transient Event Class PODIO contains one example podio::eventstore class. To implement your own transient event store, the only requirement is to set the collectionid of each collection to a unique ID on creation. PODIO Design Document 8
13 References [1] F. Gaede et al., LCIO: A Persistency framework for linear collider simulation studies, International Conference on Computing in High Energy and Nuclear Physics (CHEP 2003), La Jolla, CA, 2003, proceedings. [2] Gaudi Object Description, Available at: docu.pdf. [3] PODIO github page, PODIO Design Document 9
The Run 2 ATLAS Analysis Event Data Model
The Run 2 ATLAS Analysis Event Data Model Marcin Nowak, BNL On behalf of the ATLAS Analysis Software Group and Event Store Group 16 th International workshop on Advanced Computing and Analysis Techniques
More informationShort Notes of CS201
#includes: Short Notes of CS201 The #include directive instructs the preprocessor to read and include a file into a source code file. The file name is typically enclosed with < and > if the file is a system
More informationSynchronization SPL/2010 SPL/20 1
Synchronization 1 Overview synchronization mechanisms in modern RTEs concurrency issues places where synchronization is needed structural ways (design patterns) for exclusive access 2 Overview synchronization
More informationCS201 - Introduction to Programming Glossary By
CS201 - Introduction to Programming Glossary By #include : The #include directive instructs the preprocessor to read and include a file into a source code file. The file name is typically enclosed with
More informationQUIZ. What is wrong with this code that uses default arguments?
QUIZ What is wrong with this code that uses default arguments? Solution The value of the default argument should be placed in either declaration or definition, not both! QUIZ What is wrong with this code
More informationStitched Together: Transitioning CMS to a Hierarchical Threaded Framework
Stitched Together: Transitioning CMS to a Hierarchical Threaded Framework CD Jones and E Sexton-Kennedy Fermilab, P.O.Box 500, Batavia, IL 60510-5011, USA E-mail: cdj@fnal.gov, sexton@fnal.gov Abstract.
More informationLCIO - A persistency framework for linear collider simulation studies
LCIO - A persistency framework for linear collider simulation studies F. Gaede DESY, 22607 Hamburg, Germany T. Behnke DESY and SLAC N. Graf, T. Johnson SLAC, Stanford, CA 94025, USA SLAC-PUB-9992 * Almost
More information#include <iostream> #include <cstdlib>
Classes and Objects Classes The structure data type can be used in both C and C++ Usually a structure is used to store just data, however it can also be used to store functions that can work on the data.
More informationEncapsulation in C++
pm_jat@daiict.ac.in In abstract sense, it is all about information hiding Informally, you can call it as packaging of data and function together in a single entity called class such that you get implementation
More informationPyROOT: Seamless Melting of C++ and Python. Pere MATO, Danilo PIPARO on behalf of the ROOT Team
PyROOT: Seamless Melting of C++ and Python Pere MATO, Danilo PIPARO on behalf of the ROOT Team ROOT At the root of the experiments, project started in 1995 Open Source project (LGPL2) mainly written in
More informationData Structures (list, dictionary, tuples, sets, strings)
Data Structures (list, dictionary, tuples, sets, strings) Lists are enclosed in brackets: l = [1, 2, "a"] (access by index, is mutable sequence) Tuples are enclosed in parentheses: t = (1, 2, "a") (access
More informationThe Object Model Overview. Contents. Section Title
The Object Model 1 This chapter describes the concrete object model that underlies the CORBA architecture. The model is derived from the abstract Core Object Model defined by the Object Management Group
More informationAIDA-2020 Advanced European Infrastructures for Detectors at Accelerators. Presentation. ILD simulation model
AIDA-2020-SLIDE-2018-031 AIDA-2020 Advanced European Infrastructures for Detectors at Accelerators Presentation ILD simulation model Lu, S. (DESY) 01 June 2016 The AIDA-2020 Advanced European Infrastructures
More informationIndex. object lifetimes, and ownership, use after change by an alias errors, use after drop errors, BTreeMap, 309
A Arithmetic operation floating-point arithmetic, 11 12 integer numbers, 9 11 Arrays, 97 copying, 59 60 creation, 48 elements, 48 empty arrays and vectors, 57 58 executable program, 49 expressions, 48
More informationClasses and Objects. Class scope: - private members are only accessible by the class methods.
Class Declaration Classes and Objects class class-tag //data members & function members ; Information hiding in C++: Private Used to hide class member data and methods (implementation details). Public
More information15CS45 : OBJECT ORIENTED CONCEPTS
15CS45 : OBJECT ORIENTED CONCEPTS QUESTION BANK: What do you know about Java? What are the supported platforms by Java Programming Language? List any five features of Java? Why is Java Architectural Neutral?
More informationWhat are the characteristics of Object Oriented programming language?
What are the various elements of OOP? Following are the various elements of OOP:- Class:- A class is a collection of data and the various operations that can be performed on that data. Object- This is
More informationLCIO: A Persistency Framework and Event Data Model for HEP. Steve Aplin, Jan Engels, Frank Gaede, Norman A. Graf, Tony Johnson, Jeremy McCormick
LCIO: A Persistency Framework and Event Data Model for HEP Steve Aplin, Jan Engels, Frank Gaede, Norman A. Graf, Tony Johnson, Jeremy McCormick SLAC-PUB-15296 Abstract LCIO is a persistency framework and
More informationC++ for System Developers with Design Pattern
C++ for System Developers with Design Pattern Introduction: This course introduces the C++ language for use on real time and embedded applications. The first part of the course focuses on the language
More informationOverview of OOP. Dr. Zhang COSC 1436 Summer, /18/2017
Overview of OOP Dr. Zhang COSC 1436 Summer, 2017 7/18/2017 Review Data Structures (list, dictionary, tuples, sets, strings) Lists are enclosed in square brackets: l = [1, 2, "a"] (access by index, is mutable
More informationFriendship in Service of Testing
Friendship in Service of Testing Gábor Márton, martongabesz@gmail.com Zoltán Porkoláb, gsd@elte.hu 1 / 47 Agenda Introduction, principals Case study Making the example better Vision 2 / 47 Functional Programming
More informationIntro to OOP Visibility/protection levels and constructors Friend, convert constructor, destructor Operator overloading a<=b a.
Intro to OOP - Object and class - The sequence to define and use a class in a program - How/when to use scope resolution operator - How/when to the dot operator - Should be able to write the prototype
More information10. Object-oriented Programming. 7. Juli 2011
7. Juli 2011 Einführung in die Programmierung Introduction to C/C++, Tobias Weinzierl page 1 of 47 Outline Object Case Study Brain Teaser Copy Constructor & Operators Object-oriented Programming, i.e.
More informationDeclaration Syntax. Declarations. Declarators. Declaration Specifiers. Declaration Examples. Declaration Examples. Declarators include:
Declarations Based on slides from K. N. King Declaration Syntax General form of a declaration: declaration-specifiers declarators ; Declaration specifiers describe the properties of the variables or functions
More informationChapter 11 Object and Object- Relational Databases
Chapter 11 Object and Object- Relational Databases Copyright 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 11 Outline Overview of Object Database Concepts Object-Relational
More informationFrom Java to C++ From Java to C++ CSE250 Lecture Notes Weeks 1 2, part of 3. Kenneth W. Regan University at Buffalo (SUNY) September 10, 2009
From Java to C++ CSE250 Lecture Notes Weeks 1 2, part of 3 Kenneth W. Regan University at Buffalo (SUNY) September 10, 2009 C++ Values, References, and Pointers 1 C++ Values, References, and Pointers 2
More informationSeptember 10,
September 10, 2013 1 Bjarne Stroustrup, AT&T Bell Labs, early 80s cfront original C++ to C translator Difficult to debug Potentially inefficient Many native compilers exist today C++ is mostly upward compatible
More informationChapter 5. Names, Bindings, and Scopes
Chapter 5 Names, Bindings, and Scopes Chapter 5 Topics Introduction Names Variables The Concept of Binding Scope Scope and Lifetime Referencing Environments Named Constants 1-2 Introduction Imperative
More informationDD4hep Based Event Reconstruction
CLICdp-Conf-2017-002 06 February 2017 DD4hep Based Event Reconstruction Andre Sailer, Markus Frank, Frank Gaede, Daniel Hynds, Shaojun Lu, Nikiforos Nikiforou, Marko Petric, Rosa Simoniello, Georgios Voutsinas
More informationConcepts of Object Oriented Programming
Concepts of Object Oriented Programming Dr. Axel Kohlmeyer Senior Scientific Computing Expert Information and Telecommunication Section The Abdus Salam International Centre for Theoretical Physics http://sites.google.com/site/akohlmey/
More informationILC Software Overview and recent developments
ILC Software Overview and recent developments Frank Gaede 134th ILC@DESY General Project Meeting DESY, May 27, 2016 Outline Introduction to ilcsoft core tools ILD simulation and reconstruction software
More informationReview of the C Programming Language
Review of the C Programming Language Prof. James L. Frankel Harvard University Version of 11:55 AM 22-Apr-2018 Copyright 2018, 2016, 2015 James L. Frankel. All rights reserved. Reference Manual for the
More informationDQM4HEP - A Generic Online Monitor for Particle Physics Experiments
DQM4HEP - A Generic Online Monitor for Particle Physics Experiments Carlos Chavez-Barajas, and Fabrizio Salvatore University of Sussex (GB) E-mail: carlos.chavez.barajas@cern.ch, tom.coates@cern.ch, p.f.salvatore@sussex.ac.uk
More informationDOWNLOAD PDF CORE JAVA APTITUDE QUESTIONS AND ANSWERS
Chapter 1 : Chapter-wise Java Multiple Choice Questions and Answers Interview MCQs Java Programming questions and answers with explanation for interview, competitive examination and entrance test. Fully
More informationCopyright 2016 Ramez Elmasri and Shamkant B. Navathe
Chapter 12 Outline Overview of Object Database Concepts Object-Relational Features Object Database Extensions to SQL ODMG Object Model and the Object Definition Language ODL Object Database Conceptual
More informationIntroduction to C++ Systems Programming
Introduction to C++ Systems Programming Introduction to C++ Syntax differences between C and C++ A Simple C++ Example C++ Input/Output C++ Libraries C++ Header Files Another Simple C++ Example Inline Functions
More informationG52CPP C++ Programming Lecture 7. Dr Jason Atkin
G52CPP C++ Programming Lecture 7 Dr Jason Atkin 1 This lecture classes (and C++ structs) Member functions inline functions 2 Last lecture: predict the sizes 3 #pragma pack(1) #include struct A
More informationVISPA: Visual Physics Analysis Environment
VISPA: Visual Physics Analysis Environment Tatsiana Klimkovich for the VISPA group (O.Actis, M.Erdmann, R.Fischer, A.Hinzmann, M.Kirsch, G.Müller, M.Plum, J.Steggemann) DESY Computing Seminar, 27 October
More informationCOMP6771 Advanced C++ Programming
1.. COMP6771 Advanced C++ Programming Week 5 Part Two: Dynamic Memory Management 2016 www.cse.unsw.edu.au/ cs6771 2.. Revisited 1 #include 2 3 struct X { 4 X() { std::cout
More informationLarge Scale Software Building with CMake in ATLAS
1 Large Scale Software Building with CMake in ATLAS 2 3 4 5 6 7 J Elmsheuser 1, A Krasznahorkay 2, E Obreshkov 3, A Undrus 1 on behalf of the ATLAS Collaboration 1 Brookhaven National Laboratory, USA 2
More informationDD4hep Based Event Reconstruction
DD4hep Based Event Reconstruction Markus Frank, Frank Gaede, Daniel Hynds, Shaojun Lu, Nikiforos Nikiforou, Marko Petric, André Sailer, Rosa Simoniello, Georgios Voutsinas CERN, DESY, Hamburg On behalf
More informationCOMP322 - Introduction to C++
COMP322 - Introduction to C++ Winter 2011 Lecture 2 - Language Basics Milena Scaccia School of Computer Science McGill University January 11, 2011 Course Web Tools Announcements, Lecture Notes, Assignments
More informationAPI Knowledge Coding Guide Version 7.2
API Knowledge Coding Guide Version 7.2 You will be presented with documentation blocks extracted from API reference documentation (Javadocs and the like). For each block, you will be also presented with
More informationReview of the C Programming Language for Principles of Operating Systems
Review of the C Programming Language for Principles of Operating Systems Prof. James L. Frankel Harvard University Version of 7:26 PM 4-Sep-2018 Copyright 2018, 2016, 2015 James L. Frankel. All rights
More informationAppendix B Boost.Python
Financial Modelling in Python By S. Fletcher & C. Gardner 2009 John Wiley & Sons Ltd Appendix B Boost.Python The Boost.Python library provides a framework for seamlessly wrapping C++ classes, functions
More informationCS527 Software Security
Security Policies Purdue University, Spring 2018 Security Policies A policy is a deliberate system of principles to guide decisions and achieve rational outcomes. A policy is a statement of intent, and
More informationHomework 4. Any questions?
CSE333 SECTION 8 Homework 4 Any questions? STL Standard Template Library Has many pre-build container classes STL containers store by value, not by reference Should try to use this as much as possible
More informationIntroduction Of Classes ( OOPS )
Introduction Of Classes ( OOPS ) Classes (I) A class is an expanded concept of a data structure: instead of holding only data, it can hold both data and functions. An object is an instantiation of a class.
More informationCSCE 156 Computer Science II
CSCE 156 Computer Science II Lab 04 - Classes & Constructors Dr. Chris Bourke Prior to Lab 1. Review this laboratory handout prior to lab. 2. Read Object Creation tutorial: http://download.oracle.com/javase/tutorial/java/javaoo/objectcreation.
More informationSystemC Configuration Tutorial A preview of the draft standard
2/27/2017 SystemC Configuration Tutorial A preview of the draft standard Trevor Wieman, SystemC CCI WG Chair SystemC 2.3.2 Public Review SystemC 2.3.2 public review release available Maintenance release
More informationGuaranteeing memory safety in Rust
Guaranteeing memory safety in Rust Nicholas D. Matsakis Mozilla Research 1 Hashtable in C / C++ template struct Hashtable { Bucket *buckets; unsigned num_buckets; template
More informationImplementing Subprograms
Implementing Subprograms 1 Topics The General Semantics of Calls and Returns Implementing Simple Subprograms Implementing Subprograms with Stack-Dynamic Local Variables Nested Subprograms Blocks Implementing
More informationChapter 15 - C++ As A "Better C"
Chapter 15 - C++ As A "Better C" Outline 15.1 Introduction 15.2 C++ 15.3 A Simple Program: Adding Two Integers 15.4 C++ Standard Library 15.5 Header Files 15.6 Inline Functions 15.7 References and Reference
More informationPatterns for polymorphic operations
Patterns for polymorphic operations Three small object structural patterns for dealing with polymorphism Alexander A. Horoshilov hor@epsylontech.com Abstract Polymorphism is one of the main elements of
More informationGraphical Interface and Application (I3305) Semester: 1 Academic Year: 2017/2018 Dr Antoun Yaacoub
Lebanese University Faculty of Science Computer Science BS Degree Graphical Interface and Application (I3305) Semester: 1 Academic Year: 2017/2018 Dr Antoun Yaacoub 2 Crash Course in JAVA Classes A Java
More informationIntroduction to C++ Introduction. Structure of a C++ Program. Structure of a C++ Program. C++ widely-used general-purpose programming language
Introduction C++ widely-used general-purpose programming language procedural and object-oriented support strong support created by Bjarne Stroustrup starting in 1979 based on C Introduction to C++ also
More informationAIDA-2020 Advanced European Infrastructures for Detectors at Accelerators. Presentation. A generic data acquisition software framework, EUDAQ2
AIDA-2020-SLIDE-2018-008 AIDA-2020 Advanced European Infrastructures for Detectors at Accelerators Presentation A generic data acquisition software framework, EUDAQ2 Yi, Liu (DESY) 05 October 2017 The
More information! Those values must be stored somewhere! Therefore, variables must somehow be bound. ! How?
A Binding Question! Variables are bound (dynamically) to values Subprogram Activation! Those values must be stored somewhere! Therefore, variables must somehow be bound to memory locations! How? Function
More informationPrinciples of Object Oriented Programming. Lecture 4
Principles of Object Oriented Programming Lecture 4 Object-Oriented Programming There are several concepts underlying OOP: Abstract Types (Classes) Encapsulation (or Information Hiding) Polymorphism Inheritance
More informationMobile Application Programming. Objective-C Classes
Mobile Application Programming Objective-C Classes Custom Classes @interface Car : NSObject #import Car.h + (int) viper; - (id) initwithmodel:(int)m; @implementation Car Point position; float velocity;
More informationQUIZ How do we implement run-time constants and. compile-time constants inside classes?
QUIZ How do we implement run-time constants and compile-time constants inside classes? Compile-time constants in classes The static keyword inside a class means there s only one instance, regardless of
More informationCh. 3: The C in C++ - Continued -
Ch. 3: The C in C++ - Continued - QUIZ What are the 3 ways a reference can be passed to a C++ function? QUIZ True or false: References behave like constant pointers with automatic dereferencing. QUIZ What
More informationNon-Blocking Inter-Partition Communication with Wait-Free Pair Transactions
Non-Blocking Inter-Partition Communication with Wait-Free Pair Transactions Ethan Blanton and Lukasz Ziarek Fiji Systems, Inc. October 10 th, 2013 WFPT Overview Wait-Free Pair Transactions A communication
More informationThe CMS data quality monitoring software: experience and future prospects
The CMS data quality monitoring software: experience and future prospects Federico De Guio on behalf of the CMS Collaboration CERN, Geneva, Switzerland E-mail: federico.de.guio@cern.ch Abstract. The Data
More informationKakadu and Java. David Taubman, UNSW June 3, 2003
Kakadu and Java David Taubman, UNSW June 3, 2003 1 Brief Summary The Kakadu software framework is implemented in C++ using a fairly rigorous object oriented design strategy. All classes which are intended
More informationIntroduction to C++ with content from
Introduction to C++ with content from www.cplusplus.com 2 Introduction C++ widely-used general-purpose programming language procedural and object-oriented support strong support created by Bjarne Stroustrup
More informationBasic Types, Variables, Literals, Constants
Basic Types, Variables, Literals, Constants What is in a Word? A byte is the basic addressable unit of memory in RAM Typically it is 8 bits (octet) But some machines had 7, or 9, or... A word is the basic
More informationModel Viva Questions for Programming in C lab
Model Viva Questions for Programming in C lab Title of the Practical: Assignment to prepare general algorithms and flow chart. Q1: What is a flowchart? A1: A flowchart is a diagram that shows a continuous
More informationStuart
Clojure Time Stuart Halloway stu@clojure.com @stuarthalloway Copyright 2007-2010 Relevance, Inc. This presentation is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United
More informationAbsolute C++ Walter Savitch
Absolute C++ sixth edition Walter Savitch Global edition This page intentionally left blank Absolute C++, Global Edition Cover Title Page Copyright Page Preface Acknowledgments Brief Contents Contents
More informationConcept as a Generalization of Class and Principles of the Concept-Oriented Programming
Computer Science Journal of Moldova, vol.13, no.3(39), 2005 Concept as a Generalization of Class and Principles of the Concept-Oriented Programming Alexandr Savinov Abstract In the paper we describe a
More informationDesign Principles for a Beginning Programming Language
Design Principles for a Beginning Programming Language John T Minor and Laxmi P Gewali School of Computer Science University of Nevada, Las Vegas Abstract: We consider the issue of designing an appropriate
More informationMobile Application Development
Mobile Application Development Lecture 13 Introduction to ObjectiveC Part II 2013/2014 Parma Università degli Studi di Parma Lecture Summary Object creation Memory management Automatic Reference Counting
More informationSingularity Technical Report 1: Singularity Design Motivation
Singularity Technical Report 1: Singularity Design Motivation Galen C. Hunt James R. Larus December 17, 2004 MSR-TR-2004-105 Microsoft Research Microsoft Corporation One Microsoft Way Redmond, WA 98052
More informationAdvanced Systems Programming
Advanced Systems Programming Introduction to C++ Martin Küttler September 19, 2017 1 / 18 About this presentation This presentation is not about learning programming or every C++ feature. It is a short
More informationbe used for more than one use case (for instance, for use cases Create User and Delete User, one can have one UserController, instead of two separate
UNIT 4 GRASP GRASP: Designing objects with responsibilities Creator Information expert Low Coupling Controller High Cohesion Designing for visibility - Applying GoF design patterns adapter, singleton,
More informationColoredWaveform by zplane.development (c) 2018 zplane.development GmbH & Co. KG
ColoredWaveform 1.0.1 by zplane.development (c) 2018 zplane.development GmbH & Co. KG February 13, 2018 Contents 1 ColoredWaveform Documentation 2 1.1 Introduction............................... 2 1.2
More informationSTRUCTURING OF PROGRAM
Unit III MULTIPLE CHOICE QUESTIONS 1. Which of the following is the functionality of Data Abstraction? (a) Reduce Complexity (c) Parallelism Unit III 3.1 (b) Binds together code and data (d) None of the
More informationPrinciples of Programming Languages. Objective-C. Joris Kluivers
Principles of Programming Languages Objective-C Joris Kluivers joris.kluivers@gmail.com History... 3 NeXT... 3 Language Syntax... 4 Defining a new class... 4 Object identifiers... 5 Sending messages...
More informationObject-Oriented Programming for Scientific Computing
Object-Oriented Programming for Scientific Computing Dynamic Memory Management Ole Klein Interdisciplinary Center for Scientific Computing Heidelberg University ole.klein@iwr.uni-heidelberg.de 2. Mai 2017
More informationC++ Tutorial AM 225. Dan Fortunato
C++ Tutorial AM 225 Dan Fortunato Anatomy of a C++ program A program begins execution in the main() function, which is called automatically when the program is run. Code from external libraries can be
More informationFinal Exam. 11 May 2018, 120 minutes, 26 questions, 100 points
Name: CS520 Final Exam 11 May 2018, 120 minutes, 26 questions, 100 points The exam is closed book and notes. Please keep all electronic devices turned off and out of reach. Note that a question may require
More informationBSON C++ API. Version by Sans Pareil Technologies, Inc. Generated by Doxygen Thu Feb :32:39
BSON C++ API Version 2.5.1 by Sans Pareil Technologies, Inc. Generated by Doxygen 1.8.3 Thu Feb 28 2013 10:32:39 Contents 1 BSON C++ API Documentation 1 1.1 Contents................................................
More informationObject-Oriented Programming
- oriented - iuliana@cs.ubbcluj.ro Babes-Bolyai University 2018 1 / 56 Overview - oriented 1 2 -oriented 3 4 5 6 7 8 Static and friend elements 9 Summary 2 / 56 I - oriented was initially created by Bjarne
More informationOn the correctness of template metaprograms
Proceedings of the 7 th International Conference on Applied Informatics Eger, Hungary, January 28 31, 2007 Vol 2 pp 301 308 On the correctness of template metaprograms Ádám Sipos, István Zólyomi, Zoltán
More informationAIDA-2020 Advanced European Infrastructures for Detectors at Accelerators. Deliverable Report. Data acquisition software
AIDA-2020-D5.3 AIDA-2020 Advanced European Infrastructures for Detectors at Accelerators Deliverable Report Data acquisition software Wing, M. (UCL) et al 06 December 2017 The AIDA-2020 Advanced European
More information2 ADT Programming User-defined abstract data types
Preview 2 ADT Programming User-defined abstract data types user-defined data types in C++: classes constructors and destructors const accessor functions, and inline functions special initialization construct
More informationCS304 Object Oriented Programming Final Term
1. Which of the following is the way to extract common behaviour and attributes from the given classes and make a separate class of those common behaviours and attributes? Generalization (pg 29) Sub-typing
More informationSLHC-PP DELIVERABLE REPORT EU DELIVERABLE: Document identifier: SLHC-PP-D v1.1. End of Month 03 (June 2008) 30/06/2008
SLHC-PP DELIVERABLE REPORT EU DELIVERABLE: 1.2.1 Document identifier: Contractual Date of Delivery to the EC Actual Date of Delivery to the EC End of Month 03 (June 2008) 30/06/2008 Document date: 27/06/2008
More informationStructure of Programming Languages Lecture 10
Structure of Programming Languages Lecture 10 CS 6636 4536 Spring 2017 CS 6636 4536 Lecture 10: Classes... 1/23 Spring 2017 1 / 23 Outline 1 1. Types Type Coercion and Conversion Type Classes, Generics,
More informationWritten Presentation: JoCaml, a Language for Concurrent Distributed and Mobile Programming
Written Presentation: JoCaml, a Language for Concurrent Distributed and Mobile Programming Nicolas Bettenburg 1 Universitaet des Saarlandes, D-66041 Saarbruecken, nicbet@studcs.uni-sb.de Abstract. As traditional
More informationADTs in C++ In C++, member functions can be defined as part of a struct
In C++, member functions can be defined as part of a struct ADTs in C++ struct Complex { ; void Complex::init(double r, double i) { im = i; int main () { Complex c1, c2; c1.init(3.0, 2.0); c2.init(4.0,
More informationC++ Runtime Environment Programming Guide
C++ Runtime Environment Programming Guide Contents Introduction 3 Organization of This Document 3 Overview of the C++ Runtime Environment 4 Targeting Mac OS X v10.3.8 and Earlier 4 Targeting Mac OS X v10.3.9
More informationChapter 11. Abstract Data Types and Encapsulation Concepts ISBN
Chapter 11 Abstract Data Types and Encapsulation Concepts ISBN 0-321-49362-1 Chapter 11 Topics The Concept of Abstraction Introduction to Data Abstraction Design Issues for Abstract Data Types Language
More informationAn Introduction to C++
An Introduction to C++ Introduction to C++ C++ classes C++ class details To create a complex type in C In the.h file Define structs to store data Declare function prototypes The.h file serves as the interface
More informationObject-Oriented Programming for Scientific Computing
Object-Oriented Programming for Scientific Computing Smart Pointers and Constness Ole Klein Interdisciplinary Center for Scientific Computing Heidelberg University ole.klein@iwr.uni-heidelberg.de Summer
More informationProgramming II (CS300)
1 Programming II (CS300) Chapter 02: Using Objects MOUNA KACEM mouna@cs.wisc.edu Fall 2018 Using Objects 2 Introduction to Object Oriented Programming Paradigm Objects and References Memory Management
More informationPLD Semester Exam Study Guide Dec. 2018
Covers material from Chapters 1-8. Semester Exam will be built from these questions and answers, though they will be re-ordered and re-numbered and possibly worded slightly differently than on this study
More informationA Proposal to Add a Const-Propagating Wrapper to the Standard Library
Doc number: N4057 Revises: N3973 Date: 2014-07-02 Project: Programming Language C++, Library Evolution Working Group Reply-to: Jonathan Coe Robert Mill A Proposal
More informationC++ and OpenMP Christian Terboven Center for Computing and Communication RWTH Aachen University, Germany
++ and OpenMP hristian Terboven terboven@rz.rwth-aachen.de enter omputing and ommunication RWTH Aachen University, Germany 1 IWOMP 07 Tutorial ++ and OpenMP enter omputing and ommunication Agenda OpenMP
More information