gaudi - a software architecture and framework for building...

30
August, 1999 GAUDI 1 GAUDI - A Software Architecture and Framework for Building HEP data processing Applications Developed in the context of the LHCb Experiment Pere Mato, CERN August 1999

Upload: others

Post on 03-Nov-2019

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: GAUDI - A Software Architecture and Framework for Building ...lhcb.web.cern.ch/lhcb/computing/Meetings/offline/pdf/GaudiSeminar_Aug...August, 1999 GAUDI 1 GAUDI - A Software Architecture

August, 1999 GAUDI 1

GAUDI - A SoftwareArchitecture and Framework forBuilding HEP data processingApplicationsDeveloped in the context of the LHCb Experiment

Pere Mato, CERNAugust 1999

Page 2: GAUDI - A Software Architecture and Framework for Building ...lhcb.web.cern.ch/lhcb/computing/Meetings/offline/pdf/GaudiSeminar_Aug...August, 1999 GAUDI 1 GAUDI - A Software Architecture

August, 1999 GAUDI 2

Outlineu Introduction

– The LHCb experiment– Computing organization strategy– Software development strategy

u GAUDI architecture– Goals and scope– Design choices– Selected topics

u Implementation– Technology choices, Tools, ...– Schedule so far

Page 3: GAUDI - A Software Architecture and Framework for Building ...lhcb.web.cern.ch/lhcb/computing/Meetings/offline/pdf/GaudiSeminar_Aug...August, 1999 GAUDI 1 GAUDI - A Software Architecture

August, 1999 GAUDI 3

LHCb: Physics Goalsu LHCb is a dedicated experiment at LHC collider for precision

measurements of CP-violation and rare decays– CP violation currently observed in kaon decays is consistent with Standard

Model, but cannot exclude that CP violation is partly or even entirely due tonew physics.

– Cosmology (baryon genesis) suggests that an additional source of CPviolation other than the Standard Model is needed.

u LHC is an ideal place to produce lots of Bd and Bsu All interesting decay channels have 10-5 visible branching fractions.

Page 4: GAUDI - A Software Architecture and Framework for Building ...lhcb.web.cern.ch/lhcb/computing/Meetings/offline/pdf/GaudiSeminar_Aug...August, 1999 GAUDI 1 GAUDI - A Software Architecture

August, 1999 GAUDI 4

LHCb: The Detector

Page 5: GAUDI - A Software Architecture and Framework for Building ...lhcb.web.cern.ch/lhcb/computing/Meetings/offline/pdf/GaudiSeminar_Aug...August, 1999 GAUDI 1 GAUDI - A Software Architecture

August, 1999 GAUDI 5

LHCb: The Detectoru Single-arm spectrometer with forward angular coverage from ~10

mrad to ~300(250) mrad.– Vertex detector

» Si r-φ strip detector, single-sided 150 µm– Tracking system

» Outer: drift chamber honeycomb. Inner: MSGC with GEM or MCSC

– RICH system» RICH1: Aerogel + C4F10. RICH2: CF4

– Calorimeter system» Preshower: single layer Pb/Si. ECAL: Shashilik. HCAL: Atlas Tile Cal.

– Muon system» Multi-gap RPC and CPC

Page 6: GAUDI - A Software Architecture and Framework for Building ...lhcb.web.cern.ch/lhcb/computing/Meetings/offline/pdf/GaudiSeminar_Aug...August, 1999 GAUDI 1 GAUDI - A Software Architecture

August, 1999 GAUDI 6

LHCb in numbersu Collaboration: ~45 Institutes, ~350 participantsu Cost of the experiment: 86 MCHFu Electronics: ~106 readout channelsu Trigger System: 4 Levels. 40 MHz→ 1 MHz → 40 kHz → 5 kHz

→ 200 Hzu Data Acquisition: 100 kB/event. 2-4 GB/s → 20 MB/s. 1.5 106 MIPsu Status of the Experiment:

– Technical proposal submitted in February 1998– Approved in September 1998– R&D phase for ~2 years

Page 7: GAUDI - A Software Architecture and Framework for Building ...lhcb.web.cern.ch/lhcb/computing/Meetings/offline/pdf/GaudiSeminar_Aug...August, 1999 GAUDI 1 GAUDI - A Software Architecture

August, 1999 GAUDI 7

