From f4b7e3162790c887a25b319a00be1516427b3a37 Mon Sep 17 00:00:00 2001 From: mtadel Date: Mon, 10 Jul 2006 17:35:57 +0000 Subject: [PATCH] Removed files: the contents moved to VSDEvent and renamed accordingly. --- EVE/Reve/Event.cxx | 103 --------------------------------------------- EVE/Reve/Event.h | 73 -------------------------------- 2 files changed, 176 deletions(-) delete mode 100644 EVE/Reve/Event.cxx delete mode 100644 EVE/Reve/Event.h diff --git a/EVE/Reve/Event.cxx b/EVE/Reve/Event.cxx deleted file mode 100644 index 84ce2031d7d..00000000000 --- a/EVE/Reve/Event.cxx +++ /dev/null @@ -1,103 +0,0 @@ -// $Header$ - -#include "Event.h" - -#include - -using namespace Reve; - -//______________________________________________________________________ -// Event -// - -ClassImp(Event) - -/**************************************************************************/ - -const TString Event::sVSDHeaderName("VSDheader"); - -void Event::Init() -{ - SetName(sVSDHeaderName); - fDirectory = 0; - fCreator = 0; - fSelector = 0; -} - -Event::Event() : - fRun(0), fEvent(0) -{ Init(); } - -Event::Event(Int_t run, Int_t evt, const TString& url) : - fRun(run), fEvent(evt), fUrl(url) -{ Init(); } - -Event::Event(const TString& url) : - fEvent(0), fUrl(url) -{ Init(); } - -/**************************************************************************/ - -Event* Event::OpenDirectory(const TString& dir_name) -{ - static const Exc_t eH("Event::OpenDirectory "); - - TDirectory* dir = dynamic_cast(gDirectory->Get(dir_name)); - if (!dir) - throw(eH + "direcotry '" + dir_name + "' not found."); - return OpenDirectory(dir); -} - -Event* Event::OpenDirectory(TDirectory* dir) -{ - static const Exc_t eH("Event::OpenDirectory "); - - Event* evt = dynamic_cast(dir->Get(sVSDHeaderName)); - if (!evt) - throw(eH + "VSD header '" + sVSDHeaderName + "' not found."); - evt->fDirectory = dir; - return evt; -} - -/**************************************************************************/ -/**************************************************************************/ - -void Event::SetDirectory(TDirectory* dir) -{ - if(fDirectory) - fDirectory->RecursiveRemove(this); - fDirectory = dir; - if(fDirectory) - fDirectory->Append(this); -} - -TDirectory* Event::MakeDirectory(const Text_t* name, const Text_t* title) -{ - TDirectory* dir = new TDirectory(name, title); - SetDirectory(dir); - return fDirectory; -} - -/**************************************************************************/ - -void Event::Print(Option_t* ) const -{ - printf("%s: '%s', '%s'\n", IsA()->GetName(), GetName(), GetTitle()); - printf(" run=%d, event=%d, url='%s'\n", fRun, fEvent, fUrl.Data()); - if(fDirectory) - printf(" directory: '%s', '%s'\n", fDirectory->GetName(), fDirectory->GetTitle()); -} - -/**************************************************************************/ -/**************************************************************************/ -/**************************************************************************/ -/**************************************************************************/ - -#include - -void EvTree::Browse(TBrowser* b) -{ - // fFolder.Browse(b); // This adds all elements to top-level. - b->Add(&fFolder); - TTree::Browse(b); -} diff --git a/EVE/Reve/Event.h b/EVE/Reve/Event.h deleted file mode 100644 index ac8d4611551..00000000000 --- a/EVE/Reve/Event.h +++ /dev/null @@ -1,73 +0,0 @@ -// $Header$ - -#ifndef REVE_Event_H -#define REVE_Event_H - -#include -#include -#include - -#include -#include -class TBrowser; - -namespace Reve { - -class VSD; - -class EvTree : public TTree -{ -public: - TFolder fFolder; - - EvTree() : TTree() {} - EvTree(const char* name, const char* title, Int_t splitlevel = 99) : - TTree(name, title, splitlevel), fFolder("Folder", "Additional event data") {} - virtual ~EvTree() {} - - virtual void Browse(TBrowser* b); - - ClassDef(EvTree, 1); -}; - -class Event : public TNamed -{ -private: - void Init(); - -protected: - Int_t fRun; - Int_t fEvent; - TString fUrl; - - std::map fTags; - - TDirectory* fDirectory; //! - - VSD* fCreator; //! - VSD* fSelector; //! - -public: - Event(); - Event(Int_t run, Int_t evt, const TString& url="."); - Event(const TString& url); - // Static ctors - static Event* OpenDirectory(const TString& dir_name); - static Event* OpenDirectory(TDirectory* dir); - - TDirectory* GetDirectory() { return fDirectory; } - void SetDirectory(TDirectory* dir); - TDirectory* MakeDirectory(const Text_t* name, const Text_t* title=""); - - TObject* Get(const Text_t* obj_name) { return fDirectory->Get(obj_name); } - - virtual void Print(Option_t* opt="") const; - - static const TString sVSDHeaderName; - - ClassDef(Event, 1); -}; // endclass Event - -} - -#endif -- 2.43.0