next up previous contents
Next: Modules, Supermodules and Context Up: Using Phat 5.0 Previous: Object ownership   Contents

TPhEvent and TPhObjectManager

The TPhEvent and TPhObjectManager objects provide temporary storage in memory and persistent storage in root files. For most applications only one of each will exist in memory at any given time. As the name suggests, TPhEvent deals with TPhDataObjects (e.g. a TPhVertex object) or TPhObjectContainers (e.g. a TPhContainer containing TPhHits) representing data for one event.
The TPhObjectManager on the other hand stores data pertaining to a collection of many events (e.g. a run or a collection of runs). Typical data stored in the TPhObjectManager object are calibration constants or transformation tables, cumulative histograms or counters.
Both TPhEvent and TPhObjectManager store named objects, i.e. access to the data objects is provided by a Get("NameOfObject") member function. Both classes provide persistent I/O, i.e. all objects in the event (unless the user chooses otherwise) can be written to mass storage by one call to the Write() member function and likewise, all the objects in the event can be streamed back into memory by a reading the event object from mass storage. There is effectively no limit to the number of data objects stored in the event or object manager, provided they are identified by unique names. An event can for instance contain several TPhVertex objects found by different vertexing algorithms.

Deleting an event or the object manager will also delete all the objects currently owned by them. 1 The default is that any object added to TPhEvent is owned by it.


next up previous contents
Next: Modules, Supermodules and Context Up: Using Phat 5.0 Previous: Object ownership   Contents
Gunther Roland
2000-05-05