SEAL and POOL in LHCb

25
Applications Area Review, October 21 st , 2003 SEAL and POOL in LHCb Strategy Integration of SEAL Integration of POOL and Status M. Frank

description

SEAL and POOL in LHCb. Strategy Integration of SEAL Integration of POOL and Status. M. Frank. Motivation. LHCb has invested significantly in LCG It’s payback time! Retire parts of the Gaudi framework Decrease long term maintenance load Test SEAL and POOL in the LHCb environment - PowerPoint PPT Presentation

Transcript of SEAL and POOL in LHCb

Page 1: SEAL and POOL in LHCb

Applications Area Review, October 21st, 2003

SEAL and POOL in LHCbSEAL and POOL in LHCb

Strategy

Integration of SEAL

Integration of POOL and Status

M. Frank

Page 2: SEAL and POOL in LHCb

M.Frank CERN/LHCb 2Applications Area Review, October 21st, 2003

MotivationMotivation

LHCb has invested significantly in LCGIt’s payback time!Retire parts of the Gaudi framework

Decrease long term maintenance load

Test SEAL and POOL in the LHCb environmentGive feedback to SEAL and POOL

Page 3: SEAL and POOL in LHCb

M.Frank CERN/LHCb 3Applications Area Review, October 21st, 2003

StrategyStrategy

Adiabatic adaptation of Gaudi to SEAL/POOL Slow integration according to available manpowerTime estimate roughly 1 year for full migrationTake advantage for face-lifting of “bad” interfaces and

implementations

Minimal change to interfaces visible to physicistsIntegration of SEAL in steps

Dictionary integration and plugin managerUse of SEAL services later

Page 4: SEAL and POOL in LHCb

M.Frank CERN/LHCb 4Applications Area Review, October 21st, 2003

Other ConstraintsOther Constraints

Integration of POOL earlier than SEALPlan to have a fully working prototype by end of the year

Necessity to read “old” ROOT dataFor roughly 1 yearConsider data reformatting from Gaudi ROOT to POOL

Keep the LHCb event model as isEvent model classes/objects are transientMay, but not must have a 1:1 persistent correspondence

Page 5: SEAL and POOL in LHCb

M.Frank CERN/LHCb 5Applications Area Review, October 21st, 2003

Standard View of LHCb SoftwareStandard View of LHCb Software

Converter

Algorithm

Event DataService

PersistencyService

DataFiles

AlgorithmAlgorithm

Transient Event Store

Detec. DataService

PersistencyService

DataFiles

Transient Detector

Store

MessageService

J obOptionsService

Particle Prop.Service

OtherServices

HistogramService

PersistencyService

DataFiles

TransientHistogram

Store

ApplicationManager

ConverterConverterEventSelector

LCGPool

LCGDDDD

LCGPool

AIDAOther LCGservices

LCGCTS

LCGCTS

HepPDT

LCGCTS

Page 6: SEAL and POOL in LHCb

M.Frank CERN/LHCb 6Applications Area Review, October 21st, 2003

Seal Integration StatusSeal Integration Status

DictionaryPlugin ManagerComponent model

Page 7: SEAL and POOL in LHCb

M.Frank CERN/LHCb 7Applications Area Review, October 21st, 2003

Seal DictionarySeal Dictionary

LHCb has it’s own approachGenerate code from object model described with XML

SEAL dictionary is mandatory for POOL integration prototype

Code generator is missingWork will start [very] soon

Page 8: SEAL and POOL in LHCb

M.Frank CERN/LHCb 8Applications Area Review, October 21st, 2003

Dictionary: Population/ConversionDictionary: Population/Conversion

Event model is described in XMLGenerator delivers

LCG dictionaryC++ Header files…Whatever the future bringsLimited need GCCXML: external libraries like CLHEP

Much simpler/shorter descriptionHomogeneous header files with one styleNot all is good what C++ offers

Page 9: SEAL and POOL in LHCb

