1 / 26

Introduction to Gaudi

Learn about Gaudi, an architecture and framework used in LHCb data processing, including its benefits, organization, and main design choices. See how Gaudi separates data and algorithms, and how it uses a data store-centered architectural style.

malindab
Télécharger la présentation

Introduction to Gaudi

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Introduction to Gaudi

  2. LHCb Software Strategy Develop an Architecture (‘blueprint’) and a Framework (real code) to be used at all stages of LHCb data processing • HLT, simulation, reconstruction, analysis Avoid fragmentation and duplication of computing efforts Transparent use of third-party components wherever possible Applications are developed by customizing the Framework

  3. What is a Framework? Framework Definition [1,2] • An architectural pattern that codifies a particular domain. It provides the suitable knobs, slots and tabs that permit clients to use and adapt to specific applications within a given range of behavior. In practice • A skeleton of an application into which developers plug in their code and provides most of the common functionality. [1] G. Booch, “Object Solutions”, Addison-Wesley 1996 [2] E. Gamma, et al., “Design Patterns”, Addison-Wesley 1995

  4. Framework Benefits • Common vocabulary, better specifications of what needs to be done, better understanding of the system. • Low coupling between concurrent developments. Smooth integration. Organization of the development. • Robustness, resilient to change (change-tolerant). • Fostering code re-use

  5. Software Organization Applications built on top of frameworks and implementing the required algorithms. Reconstruction Simulation High level triggers Analysis • One framework for basic services • + various specialized frameworks: • detector description, visualization, persistency, interactivity, simulation, etc. Frameworks Toolkits A series of widely used basic libraries: Boost, GSL, Root etc. Foundation Libraries

  6. Gaudi Architecture GAUDI is an architecture and framework for event-processing applications (simulation, reconstruction, etc.) • Initially developed for LHCb, it has been adopted and extended by ATLAS and adopted by several other experiments including Fermi Space Telescope, HARP, Minerva, Daya Bay Main Design Choices best illustrated by looking at the Gaudi Object diagram • A snapshot of the components in memory, once the job is initialized and running

  7. Gaudi Object Diagram Converter Converter Application Manager Converter Event Selector Data Files Message Service Persistency Service Event Data Service Transient Event Store JobOptions Service Algorithm Algorithm Algorithm Data Files Transient Detector Store Particle Prop. Service Persistency Service Detec. Data Service Other Services Data Files Transient Histogram Store Persistency Service Histogram Service

  8. Separation between “data” and “algorithms” Converter Converter Application Manager Converter Event Selector Data Files Message Service Persistency Service Event Data Service Transient Event Store JobOptions Service Algorithm Algorithm Algorithm Data Files Transient Detector Store Particle Prop. Service Persistency Service Detec. Data Service Other Services Data Files Transient Histogram Store Persistency Service Histogram Service

  9. Three basic categories of datacharacterized by their “lifetime” in the job Converter Converter Application Manager Converter Event Selector Data Files Message Service Persistency Service Event Data Service Transient Event Store JobOptions Service Algorithm Algorithm Algorithm Data Files Transient Detector Store Particle Prop. Service Persistency Service Detec. Data Service Other Services Data Files Transient Histogram Store Persistency Service Histogram Service

  10. Separation between “transient” and “persistent” representations of the data Converter Converter Application Manager Converter Event Selector Data Files Message Service Persistency Service Event Data Service Transient Event Store JobOptions Service Algorithm Algorithm Algorithm Data Files Transient Detector Store Particle Prop. Service Persistency Service Detec. Data Service Other Services Data Files Transient Histogram Store Persistency Service Histogram Service

  11. Data store-centered (“blackboard”) architectural style Converter Converter Application Manager Converter Event Selector Data Files Message Service Persistency Service Event Data Service Transient Event Store JobOptions Service Algorithm Algorithm Algorithm Data Files Transient Detector Store Particle Prop. Service Persistency Service Detec. Data Service Other Services Data Files Transient Histogram Store Persistency Service Histogram Service

  12. “User code” encapsulated in few specific places Converter Converter Application Manager Converter Event Selector Data Files Message Service Persistency Service Event Data Service Transient Event Store JobOptions Service Algorithm Algorithm Algorithm Data Files Transient Detector Store Particle Prop. Service Persistency Service Detec. Data Service Other Services Data Files Transient Histogram Store Persistency Service Histogram Service

  13. Well defined component “interfaces” Converter Converter Application Manager Converter Event Selector Data Files Message Service Persistency Service Event Data Service Transient Event Store JobOptions Service Algorithm Algorithm Algorithm Data Files Transient Detector Store Particle Prop. Service Persistency Service Detec. Data Service Other Services Data Files Transient Histogram Store Persistency Service Histogram Service

  14. Gaudi Interface model ISvcLocator ApplicationMgr IDataProviderSvc IProperty IAlgorithm EventDataSvc Concrete Algorithm IDataProviderSvc DetectorDataSvc IHistogramSvc HistogramSvc Obj_A Obj_B MessageSvc IMessageSvc ToolSvc IToolSvc

  15. Laptop Interface Model IDVIConnector IWiFiPort IVGAConnector • Each interface is specialized in a domain. • Interfaces are independent of concrete implementations. • You can mix devices from several constructors. • Application built by composing. • Standardizing on the interfaces gives us big leverage. IKeyboard IUSBConnector

  16. Electrical plug interface model Don’t define too many interfaces for the same job!

  17. Interfaces in Practice IMyInterface.h class IMyInterface: virtual public IAlgTool { virtual double doSomething( int a, double b ) = 0; } MyDoSomethingTool.h #include “IMyInterface.h” class MyDoSomethingTool : public GaudiTool, virtual public IMyInterface { inline double doSomething( int a, double b ) { return b * (double)a; } }

  18. ClientAlgorithm.cpp #include “IMyInterface.h” ClientAlgorithm::myMethod() { // Declare the interface IMyInterface* myInterface; // Get the interface from somewhere myInterface = tool<IMyInterface>(“MyDoSomethingTool”); // Use the interface double result = myInterface->doSomething( 10, 100.5); }

  19. Gaudi Component Model • Algorithms, Converters, Services and Tools are known as Components • Self contained objects with behaviour • Loaded at run time from component libraries (“plugins”) • Interact with the framework and with each other via Interfaces • Behaviour controlled by Properties (“Job options”) • Properties • Control and data parameters for Algorithms, Services and Tools

  20. Algorithm • Users write Concrete Algorithms • It is called once per physics event • Implements three methods in addition to the constructor and destructor • initialize(), execute(), finalize()

  21. Algorithm & Transient Store Data T1 Data T1 Transient Event Data Store Data T1 Algorithm A Data T2, T3 Data T2 Algorithm B Data T4 Data T3, T4 Algorithm C Apparent dataflow Data T5 Real dataflow Data T5

  22. Tools • Algorithms only share data via TDS • What about private data? • Tools are globally or locally available components providing algorithmic functionality • Callable many times per event, through specific interface and with arguments • IBdlTool, IDistanceCalculator, IHltSummaryTool, IMassVertexFit, IProtoParticleFilter, ISTReadoutTool, ITrackFitter….

  23. Services • Globally available software components providing framework functionality • JobOptions Service, Message Service, Particle Properties Service, Event Data Service, Histogram Service, N-tuple Service, Detector Data Service, Magnetic Field Service, Random Number Service, Chrono Service, (Persistency Services), (User Interface & Visualization Services), (Geant4 Services)

  24. Data • Data Object • Atomic data unit (visible and managed by transient data store) • No algorithmic code • Transient Data Store • Central service and repository for data objects • Manages data location, life cycle, load on demand, … • Data Converter • Provides explicit/implicit conversion from/to persistent data format to/from transient data

  25. Gaudi Product Sheet • Current release • v21r11 (Sep 2010) • Supported Platforms • Scientific Linux (CERN) 5 & gcc 4.3 • Scientific Linux (CERN) 4 & gcc 3.4 • Windows XP & VisualC++ 7.1 • (gcc 4.3 with OSX 10.5) • Web address. • http://cern.ch/proj-gaudi/

  26. Documentation • Gaudi User Guide • A 220 pages document targeted to end-users • FAQ: Mixture of Gaudi and LHCb specific topics • https://twiki.cern.ch/twiki/bin/view/LHCb/FAQ/LHCbFAQ • C++ Documentation (generated from code) • Doxygen: • Uses special comments in code, e.g. Tutorial solutions • http://cern.ch/proj-gaudi/releases/GAUDI/doc/html/index.html • Lbglimpse: indexed search within released code • Lbglimpse <search string> <Project> <version> • Lbglimpse IJobOptionsSvc Gaudi v21r11 • Self help mailing lists: • lhcb-soft-talk@cern.ch, gaudi-talk@lists.bnl.gov

More Related