From: gamez Date: Tue, 25 May 2004 22:04:16 +0000 (+0000) Subject: Removed unused data members and methods X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=commitdiff_plain;h=192ec4f49ffc47ad4de619ef56aa21a5a7b4daa3 Removed unused data members and methods --- diff --git a/CRT/AliCRT.cxx b/CRT/AliCRT.cxx index b099c5b..502f411 100644 --- a/CRT/AliCRT.cxx +++ b/CRT/AliCRT.cxx @@ -40,10 +40,13 @@ #include "AliCRT.h" #include +#include #include "AliRun.h" #include "AliMagF.h" +//#include "AliMC.h" +//#include "AliCRThit.h" #include "AliCRTModule.h" ClassImp(AliCRT) @@ -66,6 +69,8 @@ AliCRT::AliCRT(const char *name, const char *title) // // Standard constructor // + //fHits = new TClonesArray("AliCRThit", 400); + //gAlice->GetMCApp()->AddHitList(fHits); } //_____________________________________________________________________________ @@ -211,11 +216,25 @@ void AliCRT::SetTreeAddress() TBranch *branch; char branchname[20]; sprintf(branchname,"%s",GetName()); - // Branch address for hit tree TTree *treeH = fLoader->TreeH(); - if (treeH && fHits) { + if (treeH ) { branch = treeH->GetBranch(branchname); if (branch) branch->SetAddress(&fHits); } } + +//_____________________________________________________________________________ +void AliCRT::MakeBranch(Option_t* opt) +{ + // + // Initializes the branches of the CRT inside the trees written + // for each event. + // + const char* oH = strstr(opt, "H"); + if ( fLoader->TreeH() && oH && (fHits == 0x0) ) { + fHits = new TClonesArray("AliCRThit", 1000); + fNhits = 0; + } + AliDetector::MakeBranch(opt); +} diff --git a/CRT/AliCRT.h b/CRT/AliCRT.h index 9a1561c..ab12aaf 100644 --- a/CRT/AliCRT.h +++ b/CRT/AliCRT.h @@ -23,13 +23,14 @@ public: AliCRT& operator=(const AliCRT& crt); virtual void CreateMaterials(); - virtual Int_t IsVersion() const { return 0; } + virtual Int_t IsVersion() const { return -1; } virtual TString Version() { return TString(""); } virtual void SetTreeAddress(); virtual void SetModule(AliCRTModule* module) {fModule = module;} virtual const AliCRTModule* GetModule() const {return fModule; } + virtual void MakeBranch(Option_t* opt = ""); protected: AliCRTModule* fModule;