X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=EMCAL%2FAliEMCALClusterizer.cxx;h=127e476faa7159f47d468365d75771d2653836e2;hb=4b606a1e3f0dcc265e453864802c8fcd5fe23adc;hp=ed61757cb7a122b0c97e17e23169dddefc4f7ff5;hpb=839828a6f5922f09a20ec5a5db0ce6e17d8e9793;p=u%2Fmrichter%2FAliRoot.git diff --git a/EMCAL/AliEMCALClusterizer.cxx b/EMCAL/AliEMCALClusterizer.cxx index ed61757cb7a..127e476faa7 100644 --- a/EMCAL/AliEMCALClusterizer.cxx +++ b/EMCAL/AliEMCALClusterizer.cxx @@ -19,25 +19,19 @@ // Base class for the clusterization algorithm (pure abstract) //*-- //*-- Author: Yves Schutz SUBATECH +// Modif: +// August 2002 Yves Schutz: clone PHOS as closely as possible and intoduction +// of new IO (à la PHOS) ////////////////////////////////////////////////////////////////////////////// // --- 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" +#include "AliEMCALGetter.h" ClassImp(AliEMCALClusterizer) @@ -45,59 +39,27 @@ ClassImp(AliEMCALClusterizer) AliEMCALClusterizer::AliEMCALClusterizer():TTask("","") { // ctor - fSplitFile = 0 ; + fEventFolderName = "" ; + fFirstEvent = 0 ; + fLastEvent = -1 ; } //____________________________________________________________________________ -AliEMCALClusterizer::AliEMCALClusterizer(const char* headerFile, const char* name): -TTask(name, headerFile) +AliEMCALClusterizer::AliEMCALClusterizer(const TString alirunFileName, + const TString eventFolderName): + TTask("EMCAL"+AliConfig::Instance()->GetReconstructionerTaskName(), alirunFileName), + fEventFolderName(eventFolderName) { // ctor - fSplitFile = 0 ; + fFirstEvent = 0 ; + fLastEvent = -1 ; } //____________________________________________________________________________ AliEMCALClusterizer::~AliEMCALClusterizer() { // dtor - - fSplitFile = 0 ; - + //Remove this from the parental task before destroying + AliEMCALGetter::Instance()->EmcalLoader()->CleanReconstructioner(); } -//____________________________________________________________________________ -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 ; -}