Motivation: Maintaining relationships between elements of two - PowerPoint PPT Presentation

About This Presentation
Title:

Motivation: Maintaining relationships between elements of two

Description:

CLEO Event Bookkeeping. 10/19/00. Jon J Thaler. Motivation: ... Manage this bookkeeping with a single shareable package. Write and debug once. ... – PowerPoint PPT presentation

Number of Views:20
Avg rating:3.0/5.0
Slides: 10
Provided by: jonjt
Category:

less

Transcript and Presenter's Notes

Title: Motivation: Maintaining relationships between elements of two


1
Lattice
MotivationMaintaining relationships between
elements of two sets of objects is a common
analysis task. Examples Tracks ? hits. Event
hypotheses Vertices ? tracks. ? kinematic
entities. Data analysis is the identification of
increasingly complex relationships within the
data.
2
The problem Everyone rolls his own
code. Redundant. Buggy. Possible
simplification Manage this bookkeeping with a
single shareable package. Write and debug
once. Users can concentrate on
analysis. CLEOs solution Make object
relationships an object (Lattice). Properties
Addition and removal of connections between
objects. Association of data with each
connection (link data). Complete set of data
access methods.
3
Specifications Flexible º Any two sets of
data can be connected. º Link data is user
definable. º Lattices dont interact. Objects
can belong to multiple Lattices. Minimal
impact on existing code. º No performance
penalty. º Little rewriting of working
code Data must have an Identifier type. (CLEO
data already had this.) Gives type safety
(LeftID ? RightID, usually).
4
The goal Establish and maintain connections
between lists of data. Links hold information
that describes the connection. Retrieve data
in easy to use format. Specify connectivity
constraints.
5
Examples
6
Issues Simple interface.Users only want to
see one kind of container (STL vectors).
Unobtrusive.Impose no functional requirements
on data classes, so new Lattices can be added
without requiring code modification or affecting
program behavior. Persistence over write/read
cycle.Lattice uses identifiers, not pointers to
data. Performance.Optimized for data access,
at the expense of slower data insertion. This is
hidden from the user could be modified.
Adaptability.Generic implementation. A CLEO
specific interface (i.e., to our data structures)
is achieved by inheritance.
7
Construction and remodeling Construct (Its a
class template, so some instantiation is
required.) pLattice new LatticeltLeftData,Right
Data,LinkDatagt(Connectivity) You specify data
types, link data, and the allowed
connectivity. Remodel (null pointer returned on
failure) Make a new link (your LinkData will be
copied to it) Link pLink pLattice-gtconnect(Lef
tID, RightID, LinkData) Connect data through an
existing link Link pLink pLattice-gtconnect(Le
ftID, Link, RightID) Add datum to an existing
link Link pLink connect(Link, RightID)
8
Data access functions const vectorltLeftIDgt
vLeft pLattice-gtvLeftGivenLeft
(LeftID) const vectorltRightIDgt vRight
pLattice-gtvRightGivenLeft(LeftID) const
vectorltLinkgt pLinks linksGivenLeft(LeftID)
const vectorltLeftIDgt vLeftID
pLink-gtvLeftID() void connectLinks (LeftID,
RightID, vectorltLinkgt) void
shareLinksLeft(LeftID, LeftID, vectorltLinkgt)
Verbose nomenclature - I dont know that LeftID
and RightID are different types.
LinkData ld pLink-gtlinkData() Gives you write
access to a links data.
9
Status An integral part of the CLEO software
environment for nearly two years (stable code,
except when I fix something). Being adapted
(or considered) by two other experiments. Not
plug and play, but close.
Write a Comment
User Comments (0)
About PowerShow.com