9#include <framework/pybasf2/PyDBArray.h>
10#include <framework/datastore/DataStore.h>
12#include <TClonesArray.h>
20 TClass* getDefaultClass(
const std::string& name)
24 TClass* cl = TClass::GetClass((
"Belle2::" + name.substr(0, name.size() - 1)).c_str());
27 cl = TClass::GetClass(name.c_str());
29 if (!cl)
return TObject::Class();
36 return getObject<TClonesArray>()->At(i);
41 return isValid() ? (getObject<TClonesArray>()->GetEntriesFast()) : 0;
53 PyObject* list = PyList_New(0);
57 PyList_Append(list, PyLong_FromUnsignedLong(boundary));
Base class for DBObjPtr and DBArray for easier common treatment.
const std::vector< unsigned int > getIntraRunBoundaries() const
Get the intra-run boundaries, if any.
In the store you can park objects that have to be accessed by various modules.
Class to access a DB Array from Python.
PyObject * getIntraRunBoundariesList() const
Get the intra-run boundaries, if any, as a python list.
PyDBArray(const std::string &name, bool required=true)
Construct the array from the name of the payload.
bool isValid() const
Check whether a valid object was obtained from the database.
const TObject * _get(int i) const
Element access.
int getEntries() const
Get the number of entries.
Abstract base class for different kinds of events.