LHCb Computing: Goalsu Need to focus on quality but at the same time be efficient in use of

resourcesu Identify all the roles and their responsibilities

– system architect, project leaders, librarian, framework developers, clientdevelopers, ...

u Good communication to arrive at common aims and understanding– need to know at all times what everybody is doing (regular meetings)– Procedures for taking decisions must be agreed and followed

u Common language supported through documentation and training– Web– Handbooks (user, engineering, management)– Formal training

Page 8: GAUDI - A Software Architecture and Framework for Building ...lhcb.web.cern.ch/lhcb/computing/Meetings/offline/pdf/GaudiSeminar_Aug...August, 1999 GAUDI 1 GAUDI - A Software Architecture

August, 1999 GAUDI 8

Organizing software development activitiesManage

Plan, initiate, track, coordinateSet priorities and schedules, resolve conflicts

SupportSupport development processesManage and maintain componentsCertify, classify, distributeDocument, give feedback

AssembleDesign applicationFind and specialise componentsDevelop missing componentsIntegrate components

RequirementsExisting software systems

BuildDevelop models, Evaluate toolkitsArchitect components and systems

Choose integration standardEngineer reusable components

Page 9: GAUDI - A Software Architecture and Framework for Building ...lhcb.web.cern.ch/lhcb/computing/Meetings/offline/pdf/GaudiSeminar_Aug...August, 1999 GAUDI 1 GAUDI - A Software Architecture

August, 1999 GAUDI 9

Project Organization

Support

FacilitiesCPU farmsDesktopStorageNetworkSystem Man.

VendorsIT-IPT..

VendorsIT-PDP

Vendors, IT-ASD

Support

SoftwareSDEProcessQualityLibrarianTrainingWebmaster

MM

Build

FrameworksArchitecture, Components,

Integration technology,Libraries and toolkits

A

Reconstruction

M

Simulation

M

Analysis

M

Controls

M

Control Room

M

Assem ble

DAQ

M

Steering GroupM M C

Technical ReviewE M A

...

Arch. ReviewM A E ... ...

M

A

C

E

Coordinator

Architect

Project Manager

Project Engineer

Page 10: GAUDI - A Software Architecture and Framework for Building ...lhcb.web.cern.ch/lhcb/computing/Meetings/offline/pdf/GaudiSeminar_Aug...August, 1999 GAUDI 1 GAUDI - A Software Architecture

August, 1999 GAUDI 10

Strategy for development of new softwareu Start with a small design team 6-8 people

– architect, librarian, domain specialists with design/programming experience

u Collect URs and scenarios, use to validate designu Establish the basic criteria for overall designu Make technology choices for implementations of first prototypesu Incremental approach to development. Releases every ~4 months.u Development cycle is user-driven. Priorities, feedback, etc.u Strategic decisions taken following thorough review (~1/year)u Releases accompanied by complete documentationu Expand development team to cover new domains

Page 11: GAUDI - A Software Architecture and Framework for Building ...lhcb.web.cern.ch/lhcb/computing/Meetings/offline/pdf/GaudiSeminar_Aug...August, 1999 GAUDI 1 GAUDI - A Software Architecture

August, 1999 GAUDI 11

LHCb Offline software road map

200420022000

Working Prototype, ‘retire’ SICB

Detailed Implementation

Integration and Commissioning Exploitation

Relea

se N

umbe

r

2006

Incremental releases

Review

Major TechnologyChoices

Page 12: GAUDI - A Software Architecture and Framework for Building ...lhcb.web.cern.ch/lhcb/computing/Meetings/offline/pdf/GaudiSeminar_Aug...August, 1999 GAUDI 1 GAUDI - A Software Architecture

August, 1999 GAUDI 12

GAUDI Architecture

Antoni GaudíBarcelona (1852-1926)Modernist style architect

Page 13: GAUDI - A Software Architecture and Framework for Building ...lhcb.web.cern.ch/lhcb/computing/Meetings/offline/pdf/GaudiSeminar_Aug...August, 1999 GAUDI 1 GAUDI - A Software Architecture

August, 1999 GAUDI 13

GAUDI: Scopeu We want to develop an Architecture and Framework to be used in

ALL the LHCb event data processing applications in all stages:– High level trigger, simulation, reconstruction, analysis.– Control applications are not included (slow control, run control)