M.Frank CERN/LHCb 9Applications Area Review, October 21st, 2003Technology dependent

.h.h

DictionaryGeneration

CIN

T

dic

tio

nar

yC

INT

d

icti

on

ary

I/O I/O

Data I/O

Dictionary: Population/ConversionDictionary: Population/Conversion

LCG dictionary codeLCG dictionary code

.xml.xml

Code GeneratorCode Generator

LC

Gd

icti

on

ary

LC

Gd

icti

on

ary

Gat

eway

Gat

eway

Reflection

……

Page 10: SEAL and POOL in LHCb

M.Frank CERN/LHCb 10Applications Area Review, October 21st, 2003

Seal Component ModelSeal Component Model

We will not jump immediately on what is presentSEAL is evolving and we cannot constantly follow

SEAL is used through POOLWell encapsulatedLimited visibility to end users

No replacement of Gaudi services foreseenbefore component model is not mature

Page 11: SEAL and POOL in LHCb

M.Frank CERN/LHCb 11Applications Area Review, October 21st, 2003

Seal Foundation LibrariesSeal Foundation Libraries

Concerns regarding modularitySEAL foundation libraries depend on many external

librariesExample:

To use the plugin manager the regular expression library (libpcre) must be loaded, which is needed by the SEAL regular expression wrappere.g. also boost has a regular expression wrapper

Page 12: SEAL and POOL in LHCb

M.Frank CERN/LHCb 12Applications Area Review, October 21st, 2003

POOL Integration: GoalsPOOL Integration: Goals

Save and read the LHCb event model No more serializers, let ROOT do the job

Object can keep personality in ROOT

Emphasis on some aspects of the LHCb event modelStress on object relationships

Dictionary generation for the LHCb event modelEvent tag collections: POOL & GaudiIntegration of POOL event tag collections

Page 13: SEAL and POOL in LHCb

M.Frank CERN/LHCb 13Applications Area Review, October 21st, 2003

Event Data AccessEvent Data Access

GaudiBookkeeping

DatasetEvent 1Event 2…

Event 3

DatasetEvent 1Event 2…

Event 3

FileEvent 1Event 2…

Event N

FilesRAW2-1/1/2008RAW3-22/9/2007RAW4-2/2/2008…

DatasetEvent 1Event 2…

Event 3

DatasetEvent 1Event 2…

Event 3

Event tag collctnTag 1 5 0.3Tag 2 2 1.2…

Tag M 8 3.1

Collection SetB -> ππ Candidates (Phy)B -> J/Ψ (μ+ μ-) Candidates…

Page 14: SEAL and POOL in LHCb

M.Frank CERN/LHCb 14Applications Area Review, October 21st, 2003

Events in the Gaudi Data StoreEvents in the Gaudi Data Store

Tree - similar to file system

MCEvent

DataObject Store item=directory +attributes

Browse capability

Identification by logical addresses: ”/Event/MC/MCEcalHits”

Page 15: SEAL and POOL in LHCb

M.Frank CERN/LHCb 15Applications Area Review, October 21st, 2003

Object Collections (Hits, Tracks etc.)Object Collections (Hits, Tracks etc.)

Object container is identifiableHits and Tracks are only

identifiable within containerIdentification by “key” (=short ref)

MyContdClassMyContdClass

Data membersData members

Member functionsMember functions

ObjectContainerObjectContainerm_parent

m_elements

ContainedObjectContainedObject

Page 16: SEAL and POOL in LHCb

M.Frank CERN/LHCb 16Applications Area Review, October 21st, 2003

References between Contained ObjsReferences between Contained Objs

Most objects are aggregated in containersIdentify containers using “logical addressing”Internal links between contained objects

(Short refs)

Tracks VerticesLogical addressing

Short ref• Key, serial number etc.

Page 17: SEAL and POOL in LHCb

M.Frank CERN/LHCb 17Applications Area Review, October 21st, 2003

Toy Event ModelToy Event Model

