Download presentation
Presentation is loading. Please wait.
Published byLeslie Bates Modified over 8 years ago
1
Introduction to Gaudi LHCb software tutorial - September 20111
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 2LHCb software tutorial - September 2011
3
Software Organization Frameworks Toolkits ReconstructionSimulation Analysis Foundation Libraries High level triggers One framework for basic services + various specialized frameworks: detector description, visualization, persistency, interactivity, simulation, etc. A series of widely used basic libraries: Boost, GSL, Root etc. Applications built on top of frameworks and implementing the required algorithms. 3LHCb software tutorial - September 2011
4
What is a Framework? LHCb software tutorial - September 20114 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 which provides most of the common functionality. Benefits Common vocabulary, better specifications of what needs to be done, better understanding of the system. Low coupling between concurrent developments. Smooth integration. Robustness, resilient to change (change-tolerant). Fostering code re-use [1] G. Booch, “Object Solutions”, Addison-Wesley 1996 [2] E. Gamma, et al., “Design Patterns”, Addison-Wesley 1995
5
Gaudi Architecture LHCb software tutorial - September 20115 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
6
Gaudi Object Diagram Converter Algorithm Event Data Service Persistency Service Data Files Algorithm Detec. Data Service Persistency Service Data Files Transient Detector Store Message Service JobOptions Service Particle Prop. Service Other Services Histogram Service Persistency Service Data Files Transient Histogram Store Application Manager Converter Event Selector Transient Event Store 6LHCb software tutorial - September 2011
7
Separation between “data” and “algorithms” Converter Algorithm Event Data Service Persistency Service Data Files Algorithm Detec. Data Service Persistency Service Data Files Transient Detector Store Message Service JobOptions Service Particle Prop. Service Other Services Histogram Service Persistency Service Data Files Transient Histogram Store Application Manager Converter Event Selector Transient Event Store 7LHCb software tutorial - September 2011
8
Three basic categories of data characterized by their “lifetime” in the job Converter Algorithm Event Data Service Persistency Service Data Files Algorithm Detec. Data Service Persistency Service Data Files Transient Detector Store Message Service JobOptions Service Particle Prop. Service Other Services Histogram Service Persistency Service Data Files Transient Histogram Store Application Manager Converter Event Selector Transient Event Store 8LHCb software tutorial - September 2011
9
Separation between “transient” and “persistent” representations of the data Converter Algorithm Event Data Service Persistency Service Data Files Algorithm Detec. Data Service Persistency Service Data Files Transient Detector Store Message Service JobOptions Service Particle Prop. Service Other Services Histogram Service Persistency Service Data Files Transient Histogram Store Application Manager Converter Event Selector Transient Event Store 9LHCb software tutorial - September 2011
10
Data store-centered (“whiteboard”) architectural style Converter Algorithm Event Data Service Persistency Service Data Files Algorithm Detec. Data Service Persistency Service Data Files Transient Detector Store Message Service JobOptions Service Particle Prop. Service Other Services Histogram Service Persistency Service Data Files Transient Histogram Store Application Manager Converter Event Selector Transient Event Store 10LHCb software tutorial - September 2011
11
“User code” encapsulated in few specific places Converter Algorithm Event Data Service Persistency Service Data Files Algorithm Detec. Data Service Persistency Service Data Files Transient Detector Store Message Service JobOptions Service Particle Prop. Service Other Services Histogram Service Persistency Service Data Files Transient Histogram Store Application Manager Converter Event Selector Transient Event Store 11LHCb software tutorial - September 2011
12
Well defined component “interfaces” Converter Algorithm Event Data Service Persistency Service Data Files Algorithm Detec. Data Service Persistency Service Data Files Transient Detector Store Message Service JobOptions Service Particle Prop. Service Other Services Histogram Service Persistency Service Data Files Transient Histogram Store Application Manager Converter Event Selector Transient Event Store 12LHCb software tutorial - September 2011
13
Gaudi Interface model Concrete Algorithm EventDataSvc IDataProviderSvc IHistogramSvc IMessageSvc IAlgorithm IProperty Obj_B DetectorDataSvc HistogramSvc MessageSvc ToolSvc IToolSvc ApplicationMgr ISvcLocator Obj_A 13LHCb software tutorial - September 2011
14
Laptop Interface Model IDVIConnector IWiFiPort IKeyboard IUSBConnector 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. IVGAConnector 14LHCb software tutorial - September 2011
15
Electrical plug interface model Don’t define too many interfaces for the same job! 15LHCb software tutorial - September 2011
16
Interfaces in Practice class IMyInterface: virtual public IAlgTool { virtual double doSomething( int a, double b ) = 0; } class IMyInterface: virtual public IAlgTool { virtual double doSomething( int a, double b ) = 0; } IMyInterface.h #include “IMyInterface.h” class MyDoSomethingTool : public GaudiTool, virtual public IMyInterface { inline double doSomething( int a, double b ) { return b * (double)a; } } #include “IMyInterface.h” class MyDoSomethingTool : public GaudiTool, virtual public IMyInterface { inline double doSomething( int a, double b ) { return b * (double)a; } } MyDoSomethingTool.h 16LHCb software tutorial - September 2011
17
#include “IMyInterface.h” ClientAlgorithm::myMethod() { // Declare the interface IMyInterface* myInterface; // Get the interface from somewhere myInterface = tool (“MyDoSomethingTool”); // Use the interface double result = myInterface->doSomething( 10, 100.5); } #include “IMyInterface.h” ClientAlgorithm::myMethod() { // Declare the interface IMyInterface* myInterface; // Get the interface from somewhere myInterface = tool (“MyDoSomethingTool”); // Use the interface double result = myInterface->doSomething( 10, 100.5); } ClientAlgorithm.cpp 17LHCb software tutorial - September 2011
18
Gaudi Component Model LHCb software tutorial - September 201118 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”) Algorithms are where users interact with the framework Implement three methods invoked by the framework initialize() called once at the start of the job execute() called in the event loop, once per event finalize() called once at the end of the job Communicate with each other via the Transient Event Store
19
Algorithm & Transient Store LHCb software tutorial - September 201119 Algorithm A Algorithm B Algorithm C Transient Event Data Store Data T1 Data T2, T3 Data T2 Data T3, T4 Data T4 Data T5 Data T1 Data T5 Real dataflow Apparent dataflow
20
Tools and Services LHCb software tutorial - September 201120 Algorithms have some limitations Only called once per event, only share data via TES What about private data? Tools are components providing algorithmic functionality Callable many times per event, through specific interface and with arguments IBdlTool, IDistanceCalculator, IHltSummaryTool, IMassVertexFit, IProtoParticleFilter, ISTReadoutTool, ITrackFitter…. Can be private: owned and accessible only by the component creating it Or public: owned by the framework and accessible globally Services: Similar to public tools, created by framework to provide global functionality Job Options Service, Message Service, Particle Properties Service, Event Data Service, Histogram Service, Ntuple Service, Detector Data Service, Magnetic Field Service, Random Number Service, Persistency Services…
21
Data LHCb software tutorial - September 201121 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
22
Gaudi Product Sheet Current release v22r4 (Sep 2011) Supported Platforms Scientific Linux (CERN) 5 & gcc 4.3 on x86_64 and i686 Scientific Linux (CERN) 5 & icc 11 on x86_64 Windows XP & VisualC++ 9 on i686 (gcc 4.3 with OSX 10.6) Web address. http://cern.ch/proj-gaudi/ http://cern.ch/proj-gaudi/ 22LHCb software tutorial - September 2011
23
Documentation LHCb software tutorial - September 201123 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 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/latest/doxygen/ http://cern.ch/proj-gaudi/releases/latest/doxygen/ Lbglimpse: indexed search within released code Lbglimpse Lbglimpse IJobOptionsSvc Gaudi v22r4 Self help mailing lists: lhcb-soft-talk@cern.ch, gaudi-talk@lists.bnl.gov lhcb-soft-talk@cern.chgaudi-talk@lists.bnl.gov
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.