u Physicists will develop applications by customizing the frameworkby subclassing, composing and configuring.

u Components will be developed in general using other specializedframeworks (GUI, object persistency, simulation, … )

Page 14: GAUDI - A Software Architecture and Framework for Building ...lhcb.web.cern.ch/lhcb/computing/Meetings/offline/pdf/GaudiSeminar_Aug...August, 1999 GAUDI 1 GAUDI - A Software Architecture

August, 1999 GAUDI 14

GAUDI: Expected Benefitsu Allow physicists to focus on solving the physics problem.

– Must be easy to use– Non physics-related functionality implemented by the framework

u Common vocabulary, better specifications of what needs to be done.u Ensure low coupling between concurrent developments.u Guarantee a later smooth integration of developments.u Facilitate software re-use

Page 15: GAUDI - A Software Architecture and Framework for Building ...lhcb.web.cern.ch/lhcb/computing/Meetings/offline/pdf/GaudiSeminar_Aug...August, 1999 GAUDI 1 GAUDI - A Software Architecture

August, 1999 GAUDI 15

Software Structure

FrameworksToolkits

Reco

nstr

uctio

n

Simu

lation

Analy

sis

Foundation Libraries

High

leve

l trig

gers

A series of Frameworks and Toolkits.One main framework: GAUDI, variousspecialized frameworks: visualization,persistency, interactivity, simulation(Geant4), etc.

A series of basic libraries widely used:STL, CLHEP, etc. (Vocabulary)

A series of data processing applicationsbuilt on top of the frameworks andimplementing the required physicsalgorithms.

Page 16: GAUDI - A Software Architecture and Framework for Building ...lhcb.web.cern.ch/lhcb/computing/Meetings/offline/pdf/GaudiSeminar_Aug...August, 1999 GAUDI 1 GAUDI - A Software Architecture

August, 1999 GAUDI 16

Major design criteriau Separation between “data” and “algorithms”u Three basic types of data:

– event data (data obtained from the particle collisions)– detector data (structure, geometry, calibration, alignment, environmental

parameters,..)– statistical data: (histograms, … )

u Separation between “persistent data” and “transient data”.– Isolation of user’s code.– Different/incompatible optimization criteria.– Transient as a bridge between various representations.

Page 17: GAUDI - A Software Architecture and Framework for Building ...lhcb.web.cern.ch/lhcb/computing/Meetings/offline/pdf/GaudiSeminar_Aug...August, 1999 GAUDI 1 GAUDI - A Software Architecture

August, 1999 GAUDI 17

Major design criteria (2)u Data store centered architectural style.

– “Algorithms” as data producers and consumers.

u User code encapsulated in few specific places:– “Algorithms”: Physics code– “Converters”: Converting data objects into other representations

u All components with well defined “interfaces” and as “generic” aspossible.

u Design principles– Low coupling, inheritance, static storage, ...

Page 18: GAUDI - A Software Architecture and Framework for Building ...lhcb.web.cern.ch/lhcb/computing/Meetings/offline/pdf/GaudiSeminar_Aug...August, 1999 GAUDI 1 GAUDI - A Software Architecture

August, 1999 GAUDI 18

Object diagram

TObjTObj

Obj2

AppManager

PersistencySvc

Algorithm1Algorithm1

Algorithm1

JobOptionsSvc

TObj

TObjContainerTObjContainer

ObjContainer

Obj3

MessageSvc

TObj1Obj1

DetDataSrv

TDetElem1TDetElem1

TDetElem1

PObjectPObjectPDetElem

EventDataSvc

AlgFactory

AnotherPercySvc

Transient Event Store

PObjPObj

PObj

PObjPObj

PObj

DetPerstySvc

Alg Properties

T Detector Store

T Histogram Store

HistogramSvc

Hist1Hist1

Hist1

HistPerstySvc PHistPHist

ConverterConverter

Converter ConverterConverter

Converter

EventSelector

Converter

TObjObj1

uses

creates

navigability

Page 19: GAUDI - A Software Architecture and Framework for Building ...lhcb.web.cern.ch/lhcb/computing/Meetings/offline/pdf/GaudiSeminar_Aug...August, 1999 GAUDI 1 GAUDI - A Software Architecture

August, 1999 GAUDI 19

Interfaces

