9#include "VirtualEvent.h"
11#include "DataManager.h"
15 VirtualEvent::VirtualEvent() : Event(
"VirtualTrack"), fVirtualEvent(NULL) {}
19 ShallowCopyEvent(fVirtualEvent);
20 fTotalTracksNo = fVirtualEvent->GetTotalTrackNo();
22 for (
int i = 0; i < fTotalTracksNo; i++) {
30 void VirtualEvent::RegisterInTree(TString prefix, Bool_t save) {
31 if (fVirtualEvent == NULL) { fVirtualEvent =
new VirtualEvent(); }
32 DataManager* manager = DataManager::Instance();
33 TString branchname =
"VirtualEvent..";
34 if (prefix.Length() != 0) { branchname = prefix + branchname; }
35 manager->Register(branchname,
"VirtualEvent.", fVirtualEvent, save);
38 Bool_t VirtualEvent::ExistInTree()
const {
40 if (manager->
CheckBranch(
"VirtualEvent.")) {
return kTRUE; }
45 fTracks =
new TClonesArray(
"Hal::VirtualTrack", 1000);
46 fVirtualEvent = (
VirtualEvent*) other.fVirtualEvent->Clone();
49 VirtualEvent::~VirtualEvent() {
50 if (fVirtualEvent)
delete fVirtualEvent;
Bool_t CheckBranch(const char *BrName)
virtual void CopyData(Track *other)