1 GAUDI - The Software Architecture and Framework for building LHCb data processing applications...

19
1 GAUDI - The Software GAUDI - The Software Architecture and Framework Architecture and Framework for building LHCb data for building LHCb data processing applications processing applications Marco Cattaneo, CERN Marco Cattaneo, CERN February 2000 February 2000

Transcript of 1 GAUDI - The Software Architecture and Framework for building LHCb data processing applications...

Page 1: 1 GAUDI - The Software Architecture and Framework for building LHCb data processing applications Marco Cattaneo, CERN February 2000.

1

GAUDI - The Software GAUDI - The Software Architecture and Architecture and

Framework for building Framework for building LHCb data processing LHCb data processing

applications applications

Marco Cattaneo, CERNMarco Cattaneo, CERN

February 2000February 2000

Page 2: 1 GAUDI - The Software Architecture and Framework for building LHCb data processing applications Marco Cattaneo, CERN February 2000.

Marco Cattaneo, 7th February 2000

LHCb - GAUDI 2

OutlineOutline

IntroductionIntroduction

Design choicesDesign choices

GAUDI Architecture overviewGAUDI Architecture overview

StatusStatus

ConclusionsConclusions

Page 3: 1 GAUDI - The Software Architecture and Framework for building LHCb data processing applications Marco Cattaneo, CERN February 2000.

Marco Cattaneo, 7th February 2000

LHCb - GAUDI 3

Software StructureSoftware Structure

FrameworksToolkits

Reco

nst

ruct

ion

Sim

ula

tion

Analy

sis

Foundation Libraries

Tri

ggers

One main framework: GAUDI.

Various specialised frameworks: visualisation, persistency, interactivity, simulation (Geant4), etc.

Basic libraries: STL, CLHEP, etc. (Vocabulary)

Applications implementing the physics algorithms.

Page 4: 1 GAUDI - The Software Architecture and Framework for building LHCb data processing applications Marco Cattaneo, CERN February 2000.

Marco Cattaneo, 7th February 2000

LHCb - GAUDI 4

GAUDI project goalsGAUDI project goals

Develop an Develop an ArchitectureArchitecture and a and a FrameworkFramework to be to be used at all stages of LHCb data analysisused at all stages of LHCb data analysis

Trigger levels 2 and 3, simulation, reconstruction, analysis

Avoid fragmentation and duplication of Avoid fragmentation and duplication of computing effort computing effort

Single development team across online and offline domains Identify common components, re-use

Give users (physicists) a framework within which to develop applications

Rapid transition away from FORTRAN to minimise legacy code A single framework used by all members of the collaboration

Transparent use of third-party components Transparent use of third-party components wherever possible or necessarywherever possible or necessary

GUI, persistency, simulation....

Page 5: 1 GAUDI - The Software Architecture and Framework for building LHCb data processing applications Marco Cattaneo, CERN February 2000.

Marco Cattaneo, 7th February 2000

LHCb - GAUDI 5

Software development Software development strategystrategy

Start with small design team of 6-8 peopleStart with small design team of 6-8 people architect, librarian, domain specialists with design/programming

experience

Collect User Requirements and use-casesCollect User Requirements and use-cases Establish basic criteria for the overall designEstablish basic criteria for the overall design Make technology choices for implementation of initial Make technology choices for implementation of initial

prototypesprototypes Incremental approach to development.Incremental approach to development.

Release every ~4 months. Releases accompanied by complete documentation Development cycle driven by the users: priorities, feedback, etc.

Strategic decisions after thorough design review Strategic decisions after thorough design review (~1/year)(~1/year)

Page 6: 1 GAUDI - The Software Architecture and Framework for building LHCb data processing applications Marco Cattaneo, CERN February 2000.

Marco Cattaneo, 7th February 2000

LHCb - GAUDI 6

Principal design choicesPrincipal design choices

Separation between “Separation between “datadata” and “” and “algorithmsalgorithms”” Data objects primarily carry data, have only basic methods

e.g. Tracking hits Algorithm objects primarily manipulate data

e.g. Track fitter

Three basic categories of data:Three basic categories of data: “event data” (obtained from particle collisions, real or simulated) “detector data” (structure, geometry, calibration, alignment, ....) “statistical data” (histograms, ....)

Separation between “Separation between “transienttransient” and “” and “persistentpersistent” ” data.data.

Isolate user code from persistency technology . Different optimisation criteria. Transient as a bridge between independent representations.

Page 7: 1 GAUDI - The Software Architecture and Framework for building LHCb data processing applications Marco Cattaneo, CERN February 2000.

