9 //______________________________________________________________________
15 /**************************************************************************/
17 const TString Event::sVSDHeaderName("VSDheader");
21 SetName(sVSDHeaderName);
31 Event::Event(Int_t run, Int_t evt, const TString& url) :
32 fRun(run), fEvent(evt), fUrl(url)
35 Event::Event(const TString& url) :
39 /**************************************************************************/
41 Event* Event::OpenDirectory(const TString& dir_name)
43 static const Exc_t eH("Event::OpenDirectory ");
45 TDirectory* dir = dynamic_cast<TDirectory*>(gDirectory->Get(dir_name));
47 throw(eH + "direcotry '" + dir_name + "' not found.");
48 return OpenDirectory(dir);
51 Event* Event::OpenDirectory(TDirectory* dir)
53 static const Exc_t eH("Event::OpenDirectory ");
55 Event* evt = dynamic_cast<Event*>(dir->Get(sVSDHeaderName));
57 throw(eH + "VSD header '" + sVSDHeaderName + "' not found.");
58 evt->fDirectory = dir;
62 /**************************************************************************/
63 /**************************************************************************/
65 void Event::SetDirectory(TDirectory* dir)
68 fDirectory->RecursiveRemove(this);
71 fDirectory->Append(this);
74 TDirectory* Event::MakeDirectory(const Text_t* name, const Text_t* title)
76 TDirectory* dir = new TDirectory(name, title);
81 /**************************************************************************/
83 void Event::Print(Option_t* ) const
85 printf("%s: '%s', '%s'\n", IsA()->GetName(), GetName(), GetTitle());
86 printf(" run=%d, event=%d, url='%s'\n", fRun, fEvent, fUrl.Data());
88 printf(" directory: '%s', '%s'\n", fDirectory->GetName(), fDirectory->GetTitle());
91 /**************************************************************************/
92 /**************************************************************************/
93 /**************************************************************************/
94 /**************************************************************************/
98 void EvTree::Browse(TBrowser* b)
100 // fFolder.Browse(b); // This adds all elements to top-level.