1 persistency in g4mice 27 th july 2005 m. ellis

7
1 Persistency in G4MICE 27 th July 2005 M. Ellis

Upload: bernard-daniels

Post on 17-Jan-2016

216 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 1 Persistency in G4MICE 27 th July 2005 M. Ellis

1

Persistency in G4MICE

27th July 2005

M. Ellis

Page 2: 1 Persistency in G4MICE 27 th July 2005 M. Ellis

2

What do I mean?

• We do all the work in G4MICE through C++ classes that exist in the computer’s memory only while the program is running.

• These are “transient” objects as they come into existence for a brief period of time and then disappear for ever.

• “Persistent” objects exist over a much longer time scale (for ever, in terms of the time-scale of the experiment).

• Persistency schemes allow us to make a transient object persistent by storing it in some manner (e.g. text file, database, CD ROM, etc...)

Page 3: 1 Persistency in G4MICE 27 th July 2005 M. Ellis

3

Advantages

• No longer think in terms of “Rec.out”, “Sim.out”, etc...

• Instead, think in terms of the actual classes (SciFiHit, SciFiTrack, etc...)

• So, an executable can restore some classes from persistent storage into memory.

• It then performs some operations, which may result in the creation of new objects.

• Some, or all of these objects can then be made persistent for later use.

Page 4: 1 Persistency in G4MICE 27 th July 2005 M. Ellis

4

HARP Model

• I would like us to try a model that was developed for use in HARP, that allows a quick way of making C++ classes persistent and which does not impose strong limitations on the design of the class.

• For a first version, we will stick to a plain ASCII text format.

• Classes that can be found in the “MiceEvent” will be made persistent.

• Reminder: please check the classes that you use that you would like to be made persistent, so that we can ensure they are in the MiceEvent!

Page 5: 1 Persistency in G4MICE 27 th July 2005 M. Ellis

5

Scheme

• For every transient class, and for each method of storing the class, a converter class is written.

• The converter class knows about the transient class and the storage means (e.g. text file).

• The transient class remains ignorant of how it is being made persistent, and so can be made persistent by many different methods without needing to change the code or add dependencies to the storage (e.g. database).

Page 6: 1 Persistency in G4MICE 27 th July 2005 M. Ellis

6

Dependency Diagram

Transient Class

Storage Method

Converter Class

Page 7: 1 Persistency in G4MICE 27 th July 2005 M. Ellis

7

Proposed Schedule

• Yagmur and I will ensure that the applications area is ready for use.

• I will then start by coding the framework code needed to supply a store and restore functionality and implement one or two classes to check that it works.

• Lara and I will then continue until a decent number of classes are persistent and we do some tests for any obvious problems.

• We can then pass on the coding task to everyone who is willing to help out!