Identifiable objects (DataObject)Non-identifiable objects

(ContainedObject)hosted by “Keyed Containers”

0..1 Associations0..n Associations

All combinations of these relationshipsmust work

Page 18: SEAL and POOL in LHCb

M.Frank CERN/LHCb 18Applications Area Review, October 21st, 2003

Toy Event ModelToy Event Model

EventEvent

TrackTrack

VertexVertex

m_origin [0..1]

m_mother [0..1] m_decayParticles [0..n]

m_decayVertices [0..n]

TrackContTrackCont

VertexContVertexCont

[1..n]1

[1..n]1

CollisionCollision

CollisionCollision

[1..n]

[1..n]

Event model references

Data store links

Page 19: SEAL and POOL in LHCb

M.Frank CERN/LHCb 19Applications Area Review, October 21st, 2003

Status of Event Data StorageStatus of Event Data Storage

Mechanics for data persistency of event data is partially implementedNew Gaudi Plugin created: package GaudiPoolDbNew Gaudi “conversion service” capable of dealing with

POOL technologies: Root TreeNew EventSelector service to access implicit POOL

collections for reading filesOne converter class for all object types

Page 20: SEAL and POOL in LHCb

M.Frank CERN/LHCb 20Applications Area Review, October 21st, 2003

Status of Event Data StorageStatus of Event Data Storage

Dictionary generation is missingUse generated dictionaries for the time being

MC truth relationships still missingRemove MC truth information completely from dataObjects containing arrays of reference pairs

MC truth DataRelation

Page 21: SEAL and POOL in LHCb

M.Frank CERN/LHCb 21Applications Area Review, October 21st, 2003

Event Tag Collections: LHCb viewEvent Tag Collections: LHCb view

N-tuples, but with references to external objectsData content as for column wise N-tuples

Scalars, arrays, matrices

Writing is equivalent as for N-tuplesSimple, intuitive, fastInterface identical to N-tuplesThe physicists, which used them are enthusiastic

Page 22: SEAL and POOL in LHCb

M.Frank CERN/LHCb 22Applications Area Review, October 21st, 2003

Data Access For Event ProcessingData Access For Event Processing

Request event data Read Event Data

Event data

Analyse Event

Client Server

Access E

vent

Tag

Co

llection

Access E

vent

Data

N-tuple-Entry with N(track)>50

Select from Collectionwhere N(track)>50

Criteria basedpre-selection [1]

N-tuple based pre-selection [2]

Page 23: SEAL and POOL in LHCb

M.Frank CERN/LHCb 23Applications Area Review, October 21st, 2003

Gaudi Event Tag CollectionsGaudi Event Tag Collections

Note the subtle difference:Gaudi event tag collections using POOLPOOL event tag collections in Gaudi

Implemented Gaudi Event Tag CollectionsBackwards compatibility with existing implementationUse POOL as a mechanism to populate Gaudi N-tuple

structures with dataUsage of lower level POOL interfaceCan also be used to store pure N-tuples

Required some interaction with low level interfacesAccess to pool::IPersistencySvc interface

Page 24: SEAL and POOL in LHCb

M.Frank CERN/LHCb 24Applications Area Review, October 21st, 2003

POOL Event Tag CollectionsPOOL Event Tag Collections

[Carmine Cioffi LHCb/Oxford]To be used by the “EventSelector” componentTake advantage of interface redesign

Interface proposal is outWaiting for implementation

Use POOL explicit collections for the implementationNo major technical obstacles foreseen

Page 25: SEAL and POOL in LHCb

M.Frank CERN/LHCb 25Applications Area Review, October 21st, 2003

ConclusionsConclusions

SEAL dictionary will have to be fully integratedSEAL services can only be integrated when

manpower is presentPOOL will soon be integrated in Gaudi

Event data storage ~working[dictionary generator missing][MC truth relationships missing]

Gaudi event tag collections workingPOOL event tag collections coming