From 839828a6f5922f09a20ec5a5db0ce6e17d8e9793 Mon Sep 17 00:00:00 2001 From: schutz Date: Thu, 13 Jun 2002 15:21:34 +0000 Subject: [PATCH] Added the option to write objects into separate files and improved the cleaning of objects and tasks posted to the folders. gAlice is also deleted (deferred to the getter) Use case in Reconstruct.C (in PHOS directory) --- EMCAL/AliEMCALClusterizer.cxx | 53 +++++++++++- EMCAL/AliEMCALClusterizer.h | 7 +- EMCAL/AliEMCALClusterizerv1.cxx | 145 ++++++++++++++----------------- EMCAL/AliEMCALClusterizerv1.h | 1 + EMCAL/AliEMCALDigitizer.cxx | 149 ++++++++++++++------------------ EMCAL/AliEMCALDigitizer.h | 1 + EMCAL/AliEMCALSDigitizer.cxx | 104 +++++++++++----------- EMCAL/AliEMCALSDigitizer.h | 1 + 8 files changed, 237 insertions(+), 224 deletions(-) diff --git a/EMCAL/AliEMCALClusterizer.cxx b/EMCAL/AliEMCALClusterizer.cxx index 325aef62c2b..ed61757cb7a 100644 --- a/EMCAL/AliEMCALClusterizer.cxx +++ b/EMCAL/AliEMCALClusterizer.cxx @@ -23,15 +23,21 @@ // --- ROOT system --- - +#include "TGeometry.h" +#include "TDirectory.h" +#include "TFile.h" +#include "TTree.h" // --- Standard library --- - +#include +#include // --- AliRoot header files --- +#include "AliRun.h" #include "AliEMCALClusterizer.h" +#include "AliHeader.h" ClassImp(AliEMCALClusterizer) @@ -39,16 +45,59 @@ ClassImp(AliEMCALClusterizer) AliEMCALClusterizer::AliEMCALClusterizer():TTask("","") { // ctor + fSplitFile = 0 ; } + //____________________________________________________________________________ AliEMCALClusterizer::AliEMCALClusterizer(const char* headerFile, const char* name): TTask(name, headerFile) { // ctor + fSplitFile = 0 ; } //____________________________________________________________________________ AliEMCALClusterizer::~AliEMCALClusterizer() { // dtor + + fSplitFile = 0 ; + +} + +//____________________________________________________________________________ +void AliEMCALClusterizer::SetSplitFile(const TString splitFileName) +{ + // Diverts the Digits in a file separate from the hits file + + + TDirectory * cwd = gDirectory ; + fSplitFile = gAlice->InitTreeFile("R",splitFileName.Data()); + fSplitFile->cd() ; + gAlice->Write(0, TObject::kOverwrite); + + TTree *treeE = gAlice->TreeE(); + if (!treeE) { + cerr << "ERROR: AliEMCALClusterizer::SetSplitFile -> No TreeE found "<SetBranchAddress("Header", &header); + treeE->SetBranchStatus("*",1); + TTree *treeENew = treeE->CloneTree(); + treeENew->Write(0, TObject::kOverwrite); + + // copy AliceGeom + TGeometry *AliceGeom = static_cast(cwd->Get("AliceGeom")); + if (!AliceGeom) { + cerr << "ERROR: AliEMCALClusterizer::SetSplitFile -> AliceGeom was not found in the input file "<Write(0, TObject::kOverwrite); + + gAlice->MakeTree("R", fSplitFile); + cwd->cd() ; + cout << "INFO: AliEMCALClusterizer::SetSPlitMode -> RecPoints will be stored in " << splitFileName.Data() << endl ; } diff --git a/EMCAL/AliEMCALClusterizer.h b/EMCAL/AliEMCALClusterizer.h index 04583eb802b..b9d53ba6b9c 100644 --- a/EMCAL/AliEMCALClusterizer.h +++ b/EMCAL/AliEMCALClusterizer.h @@ -11,7 +11,7 @@ // --- ROOT system --- #include "TTask.h" - +class TFile ; // --- Standard library --- // --- AliRoot header files --- @@ -49,9 +49,14 @@ public: virtual void SetPreShoLogWeight(Float_t w) = 0 ; virtual void SetDigitsBranch(const char * title) = 0 ; virtual void SetRecPointsBranch(const char *title) = 0 ; + void SetSplitFile(const TString splitFileName = "EMCAL.RecPoints.root") ; virtual void SetUnfolding(Bool_t toUnfold ) = 0 ; virtual const char * Version() const = 0 ; +protected: + + TFile * fSplitFile ; //! file in which RecPoints will eventually be stored + ClassDef(AliEMCALClusterizer,1) // Clusterization algorithm class } ; diff --git a/EMCAL/AliEMCALClusterizerv1.cxx b/EMCAL/AliEMCALClusterizerv1.cxx index a4e6772825c..1c591ab34ef 100644 --- a/EMCAL/AliEMCALClusterizerv1.cxx +++ b/EMCAL/AliEMCALClusterizerv1.cxx @@ -86,23 +86,7 @@ ClassImp(AliEMCALClusterizerv1) { // default ctor (to be used mainly by Streamer) - fNumberOfPreShoClusters = fNumberOfTowerClusters = 0 ; - - fPreShoClusteringThreshold = 0.0; - fTowerClusteringThreshold = 0.0; - - fTowerLocMaxCut = 0.0 ; - fPreShoLocMaxCut = 0.0 ; - - fW0 = 0.0 ; - fW0CPV = 0.0 ; - - fTimeGate = 0.0 ; - - fToUnfold = 0 ; - - fHeaderFileName = "" ; - fRecPointsInRun = 0 ; + InitParameters() ; } //____________________________________________________________________________ @@ -111,40 +95,30 @@ AliEMCALClusterizerv1::AliEMCALClusterizerv1(const char* headerFile,const char* { // ctor with the indication of the file where header Tree and digits Tree are stored - - fNumberOfPreShoClusters = fNumberOfTowerClusters = 0 ; - - - - fPreShoClusteringThreshold = 0.0001; - fTowerClusteringThreshold = 0.2; - - fTowerLocMaxCut = 0.03 ; - fPreShoLocMaxCut = 0.03 ; - - fW0 = 4.5 ; - fW0CPV = 4.0 ; - - fTimeGate = 1.e-8 ; - - fToUnfold = kFALSE ; - - fHeaderFileName = GetTitle() ; - fDigitsBranchTitle = GetName() ; - - TString clusterizerName( GetName()) ; - clusterizerName.Append(":") ; - clusterizerName.Append(Version()) ; - SetName(clusterizerName) ; - fRecPointsInRun = 0 ; - + InitParameters() ; Init() ; } //____________________________________________________________________________ AliEMCALClusterizerv1::~AliEMCALClusterizerv1() { + AliEMCALGetter * gime = AliEMCALGetter::GetInstance() ; + + // remove the task from the folder list + gime->RemoveTask("C",GetName()) ; + + // remove the RecPoints from the folder list + TString name(GetName()) ; + name.Remove(name.Index(":")) ; + gime->RemoveObjects("D", name) ; // Digits + gime->RemoveObjects("RT", name) ; // TowerRecPoints + gime->RemoveObjects("RP", name) ; // PreShoRecPoints + + // Delete gAlice + gime->CloseFile() ; + } + //____________________________________________________________________________ Float_t AliEMCALClusterizerv1::Calibrate(Int_t amp, Bool_t inpresho) const { @@ -376,6 +350,38 @@ void AliEMCALClusterizerv1::Init() } +//____________________________________________________________________________ +void AliEMCALClusterizerv1::InitParameters() +{ + fNumberOfPreShoClusters = fNumberOfTowerClusters = 0 ; + + + + fPreShoClusteringThreshold = 0.0001; + fTowerClusteringThreshold = 0.2; + + fTowerLocMaxCut = 0.03 ; + fPreShoLocMaxCut = 0.03 ; + + fW0 = 4.5 ; + fW0CPV = 4.0 ; + + fTimeGate = 1.e-8 ; + + fToUnfold = kFALSE ; + + fHeaderFileName = GetTitle() ; + fDigitsBranchTitle = GetName() ; + + TString clusterizerName( GetName()) ; + if (clusterizerName.IsNull() ) + clusterizerName = "Default" ; + clusterizerName.Append(":") ; + clusterizerName.Append(Version()) ; + SetName(clusterizerName) ; + fRecPointsInRun = 0 ; +} + //____________________________________________________________________________ Int_t AliEMCALClusterizerv1::AreNeighbours(AliEMCALDigit * d1, AliEMCALDigit * d2)const { @@ -457,8 +463,13 @@ void AliEMCALClusterizerv1::WriteRecPoints(Int_t event) TObjArray * towerRecPoints = gime->TowerRecPoints(branchName) ; TObjArray * preshoRecPoints = gime->PreShowerRecPoints(branchName) ; TClonesArray * digits = gime->Digits(branchName) ; + TTree * treeR ; - Int_t index ; + if (!gAlice->TreeR() ) + gAlice->MakeTree("R", fSplitFile); + treeR = gAlice->TreeR() ; + + Int_t index ; //Evaluate position, dispersion and other RecPoint properties... for(index = 0; index < towerRecPoints->GetEntries(); index++) (dynamic_cast(towerRecPoints->At(index)))->EvalAll(fW0,digits) ; @@ -482,11 +493,6 @@ void AliEMCALClusterizerv1::WriteRecPoints(Int_t event) preshoRecPoints->Expand(preshoRecPoints->GetEntriesFast()) ; //Make branches in TreeR for RecPoints and Clusterizer - char * filename = 0; - if(gSystem->Getenv("CONFIG_SPLIT_FILE")!=0){ //generating file name - filename = new char[strlen(gAlice->GetBaseFile())+20] ; - sprintf(filename,"%s/EMCAL.Reco.root",gAlice->GetBaseFile()) ; - } //Make new branches TDirectory *cwd = gDirectory; @@ -496,51 +502,26 @@ void AliEMCALClusterizerv1::WriteRecPoints(Int_t event) Int_t splitlevel = 0 ; //First EMC - TBranch * emcBranch = gAlice->TreeR()->Branch("EMCALTowerRP","TObjArray",&towerRecPoints,bufferSize,splitlevel); + TBranch * emcBranch = treeR->Branch("EMCALTowerRP","TObjArray",&towerRecPoints,bufferSize,splitlevel); emcBranch->SetTitle(branchName); - if (filename) { - emcBranch->SetFile(filename); - TIter next( emcBranch->GetListOfBranches()); - TBranch * sb ; - while ((sb=(TBranch*)next())) { - sb->SetFile(filename); - } - - cwd->cd(); - } + //Now CPV branch - TBranch * cpvBranch = gAlice->TreeR()->Branch("EMCALPreShoRP","TObjArray",&preshoRecPoints,bufferSize,splitlevel); + TBranch * cpvBranch = treeR->Branch("EMCALPreShoRP","TObjArray",&preshoRecPoints,bufferSize,splitlevel); cpvBranch->SetTitle(branchName); - if (filename) { - cpvBranch->SetFile(filename); - TIter next( cpvBranch->GetListOfBranches()); - TBranch * sb; - while ((sb=(TBranch*)next())) { - sb->SetFile(filename); - } - cwd->cd(); - } + //And Finally clusterizer branch AliEMCALClusterizerv1 * cl = (AliEMCALClusterizerv1*)gime->Clusterizer(branchName) ; - TBranch * clusterizerBranch = gAlice->TreeR()->Branch("AliEMCALClusterizer","AliEMCALClusterizerv1", + TBranch * clusterizerBranch = treeR->Branch("AliEMCALClusterizer","AliEMCALClusterizerv1", &cl,bufferSize,splitlevel); clusterizerBranch->SetTitle(branchName); - if (filename) { - clusterizerBranch->SetFile(filename); - TIter next( clusterizerBranch->GetListOfBranches()); - TBranch * sb ; - while ((sb=(TBranch*)next())) { - sb->SetFile(filename); - } - cwd->cd(); - } + emcBranch ->Fill() ; cpvBranch ->Fill() ; clusterizerBranch->Fill() ; - gAlice->TreeR()->Write(0,kOverwrite) ; + treeR->AutoSave() ; //Write(0,kOverwrite) ; } diff --git a/EMCAL/AliEMCALClusterizerv1.h b/EMCAL/AliEMCALClusterizerv1.h index 1d9b62623d8..e549dd169e3 100644 --- a/EMCAL/AliEMCALClusterizerv1.h +++ b/EMCAL/AliEMCALClusterizerv1.h @@ -89,6 +89,7 @@ private: Bool_t FindFit(AliEMCALTowerRecPoint * emcRP, AliEMCALDigit ** MaxAt, Float_t * maxAtEnergy, Int_t NPar, Float_t * FitParametres) const; //Used in UnfoldClusters, calls TMinuit void Init() ; + void InitParameters() ; virtual void MakeUnfolding() ; void UnfoldCluster(AliEMCALTowerRecPoint * iniEmc,Int_t Nmax, diff --git a/EMCAL/AliEMCALDigitizer.cxx b/EMCAL/AliEMCALDigitizer.cxx index 3ee6c9cc8e6..50350f5661d 100644 --- a/EMCAL/AliEMCALDigitizer.cxx +++ b/EMCAL/AliEMCALDigitizer.cxx @@ -87,32 +87,56 @@ ClassImp(AliEMCALDigitizer) { // ctor - fSDigitizer = 0 ; - fNinputs = 0 ; - fPinNoise = 0.0 ; - fTowerDigitThreshold = 0.0 ; - fTimeResolution = 0. ; - fTimeSignalLength = 0. ; - fPreShowerDigitThreshold = 0. ; - fADCchannelTower = 0.0; // width of one ADC channel in GeV - fADCpedestalTower = 0. ; // pedestal of ADC - fNADCTower = 0; // number of channels in Tower ADC - - fADCchannelPreSho = 0.0; // width of one ADC channel in Pre Shower - fADCpedestalPreSho = 0.0 ; // pedestal of ADC - fNADCPreSho = 0; // number of channels in Pre Shower ADC - fTimeThreshold = 0.0; //Means 1 MeV in terms of SDigits amplitude - fManager = 0 ; - fSplitFile= 0 ; + InitParameters() ; +} +//____________________________________________________________________________ +AliEMCALDigitizer::AliEMCALDigitizer(const char *headerFile,const char *name) +{ + SetName(name) ; + SetTitle(headerFile) ; + fManager = 0 ; // We work in the standalong mode + fSplitFile= 0 ; + InitParameters() ; + Init() ; } + //____________________________________________________________________________ -Bool_t AliEMCALDigitizer::Init() +AliEMCALDigitizer::AliEMCALDigitizer(AliRunDigitizer * ard):AliDigitizer(ard) { - // Makes all memory allocations + // ctor + SetName(""); //Will call init in the digitizing + SetTitle("aliroot") ; +} +//____________________________________________________________________________ + AliEMCALDigitizer::~AliEMCALDigitizer() +{ + // dtor + + AliEMCALGetter * gime = AliEMCALGetter::GetInstance() ; + + // remove the task from the folder list + gime->RemoveTask("S",GetName()) ; + gime->RemoveTask("D",GetName()) ; + + // remove the Digits from the folder list + gime->RemoveObjects("D", GetName()) ; + + // remove the SDigits from the folder list + gime->RemoveSDigits() ; + + // Delete gAlice + gime->CloseFile() ; + + fSplitFile = 0 ; +} + +//____________________________________________________________________________ +void AliEMCALDigitizer::InitParameters() +{ fSDigitizer = 0 ; fNinputs = 1 ; fPinNoise = 0.00001 ; @@ -141,6 +165,13 @@ Bool_t AliEMCALDigitizer::Init() if( strcmp(GetName(), "") == 0 ) SetName("Default") ; +} + +//____________________________________________________________________________ +Bool_t AliEMCALDigitizer::Init() +{ + // Makes all memory allocations + AliEMCALGetter * gime = AliEMCALGetter::GetInstance(GetTitle(), GetName(), "update") ; if ( gime == 0 ) { cerr << "ERROR: AliEMCALDigitizer::Init -> Could not obtain the Getter object !" << endl ; @@ -162,50 +193,7 @@ Bool_t AliEMCALDigitizer::Init() gime->PostSDigitizer(GetName(),GetTitle()) ; } return kTRUE ; - - - -} - -//____________________________________________________________________________ -AliEMCALDigitizer::AliEMCALDigitizer(const char *headerFile,const char *name) -{ - SetName(name) ; - SetTitle(headerFile) ; - fManager = 0 ; // We work in the standalong mode - fSplitFile= 0 ; - Init() ; - - - -} -//____________________________________________________________________________ -AliEMCALDigitizer::AliEMCALDigitizer(AliRunDigitizer * ard):AliDigitizer(ard) -{ - // ctor - SetName(""); //Will call init in the digitizing - SetTitle("aliroot") ; -} - -//____________________________________________________________________________ - AliEMCALDigitizer::~AliEMCALDigitizer() -{ - // dtor - - if (fSplitFile) - if ( fSplitFile->IsOpen() ) - fSplitFile->Close() ; - - AliEMCALGetter * gime = AliEMCALGetter::GetInstance() ; - // Close the root file - gime->CloseFile() ; - // remove the task from the folder list - gime->RemoveTask("S",GetName()) ; - // remove the Digits from the folder list - gime->RemoveObjects("D", GetName()) ; - // remove the SDigits from the folder list - gime->RemoveSDigits() ; - + } //____________________________________________________________________________ @@ -361,9 +349,9 @@ void AliEMCALDigitizer::Digitize(const Int_t event) { //remove digits below thresholds + for(absID = 0; absID < nEMC/2 ; absID++){ - - if(sDigitizer->Calibrate(((AliEMCALDigit*)digits->At(absID))->GetAmp()) < fTowerDigitThreshold) + if(sDigitizer->Calibrate(((AliEMCALDigit*)digits->At(absID))->GetAmp()) < fTowerDigitThreshold) digits->RemoveAt(absID) ; else digit->SetTime(gRandom->Gaus(digit->GetTime(),fTimeResolution) ) ; @@ -503,10 +491,6 @@ if(strcmp(GetName(), "") == 0 ) fDigitsInRun += gime->Digits()->GetEntriesFast() ; } - if (fSplitFile) - if ( fSplitFile->IsOpen() ) - fSplitFile->Close() ; - if(strstr(option,"tim")){ gBenchmark->Stop("EMCALDigitizer"); cout << "AliEMCALDigitizer:" << endl ; @@ -716,8 +700,7 @@ void AliEMCALDigitizer::SetSplitFile(const TString splitFileName) fSplitFile = gAlice->InitTreeFile("D",splitFileName.Data()); fSplitFile->cd() ; - if ( !fSplitFile->Get("gAlice") ) - gAlice->Write(); + gAlice->Write(0, TObject::kOverwrite); TTree *treeE = gAlice->TreeE(); if (!treeE) { @@ -726,23 +709,19 @@ void AliEMCALDigitizer::SetSplitFile(const TString splitFileName) } // copy TreeE - if ( !fSplitFile->Get("TreeE") ) { - AliHeader *header = new AliHeader(); - treeE->SetBranchAddress("Header", &header); - treeE->SetBranchStatus("*",1); - TTree *treeENew = treeE->CloneTree(); - treeENew->Write(); - } + AliHeader *header = new AliHeader(); + treeE->SetBranchAddress("Header", &header); + treeE->SetBranchStatus("*",1); + TTree *treeENew = treeE->CloneTree(); + treeENew->Write(0, TObject::kOverwrite); // copy AliceGeom - if ( !fSplitFile->Get("AliceGeom") ) { - TGeometry *AliceGeom = static_cast(cwd->Get("AliceGeom")); - if (!AliceGeom) { - cerr << "ERROR: AliEMCALDigitizer::SetSplitFile -> AliceGeom was not found in the input file "<Write(); + TGeometry *AliceGeom = static_cast(cwd->Get("AliceGeom")); + if (!AliceGeom) { + cerr << "ERROR: AliEMCALDigitizer::SetSplitFile -> AliceGeom was not found in the input file "<Write(0, TObject::kOverwrite); gAlice->MakeTree("D",fSplitFile); cwd->cd() ; diff --git a/EMCAL/AliEMCALDigitizer.h b/EMCAL/AliEMCALDigitizer.h index 1beb66ad654..100c3626cb7 100644 --- a/EMCAL/AliEMCALDigitizer.h +++ b/EMCAL/AliEMCALDigitizer.h @@ -70,6 +70,7 @@ public: private: Bool_t Init(); + void InitParameters() ; Bool_t ReadSDigits() ; // Read sdigits for particular events void WriteDigits(Int_t evt) ; // Writes Digits for particular event void PrintDigits(Option_t * option) ; diff --git a/EMCAL/AliEMCALSDigitizer.cxx b/EMCAL/AliEMCALSDigitizer.cxx index 2eb4b9b41f0..e001929ca39 100644 --- a/EMCAL/AliEMCALSDigitizer.cxx +++ b/EMCAL/AliEMCALSDigitizer.cxx @@ -75,26 +75,14 @@ ClassImp(AliEMCALSDigitizer) AliEMCALSDigitizer::AliEMCALSDigitizer():TTask("AliEMCALSDigitizer","") { // ctor - fA = fB = fNevents = 0 ; - fTowerPrimThreshold = fPreShowerPrimThreshold = fPhotonElectronFactor = 0. ; - fHits = fSDigits = fSDigits = 0 ; - fSplitFile = 0 ; - fIsInitialized = kFALSE ; - - + InitParameters() ; } //____________________________________________________________________________ AliEMCALSDigitizer::AliEMCALSDigitizer(const char* headerFile, const char *sDigitsTitle):TTask(sDigitsTitle, headerFile) { // ctor - fA = 0; - fB = 10000000.; - fTowerPrimThreshold = 0.01 ; - fPreShowerPrimThreshold = 0.0001 ; - fNevents = 0 ; - fPhotonElectronFactor = 5000. ; // photoelectrons per GeV - fSplitFile = 0 ; + InitParameters() ; Init(); } @@ -102,25 +90,28 @@ AliEMCALSDigitizer::AliEMCALSDigitizer(const char* headerFile, const char *sDigi AliEMCALSDigitizer::~AliEMCALSDigitizer() { // dtor - - if (fSplitFile) - if ( fSplitFile->IsOpen() ) - fSplitFile->Close() ; - // Close the root file + AliEMCALGetter * gime = AliEMCALGetter::GetInstance() ; - gime->CloseFile() ; - - // remove the task from the folder list - gime->RemoveTask("S",GetName()) ; - - TString name(GetName()) ; - name.Remove(name.Index(":")) ; - - // remove the Hits from the folder list - gime->RemoveObjects("H",name) ; - - // remove the SDigits from the folder list - gime->RemoveObjects("S", name) ; + if (gime) { + // remove the task from the folder list + gime->RemoveTask("S",GetName()) ; + + TString name(GetName()) ; + if (! name.IsNull() ) + if (name.Index(":") > 0) + name.Remove(name.Index(":")) ; + + // remove the Hits from the folder list + gime->RemoveObjects("H",name) ; + + // remove the SDigits from the folder list + gime->RemoveObjects("S", name) ; + + // Close the root file + gime->CloseFile() ; + + } + fSplitFile = 0 ; } //____________________________________________________________________________ @@ -151,7 +142,20 @@ void AliEMCALSDigitizer::Init(){ gime->PostSDigitizer(this) ; - } +} + +//____________________________________________________________________________ +void AliEMCALSDigitizer::InitParameters(){ + fA = 0; + fB = 10000000.; + fTowerPrimThreshold = 0.01 ; + fPreShowerPrimThreshold = 0.0001 ; + fNevents = 0 ; + fPhotonElectronFactor = 5000. ; // photoelectrons per GeV + fSplitFile = 0 ; + +} + //____________________________________________________________________________ void AliEMCALSDigitizer::Exec(Option_t *option) { @@ -349,10 +353,6 @@ void AliEMCALSDigitizer::Exec(Option_t *option) { } - if (fSplitFile) - if ( fSplitFile->IsOpen() ) - fSplitFile->Close() ; - if(strstr(option,"tim")){ gBenchmark->Stop("EMCALSDigitizer"); cout << "AliEMCALSDigitizer:" << endl ; @@ -407,9 +407,8 @@ void AliEMCALSDigitizer::SetSplitFile(const TString splitFileName) fSplitFile = gAlice->InitTreeFile("S",splitFileName.Data()); fSplitFile->cd() ; - if ( !fSplitFile->Get("gAlice") ) - gAlice->Write(); - + gAlice->Write(0, TObject::kOverwrite); + TTree *treeE = gAlice->TreeE(); if (!treeE) { cerr << "ERROR: AliEMCALSDigitizer::SetSPlitFile -> No TreeE found "<Get("TreeE") ) { - AliHeader *header = new AliHeader(); - treeE->SetBranchAddress("Header", &header); - treeE->SetBranchStatus("*",1); - TTree *treeENew = treeE->CloneTree(); - treeENew->Write(); - } + + AliHeader *header = new AliHeader(); + treeE->SetBranchAddress("Header", &header); + treeE->SetBranchStatus("*",1); + TTree *treeENew = treeE->CloneTree(); + treeENew->Write(0, TObject::kOverwrite); // copy AliceGeom - if ( !fSplitFile->Get("AliceGeom") ) { - TGeometry *AliceGeom = static_cast(cwd->Get("AliceGeom")); - if (!AliceGeom) { - cerr << "ERROR: AliEMCALSDigitizer::SetSPlitFile -> AliceGeom was not found in the input file "<Write(); + TGeometry *AliceGeom = static_cast(cwd->Get("AliceGeom")); + if (!AliceGeom) { + cerr << "ERROR: AliEMCALSDigitizer::SetSPlitFile -> AliceGeom was not found in the input file "<Write(0, TObject::kOverwrite) ; gAlice->MakeTree("S",fSplitFile); cwd->cd() ; diff --git a/EMCAL/AliEMCALSDigitizer.h b/EMCAL/AliEMCALSDigitizer.h index ce5b5f3e703..d703dfd8eb7 100644 --- a/EMCAL/AliEMCALSDigitizer.h +++ b/EMCAL/AliEMCALSDigitizer.h @@ -50,6 +50,7 @@ public: private: void Init() ; + void InitParameters() ; void PrintSDigits(Option_t * option) ; Int_t Layer2TowerID(Int_t,Bool_t) ; -- 2.39.3