ConcreteAlgorithm

EventDataServiceIDataProviderSvc

IDataProviderSvc

IHistogramSvc

IMessageSvc

IAlgorithm IProperty

ObjectA ObjectB

• Each componentimplements a numberof interfaces

• Each component usesa number ofinterfaces fromother components

• An Algorithm usesmany Services

DetectorDataService

HistogramService

MessageService

ParticlePropertySvc IParticlePropertySvc

Page 20: GAUDI - A Software Architecture and Framework for Building ...lhcb.web.cern.ch/lhcb/computing/Meetings/offline/pdf/GaudiSeminar_Aug...August, 1999 GAUDI 1 GAUDI - A Software Architecture

August, 1999 GAUDI 20

Algorithms

AlgorithmA

AlgorithmB

AlgorithmC

Transient EventData Store

Data T1

Data T2, T3

Data T2

Data T3, T4

Data T4

Data T5

Data T1Data T1

Data T5

Real dataflow Apparent dataflow • Each Algorithm only knowswhat data (type and name) isexpecting as input andcreating as output.

• The only coupling is throughthe data.

• Scheduling of sub-algorithmsis the responsibility of theparent algorithm.

A

CB

Parent

Page 21: GAUDI - A Software Architecture and Framework for Building ...lhcb.web.cern.ch/lhcb/computing/Meetings/offline/pdf/GaudiSeminar_Aug...August, 1999 GAUDI 1 GAUDI - A Software Architecture

August, 1999 GAUDI 21

Servicesu Services are provided to Algorithmsu Examples:

– Job Options service (card files)– Message reporting service– Event/Detector/Histogram data service– Event Selector– Persistency and Conversion services– User Interface (GUI)– Particle property service– ...

Particle Prop.Service

AlgorithmAlgorithm

PPFile

IService

IParticlePropertySvc

IProperty

Page 22: GAUDI - A Software Architecture and Framework for Building ...lhcb.web.cern.ch/lhcb/computing/Meetings/offline/pdf/GaudiSeminar_Aug...August, 1999 GAUDI 1 GAUDI - A Software Architecture

August, 1999 GAUDI 22

Event Data Store

Transient Event Store

Event DataService

PersistencyService

Algorithm

retrieveObject( “MCEcalHits”,...)

registerObject( “key”,...)

Direct reference

Fetch()Store()

creates

• Store objects for use of others• Retrieve objects when needed• Tree structure (file system)• Identification by logical address

(“/Event/MC/MCEcalHits”)• Store owns the objects.

Responsible for cleanup

Page 23: GAUDI - A Software Architecture and Framework for Building ...lhcb.web.cern.ch/lhcb/computing/Meetings/offline/pdf/GaudiSeminar_Aug...August, 1999 GAUDI 1 GAUDI - A Software Architecture

August, 1999 GAUDI 23

OutputStream

Event Persistency

Event DataService Persistency

Service

Sicb dataFiles

AlgorithmAlgorithm

SicbCnvSvc

RootCnvSvc

Root dataFiles

ConverterConverterConverter

ConverterConverterConverter

Sicb

/Zeb

raRo

ot I/

O

OutputStreamAppManager

TransientEvent Store

• Several technologies available simultaneously:Objy, Root, Zebra,…

• Converters to transform objects from onerepresentation to another

• Generic links between objects in the persistentworld

Page 24: GAUDI - A Software Architecture and Framework for Building ...lhcb.web.cern.ch/lhcb/computing/Meetings/offline/pdf/GaudiSeminar_Aug...August, 1999 GAUDI 1 GAUDI - A Software Architecture

August, 1999 GAUDI 24

Data Processing Application Editors

Conversionservices

Algorithms

Detector Description

Persistent DetectorDescription (DDDB)

DetElemDetElemDetElem

DetElemDetElemDetElemDetElemDetElemDetElem

GeomGeom

GeomCalib

GeomSlow

Editors

Transient detectorstore

DetElem

DetElem DetElem

Geom

Calib

Slow

Algorithms

Conversionservices

Proj

ectio

n view

:ve

rsion

& ev

ent t

ime

Otherrepresentations

? Up

date

pers

isten

cy DetectorData

Producers

Page 25: GAUDI - A Software Architecture and Framework for Building ...lhcb.web.cern.ch/lhcb/computing/Meetings/offline/pdf/GaudiSeminar_Aug...August, 1999 GAUDI 1 GAUDI - A Software Architecture

