xAOD::TPyEvent Class Reference

#include <TPyEvent.h>

Inheritance diagram for xAOD::TPyEvent:
xAOD::TEvent xAOD::TVirtualEvent

List of all members.

Public Member Functions

 TPyEvent ()
 Default constructor.
::Bool_t contains (const std::string &key, const std::string &type)
 Function checking if an object is available from the store.
::Bool_t transientContains (const std::string &key, const std::string &type) const
 Function checking if an object is already in memory.
TReturnCode record (void *obj, const std::string &key, const std::string &type,::Int_t basketSize=32000,::Int_t splitLevel=0)
 Add an output object to the event.

Detailed Description

Python interface to xAOD::TEvent

In order to make it possible to record objects that are created in Python, into an xAOD::TEvent object (in order to record selected objects into an output file for instance), this class extends the xAOD::TEvent object with some non-template functions. Functions that are inconvenient to use from C++, but which allow for much more flexibility in PyROOT.

Author:
Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch>
Revision
649835
Date
2015-02-26 09:19:01 +0100 (Thu, 26 Feb 2015)

Member Function Documentation

TReturnCode xAOD::TPyEvent::record ( void *  obj,
const std::string &  key,
const std::string &  type,
::Int_t  basketSize = 32000,
::Int_t  splitLevel = 0 
)

Add an output object to the event.

This function is designed to be callable from PyROOT in order to record hand-made containers into an output file.

Notice that unline TEvent::record(...), this function doesn't take ownership of the object that's given to it. That's because all objects created by the Python interpreter are garbage collected by the Python interpreter. And we don't want to run into double-deletes.

Parameters:
obj Typeless pointer to the object that is to be recorded
key The key with which the object is to be recorded
type The type name of the object being recorded
basketSize The size of the baskets used to write the payload
splitLevel The split level of the branch created
Returns:
The usual xAOD::TReturnCode types

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 1 Dec 2017 for RootCore Packages by  doxygen 1.6.1