4#include "EventInterfaceTemplate.h"
6#include <Hal/DataManager.h>
10 EventInterfaceTemplate::EventInterfaceTemplate() : fEvent(nullptr), fCanDelete(kFALSE) {}
12 void EventInterfaceTemplate::ConnectToTreeInternal(eMode mode) {
16 case Hal::EventInterface::eMode::kRead: {
17 fEvent = (TObject*) manager->GetObject(
"ObjectName");
19 case Hal::EventInterface::eMode::kWrite: {
20 fEvent =
new TObject();
21 manager->
Register(
"ObjectName.",
"obj", (TNamed*) fEvent, kTRUE);
23 case Hal::EventInterface::eMode::kWriteVirtual: {
24 fEvent =
new TObject();
25 manager->
Register(
"ObjectName.",
"obj", (TNamed*) fEvent, kTRUE);
31 EventInterfaceTemplate::~EventInterfaceTemplate() {
32 if (fEvent && fCanDelete)
delete fEvent;
void Register(const char *name, const char *folderName, TNamed *obj, Bool_t toFile)