Presentation is loading. Please wait.

Presentation is loading. Please wait.

CHEP ‘06 David Lawrence JLab C++ Introspection and Object Persistency through JIL David Lawrence Ph. D. Jefferson Lab, Newport News VA.

Similar presentations


Presentation on theme: "CHEP ‘06 David Lawrence JLab C++ Introspection and Object Persistency through JIL David Lawrence Ph. D. Jefferson Lab, Newport News VA."— Presentation transcript:

1 CHEP ‘06 David Lawrence JLab C++ Introspection and Object Persistency through JIL David Lawrence Ph. D. Jefferson Lab, Newport News VA

2 CHEP ‘06 David Lawrence JLab Introspection and Object Persistency Introspection: Ability for a program to query the structure of its classes from within the program. Object Persistency: Writing the data portion of an object to a file so that it can be re-created later by another program.

3 CHEP ‘06 David Lawrence JLab Motivation for JIL CPU intensive analyses need staging (e.g. track fitting first, then physics analysis later) The GlueX experiment will require this Make general use tool that allows 3rd party objects to be made persistent without modification of 3rd party source Allow object persistence to be added to legacy file formats (CODA) Incorporate object meta-data in persistency framework (DANA factory tags)

4 CHEP ‘06 David Lawrence JLab Serializers Files are 1-dimensional things. In order to write a multi-dimensional “object” into a file, it must be serialized. A corresponding deserializer must also be written to reconstitute the object later.

5 CHEP ‘06 David Lawrence JLab Multiple approaches to creating serializers in the absence of introspection C++ parser/interpreter (ROOT) Write class definitions in XML format and generate C++ headers Hand coded serializers

6 CHEP ‘06 David Lawrence JLab A Simple Example

7 CHEP ‘06 David Lawrence JLab Use Gnu Debugger (gdb) to mine class/struct structure

8 CHEP ‘06 David Lawrence JLab XML representation of “myClass”

9 CHEP ‘06 David Lawrence JLab (De)Serializer Routines: Auto-generated code Convert complex structure into “simple” type problem

10 CHEP ‘06 David Lawrence JLab

11 Writing objects to a file

12 CHEP ‘06 David Lawrence JLab Reading objects from a file

13 CHEP ‘06 David Lawrence JLab Serialization time vs. # events

14 CHEP ‘06 David Lawrence JLab Deserialization time vs. # events

15 CHEP ‘06 David Lawrence JLab Summary JIL provides a mechanism to add object persistency through files to C++ projects JIL can use either C++ code or XML as the source from which to generate serializer methods JIL can be used to make 3rd party objects persistent without modifying the 3rd party source code

16 CHEP ‘06 David Lawrence JLab Summary JIL (optionally) uses zlib compression which reduces file size by a factor of 3 JIL is multi-thread enabled (not just thread- safe) JIL allows users to implement customized file format Alpha development stage. For more info, contact: davidl@jlab.org

17 CHEP ‘06 David Lawrence JLab Extra Slides

18 CHEP ‘06 David Lawrence JLab Surely the object persistency problem has been solved for C++ many times before. Yes. Projects like ROOT, s11n, Poet, ROM, and MSVSC++ add object persistence. However, only ROOT is really designed for high volume, efficient, compact usage like in HEP and MENP.


Download ppt "CHEP ‘06 David Lawrence JLab C++ Introspection and Object Persistency through JIL David Lawrence Ph. D. Jefferson Lab, Newport News VA."

Similar presentations


Ads by Google