Presentation is loading. Please wait.

Presentation is loading. Please wait.

Root I/O and the Gaudi Framework

Similar presentations


Presentation on theme: "Root I/O and the Gaudi Framework"— Presentation transcript:

1 Root I/O and the Gaudi Framework
Persistent Data Store Root I/O and the Gaudi Framework

2 Persistent Data… what? The data exists for later use, after the current run is finished. As input to another run within Gaudi or for external use. Data will be stored in Root files Why? We plan to support Root Analysis. We have the capability to allow IDL to read in Root files. Root2IDL A new version will be available for the Balloon. Gaudi framework provides the necessary converters to read / write Root files.

3 Where we stand The Gaudi framework provides an Event Persistency Service. The service handles the details of calling the appropriate converter. Converters handle the details of writing the event data to a specific type of file or database. Gaudi v5 & v6 provide converters to write to Root files. Each object to be read / written to Root must provide serialize methods. 2 simple routines: StreamBuffer& serialize( StreamBuffer& s ) const { return s << myData1 << myData2; } StreamBuffer& serialize( StreamBuffer& s ) { return s >> myData1 >> myData2; Each object needs a Root converter – which is setup via a Gaudi provided macro. We can read / write from Root files using either Gaudi v5 or v6.

4 Event Persistency Service
How does it work? Event Loop For each event, the Transient Data Store (TDS) contains the event data. Writing to Root At the end of each event (before the TDS is cleared), data is stored in a Root buffer. For every item in the TDS that has been specified in the job options file: The Data object’s “serialize” method is called to stream the object’s data into a buffer. The Root files produced store objects as TBlobs. write data TDS Algorithms retrieve data Event Persistency Service Root Converter serialize(buffer s) s << data1 << data2 << dataN; s Root File

5 Reading from an existing Root file
Event Loop Occurs at the beginning of an event to fill the TDS or during an algorithm’s execution. For each TBlob retrieved from the Root file, the serialize method for each object is called to populate the object with the appropriate values. The newly created object is then inserted into the TDS. Event Persistency Service Root File TDS Algorithms Root Converter serialize(buffer s) s >> data1 >> data2 >> dataN;

6 Issues to be Addressed In order to generalize the writing and reading of data into / out of Root files, a generic data object named TBlob is utilized. The TBlob is just a buffer, where the bits of the various data objects is streamed in / out. The actual structure of the data objects as they exist in Gaudi is lost. Fast I/O But…how do we analyze this data? Two Possible Solutions – Short Term & Long Term Convert TBlobs into our data objects. Modify the mechanism for Root I/O in Gaudi to write out the data as full objects. This work will most likely be taken care of in a future version of Gaudi if we can afford to wait. << myData1 << myData2 myData1Bits myData2Bits >> myData1 >> myData2 TBlob Buffer

7 Issues to be Addressed Continued…
Gaudi v5 and Gaudi v6 store data in Root files slightly differently…but use the same basic concept. So Root files generated using v5 cannot be read back in when using v6. Changes will continue, but ultimately, it will converge. In the meantime, lack of backward compatibility can be fixed if deemed necessary… This will become more important as we prepare to create large data sets. The Gaudi team is aware of the situation.

8 Summary & Shameless Plug
Root I/O works in the Gaudi framework. To setup an object to be available for Root I/O requires 3 things: Setup the serialize methods. Use the appropriate converter macro: _ImplementConverter(myTypeofObject) _ImplementContainerConverters(myTypeofObject) Set the appropriate input parameters in the job options file. More details of how to setup Gaudi to write / read Root files will be explained at the software tutorial session tomorrow!


Download ppt "Root I/O and the Gaudi Framework"

Similar presentations


Ads by Google