August, 1999 GAUDI 25

Data Visualization

Transient Event/Detector Store

ConversionService Representations

Store(graphical,

textual)ConverterConverterConverterConverter

Data ItemSelector

UserInterface

•Selects objectsin store

Page 26: GAUDI - A Software Architecture and Framework for Building ...lhcb.web.cern.ch/lhcb/computing/Meetings/offline/pdf/GaudiSeminar_Aug...August, 1999 GAUDI 1 GAUDI - A Software Architecture

August, 1999 GAUDI 26

Application Configurationu What are the knobs at our disposal?

– JobOptions. Simple usage. It allows the end-user to overwrite any property ofany algorithm or service.

– Algorithm/Service properties database. A more sophisticated way to modifythe properties of the algorithms and services.

– Detector database edition to create new versions or releases.– Write specific code. Configure your application by setting properties at

runtime.– User interface component. Graphical (a la Visual Basic), command line

(scripting language), etc.

Page 27: GAUDI - A Software Architecture and Framework for Building ...lhcb.web.cern.ch/lhcb/computing/Meetings/offline/pdf/GaudiSeminar_Aug...August, 1999 GAUDI 1 GAUDI - A Software Architecture

August, 1999 GAUDI 27

Packages

Package group

Package dependency

Gaudi(foundations)

LHCbEvent(event model)

HbookCnv(converters)

SicbCnv(converters)

RootCnv(converters)

GaudiExam.(applications)

LHCbAlg(algorithms)

DetDesc(detect. model)

DetCnv(converters)

Futio(SICB)

optional

RIO

CernLib

CLHEP

STL

GAUDI Framework• Physical design (packaging)is an architectural issue.

• Big consequences on:• compilation time• link dependencies• configuration

management• executable size• ...

• Package interdependenciesrequire approval ofarchitect.

• Avoid cyclic dependencies

Page 28: GAUDI - A Software Architecture and Framework for Building ...lhcb.web.cern.ch/lhcb/computing/Meetings/offline/pdf/GaudiSeminar_Aug...August, 1999 GAUDI 1 GAUDI - A Software Architecture

August, 1999 GAUDI 28

Implementationu Platforms:

– WNT, Linux, IBM AIX, HP-UX

u Tools and Libraries:

Design tools Visual Thought, Rational RoseCoding rules Interim LHCb coding conventions, SPIDERCode Management Visual Source Safe, CVSConfiguration Management CMTProblem tracking Planned to use RemedyCompilers/Debuggers Visual C++, GNU EGCSLibraries STL, CLHEP, NAG C, HTL, RIODocumentation FrameMakerSource code documentation Object Outline, DOC++

Page 29: GAUDI - A Software Architecture and Framework for Building ...lhcb.web.cern.ch/lhcb/computing/Meetings/offline/pdf/GaudiSeminar_Aug...August, 1999 GAUDI 1 GAUDI - A Software Architecture

August, 1999 GAUDI 29

Schedule so faru Sept 98 - architect appointed, design team 6 people assembledu Nov 25 ’98 - 1 day architecture review

– goals, architecture design document, URD, scenarios

u Feb 8 ‘99 - GAUDI first release– first software week with presentations and tutorial sessions– plan second release– expand GAUDI team

u May 30 ‘99 - GAUDI second release– second software week …– plan third release– expand GAUDI team (GEANT4 simulation toolkit)

u Nov ‘99 - next GAUDI release and software week planned

Page 30: GAUDI - A Software Architecture and Framework for Building ...lhcb.web.cern.ch/lhcb/computing/Meetings/offline/pdf/GaudiSeminar_Aug...August, 1999 GAUDI 1 GAUDI - A Software Architecture

August, 1999 GAUDI 30

Conclusionsu Almost completed the first year of the journey towards O-O

– Architecture being defined (interfaces, functional components)– Two releases of the framework with basic functionality to test the ideas.

u Currently working on:– Integration of GEANT4– Data visualization, event display– Detector description– Algorithms and tools for data analysis– Java evaluation

u We would like to get advice from experienced people– Organization, physical design, development tools, libraries, foundation

libraries, etc.– Strategic design decisions, existing frameworks and solutions, etc.