Marco Cattaneo, 7th February 2000

LHCb - GAUDI

GAUDI object diagramGAUDI object diagram

Converter

Algorithm

Event DataService

PersistencyService

DataFiles

AlgorithmAlgorithm

Transient Event Store

Detec. DataService

PersistencyService

DataFiles

Transient Detector

Store

MessageService

JobOptionsService

Particle Prop.Service

OtherServices

HistogramService

PersistencyService

DataFiles

TransientHistogram

Store

ApplicationManager

ConverterConverter

Page 8: 1 GAUDI - The Software Architecture and Framework for building LHCb data processing applications Marco Cattaneo, CERN February 2000.

Marco Cattaneo, 7th February 2000

LHCb - GAUDI 8

Principal design choices Principal design choices (2)(2)

Data store -centred (“Data store -centred (“blackboard”blackboard”) architectural ) architectural style.style.

Algorithms as producers and consumers of data objects Minimal coupling between algorithms, allows independent

development.

““User code”User code” encapsulated in a few specific places: encapsulated in a few specific places: “Algorithms”: physics code “Converters”: convert data objects between representations

Well defined component “Well defined component “interfacesinterfaces”, as “”, as “genericgeneric” as ” as possible.possible.

Stable, shield clients from the (changing) implementation In C++, pure abstract class

Page 9: 1 GAUDI - The Software Architecture and Framework for building LHCb data processing applications Marco Cattaneo, CERN February 2000.

Marco Cattaneo, 7th February 2000

LHCb - GAUDI 9

InterfacesInterfaces

ConcreteAlgorithm

EventDataServiceIDataProviderSvc

IDataProviderSvc

IHistogramSvc

IMessageSvc

IAlgorithm IProperty

ObjectA ObjectB

• Each component implements one or more interfaces

• Each component uses one or more interfaces of other components

• An Algorithm uses many Services

DetectorDataService

HistogramService

MessageService

ParticlePropertySvc IParticlePropertySvc

ApplicationManager

ISvcLocator

Page 10: 1 GAUDI - The Software Architecture and Framework for building LHCb data processing applications Marco Cattaneo, CERN February 2000.

Marco Cattaneo, 7th February 2000

LHCb - GAUDI 10

Transient data store

AlgorithmsAlgorithms

AlgorithmA

AlgorithmB

AlgorithmC

Data T1

Data T2, T3

Data T2

Data T3, T4

Data T4

Data T5

Logical view

• An Algorithm knows only which data (type and name) it uses as input and produces as output.

• The only coupling between algorithms is via the data. • The execution order of the sub-algorithms is the responsibility of the parent algorithm.

A

C

B

Parent

Data T1

Data T2

Data T4

Data T3

Data T5

Physical view

Page 11: 1 GAUDI - The Software Architecture and Framework for building LHCb data processing applications Marco Cattaneo, CERN February 2000.

Marco Cattaneo, 7th February 2000

LHCb - GAUDI 11

ServicesServices

Various Various servicesservices are provided are provided to to algorithmsalgorithms

