]>
Commit | Line | Data |
---|---|---|
6ad0bfa0 | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
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 | **************************************************************************/ | |
15 | ||
b2a60966 | 16 | /* $Id$ */ |
17 | ||
6ad0bfa0 | 18 | //_________________________________________________________________________ |
b2a60966 | 19 | // Algorithm class for the identification of particles detected in PHOS |
2f04ed65 | 20 | // base class of identified particle |
21 | // Why should I put meaningless comments | |
22 | // just to satisfy | |
23 | // the code checker | |
24 | ||
b2a60966 | 25 | // |
7acf6008 | 26 | //*-- Author: Yves Schutz (SUBATECH) & Dmitri Peressounko |
b2a60966 | 27 | |
6ad0bfa0 | 28 | |
29 | // --- ROOT system --- | |
8d0f3f77 | 30 | #include "TGeometry.h" |
31 | #include "TDirectory.h" | |
32 | #include "TFile.h" | |
33 | #include "TTree.h" | |
6ad0bfa0 | 34 | |
6ad0bfa0 | 35 | // --- Standard library --- |
7acf6008 | 36 | #include <iostream.h> |
fdeead01 | 37 | #include <stdlib.h> |
6ad0bfa0 | 38 | |
39 | ||
40 | // --- AliRoot header files --- | |
8d0f3f77 | 41 | #include "AliRun.h" |
26d4b141 | 42 | #include "AliPHOSPID.h" |
8d0f3f77 | 43 | #include "AliHeader.h" |
6ad0bfa0 | 44 | |
26d4b141 | 45 | ClassImp(AliPHOSPID) |
6ad0bfa0 | 46 | |
47 | //____________________________________________________________________________ | |
7b7c1533 | 48 | AliPHOSPID::AliPHOSPID():TTask("","") |
6ad0bfa0 | 49 | { |
50 | // ctor | |
8d0f3f77 | 51 | fSplitFile= 0 ; |
52 | ||
6ad0bfa0 | 53 | } |
7b7c1533 | 54 | |
8d0f3f77 | 55 | |
7acf6008 | 56 | //____________________________________________________________________________ |
fbf811ec | 57 | AliPHOSPID::AliPHOSPID(const char* headerFile, const char * name, const Bool_t toSplit):TTask(name, headerFile) |
7acf6008 | 58 | { |
59 | // ctor | |
8d0f3f77 | 60 | |
fbf811ec | 61 | fToSplit = toSplit ; |
8d0f3f77 | 62 | fSplitFile= 0 ; |
7acf6008 | 63 | } |
7b7c1533 | 64 | |
6ad0bfa0 | 65 | //____________________________________________________________________________ |
26d4b141 | 66 | AliPHOSPID::~AliPHOSPID() |
6ad0bfa0 | 67 | { |
68 | // dtor | |
8d0f3f77 | 69 | |
70 | fSplitFile = 0 ; | |
71 | } | |
72 | ||
fbf811ec | 73 | // //____________________________________________________________________________ |
74 | // void AliPHOSPID::SetSplitFile(const TString splitFileName) const | |
75 | // { | |
76 | // // Diverts the Digits in a file separate from the hits file | |
8d0f3f77 | 77 | |
78 | ||
fbf811ec | 79 | // TDirectory * cwd = gDirectory ; |
80 | // TFile * splitFile = gAlice->InitTreeFile("R",splitFileName.Data()); | |
81 | // splitFile->cd() ; | |
82 | // gAlice->Write(0, TObject::kOverwrite); | |
8d0f3f77 | 83 | |
fbf811ec | 84 | // TTree *treeE = gAlice->TreeE(); |
85 | // if (!treeE) { | |
86 | // cerr << "ERROR: AliPHOSPID::SetSplitFile -> No TreeE found "<<endl; | |
87 | // abort() ; | |
88 | // } | |
8d0f3f77 | 89 | |
fbf811ec | 90 | // // copy TreeE |
91 | // AliHeader *header = new AliHeader(); | |
92 | // treeE->SetBranchAddress("Header", &header); | |
93 | // treeE->SetBranchStatus("*",1); | |
94 | // TTree *treeENew = treeE->CloneTree(); | |
95 | // treeENew->Write(0, TObject::kOverwrite); | |
8d0f3f77 | 96 | |
fbf811ec | 97 | // // copy AliceGeom |
98 | // TGeometry *AliceGeom = static_cast<TGeometry*>(cwd->Get("AliceGeom")); | |
99 | // if (!AliceGeom) { | |
100 | // cerr << "ERROR: AliPHOSPID::SetSplitFile -> AliceGeom was not found in the input file "<<endl; | |
101 | // abort() ; | |
102 | // } | |
103 | // AliceGeom->Write(0, TObject::kOverwrite) ; | |
8d0f3f77 | 104 | |
fbf811ec | 105 | // gAlice->MakeTree("R",splitFile); |
106 | // cwd->cd() ; | |
107 | // cout << "INFO: AliPHOSPID::SetSPlitMode -> RecParticles will be stored in " << splitFileName.Data() << endl ; | |
108 | // } |