1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
18 //_________________________________________________________________________
19 // Base class for the clusterization algorithm (pure abstract)
21 //*-- Author: Yves Schutz SUBATECH
22 //////////////////////////////////////////////////////////////////////////////
24 // --- ROOT system ---
26 #include "TGeometry.h"
27 #include "TDirectory.h"
31 // --- Standard library ---
36 // --- AliRoot header files ---
39 #include "AliEMCALClusterizer.h"
40 #include "AliHeader.h"
42 ClassImp(AliEMCALClusterizer)
44 //____________________________________________________________________________
45 AliEMCALClusterizer::AliEMCALClusterizer():TTask("","")
51 //____________________________________________________________________________
52 AliEMCALClusterizer::AliEMCALClusterizer(const char* headerFile, const char* name):
53 TTask(name, headerFile)
59 //____________________________________________________________________________
60 AliEMCALClusterizer::~AliEMCALClusterizer()
68 //____________________________________________________________________________
69 void AliEMCALClusterizer::SetSplitFile(const TString splitFileName)
71 // Diverts the Digits in a file separate from the hits file
74 TDirectory * cwd = gDirectory ;
75 fSplitFile = gAlice->InitTreeFile("R",splitFileName.Data());
77 gAlice->Write(0, TObject::kOverwrite);
79 TTree *treeE = gAlice->TreeE();
81 cerr << "ERROR: AliEMCALClusterizer::SetSplitFile -> No TreeE found "<<endl;
86 AliHeader *header = new AliHeader();
87 treeE->SetBranchAddress("Header", &header);
88 treeE->SetBranchStatus("*",1);
89 TTree *treeENew = treeE->CloneTree();
90 treeENew->Write(0, TObject::kOverwrite);
93 TGeometry *AliceGeom = static_cast<TGeometry*>(cwd->Get("AliceGeom"));
95 cerr << "ERROR: AliEMCALClusterizer::SetSplitFile -> AliceGeom was not found in the input file "<<endl;
98 AliceGeom->Write(0, TObject::kOverwrite);
100 gAlice->MakeTree("R", fSplitFile);
102 cout << "INFO: AliEMCALClusterizer::SetSPlitMode -> RecPoints will be stored in " << splitFileName.Data() << endl ;