Examples:Examples: Job Options service (configuration

“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 12: 1 GAUDI - The Software Architecture and Framework for building LHCb data processing applications Marco Cattaneo, CERN February 2000.

Marco Cattaneo, 7th February 2000

LHCb - GAUDI 12

Event Data StoreEvent Data Store(See Markus Frank’s talk, C153)(See Markus Frank’s talk, C153)

Event DataService

PersistencyService

Algorithm

retrieveObject( “EcalDigits(3)”,...)

registerObject( “key”,...)

Direct reference

Fetch()Store()

creates

• Stores objects that can be used by other objects (services, algorithms).

• Retrieve objects if necessary• Tree structure (file system)• Identification by logical address

(“/Event/RawEvent/Ecal”)• Owns the objects and is responsible for

their clean-up.

Transient Event Store

Page 13: 1 GAUDI - The Software Architecture and Framework for building LHCb data processing applications Marco Cattaneo, CERN February 2000.

Marco Cattaneo, 7th February 2000

LHCb - GAUDI 13

PersistencyPersistency(See Markus Frank’s talk, C153)(See Markus Frank’s talk, C153)

Event DataService

PersistencyService

Zebra dataFiles

AlgorithmAlgorithm

ZebraCnvSvc

RootCnvSvc

Root dataFiles

ConverterConverterConverter

ConverterConverterConverter

Zebra

FZ

Root

I/OTransient

Event Store

• Various technologies available in the same program: Objy, Root, Zebra,…

• Converters transform objects from one representation to another.

Page 14: 1 GAUDI - The Software Architecture and Framework for building LHCb data processing applications Marco Cattaneo, CERN February 2000.

Marco Cattaneo, 7th February 2000

LHCb - GAUDI 14

Data Processing ApplicationEditors

Conversionservices

Algorithms

Detector DescriptionDetector Description(See Radovan Chytracek’s talk, A155)(See Radovan Chytracek’s talk, A155)

Persistent Detector Description (DDDB)

DetElemDetElemDetElem

DetElemDetElemDetElem

DetElemDetElemDetElem

GeomGeom

GeomCalib

GeomSlow

Editors

Transient detector store

DetElem

DetElem DetElem

Geom

Calib

Slow

Algorithms

Conversionservices

Projection view: version & event time

Other representations

Update persistency

DetectorData

Producers

Page 15: 1 GAUDI - The Software Architecture and Framework for building LHCb data processing applications Marco Cattaneo, CERN February 2000.

Marco Cattaneo, 7th February 2000

LHCb - GAUDI 15

VisualisationVisualisation

Transient Data Store

ConversionService

RepresentationsStore

(graphical, textual)

ConverterConverterConverterConverter

Data ItemSelector

UserInterface

Selects objects in store

Page 16: 1 GAUDI - The Software Architecture and Framework for building LHCb data processing applications Marco Cattaneo, CERN February 2000.

Marco Cattaneo, 7th February 2000

LHCb - GAUDI 16

Package group

Package dependencyoptional

• Sub-division into packages is an architectural problem.

• Important consequences for:

• compilation time• link dependencies• configuration

management• executable size• ...

• Dependencies between packages must be approved by the architect

• Avoid circular dependencies

PackagesPackages

Gaudi(foundations)

LHCbEvent(event model)

HbookCnv(converters)

SicbCnv(converters)

RootCnv(converters)

Applications

LHCbAlg(algorithms)

DetDesc(detect. model)

DetCnv(converters)

Futio(ZEBRA)

RIO

CernLib

CLHEP STL

GAUDI Framework

Page 17: 1 GAUDI - The Software Architecture and Framework for building LHCb data processing applications Marco Cattaneo, CERN February 2000.

Marco Cattaneo, 7th February 2000

LHCb - GAUDI 17

ImplementationImplementation(see Florence Ranjard's talk, F151)

Platforms:Platforms: WNT, Linux, IBM AIX, HP-UX

Tools and Libraries:Tools and Libraries:

Design tools Visual Thought, Rational RoseCoding rules Interim LHCb coding conventionsCode Management CVSConfiguration Management CMTProblem tracking Plan to use RemedyCompilers/Debuggers Visual C++, GNU EGCS, dddLibraries STL, CLHEP, NAG C, HTL, RIODocumentation FrameMaker, Visual Source SafeSource code documentation Object Outline

Page 18: 1 GAUDI - The Software Architecture and Framework for building LHCb data processing applications Marco Cattaneo, CERN February 2000.

18

Work in progress:Work in progress:

Integration of GEANT4Integration of GEANT4 Visualisation, event displayVisualisation, event display Algorithms and tools for data analysisAlgorithms and tools for data analysis Java evaluationJava evaluation Collaboration with AIDA Collaboration with AIDA (see Andreas Pfeiffer’s presentation, F82)(see Andreas Pfeiffer’s presentation, F82)

Definition of interfaces

Ongoing discussions with other experimentsOngoing discussions with other experiments Deployment for physics applications:Deployment for physics applications:

migration of reconstruction test beam analysis tracking, RICH pattern recognition ECAL geometry etc.

Page 19: 1 GAUDI - The Software Architecture and Framework for building LHCb data processing applications Marco Cattaneo, CERN February 2000.

Marco Cattaneo, 7th February 2000

LHCb - GAUDI 19

ConclusionsConclusions

We believe it is fundamental to define an We believe it is fundamental to define an architecturearchitecture

And to provide a framework which implements the architecture Ensures adaptability, maintainability and resilience against

change. GAUDI is the LHCb architecture and framework

Physicists have started to enjoy the pain!Physicists have started to enjoy the pain! Many new development activities entirely within Gaudi Ongoing migration of existing code to Gaudi framework

We welcome advice, criticism, collaborationWe welcome advice, criticism, collaboration

http://lhcb.cern.ch/computing/Components/html/GaudiMain.htmlhttp://lhcb.cern.ch/computing/Components/html/GaudiMain.html