]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PHOS/AliPHOSTrackSegmentMaker.cxx
Fatal if no magnetic field set for the reconstruction (Y.Belikov)
[u/mrichter/AliRoot.git] / PHOS / AliPHOSTrackSegmentMaker.cxx
CommitLineData
d15a28e7 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 **************************************************************************/
b2a60966 15/* $Id$ */
d15a28e7 16//_________________________________________________________________________
b2a60966 17// Algorithm Base class to construct PHOS track segments
18// Associates EMC and PPSD clusters
19// Unfolds the EMC cluster
baef0810 20//*--
b2a60966 21//*-- Author: Dmitri Peressounko (RRC Ki & SUBATECH)
22
d15a28e7 23
24// --- ROOT system ---
8d0f3f77 25#include "TGeometry.h"
26#include "TFile.h"
27#include "TTree.h"
d15a28e7 28
d15a28e7 29// --- Standard library ---
8d0f3f77 30#include <iostream.h>
31#include <stdlib.h>
d15a28e7 32
d15a28e7 33// --- AliRoot header files ---
8d0f3f77 34#include "AliRun.h"
2731cd1e 35#include "AliPHOSTrackSegmentMaker.h"
8d0f3f77 36#include "AliHeader.h"
d15a28e7 37
38ClassImp( AliPHOSTrackSegmentMaker)
39
40
41//____________________________________________________________________________
7b7c1533 42 AliPHOSTrackSegmentMaker:: AliPHOSTrackSegmentMaker() : TTask("","")
d15a28e7 43{
7b7c1533 44 // ctor
8d0f3f77 45 fSplitFile= 0 ;
46
d15a28e7 47}
7b7c1533 48
2731cd1e 49//____________________________________________________________________________
fbf811ec 50AliPHOSTrackSegmentMaker::AliPHOSTrackSegmentMaker(const char * headerFile, const char * name, const Bool_t toSplit): TTask(name, headerFile)
2731cd1e 51{
7b7c1533 52 // ctor
8d0f3f77 53 fSplitFile= 0 ;
fbf811ec 54 fToSplit = toSplit ;
8d0f3f77 55}
56
57//____________________________________________________________________________
58AliPHOSTrackSegmentMaker::~AliPHOSTrackSegmentMaker()
59{
60
61 fSplitFile = 0 ;
2731cd1e 62}
63
fbf811ec 64// //____________________________________________________________________________
65// void AliPHOSTrackSegmentMaker::SetSplitFile(const TString splitFileName) const
66// {
67// // Diverts the TrackSegments in a file separate from the Digits file
8d0f3f77 68
69
fbf811ec 70// TDirectory * cwd = gDirectory ;
71// TFile * splitFile = gAlice->InitTreeFile("R",splitFileName.Data());
72// splitFile->cd() ;
73// gAlice->Write(0, TObject::kOverwrite);
8d0f3f77 74
fbf811ec 75// TTree *treeE = gAlice->TreeE();
76// if (!treeE) {
77// cerr << "ERROR: AliPHOSTrackSegmentMaker::SetSplitFile -> No TreeE found "<<endl;
78// abort() ;
79// }
8d0f3f77 80
fbf811ec 81// // copy TreeE
82// AliHeader *header = new AliHeader();
83// treeE->SetBranchAddress("Header", &header);
84// treeE->SetBranchStatus("*",1);
85// TTree *treeENew = treeE->CloneTree();
86// treeENew->Write(0, TObject::kOverwrite);
8d0f3f77 87
fbf811ec 88// // copy AliceGeom
89// TGeometry *AliceGeom = static_cast<TGeometry*>(cwd->Get("AliceGeom"));
90// if (!AliceGeom) {
91// cerr << "ERROR: AliPHOSTrackSegmentMaker::SetSplitFile -> AliceGeom was not found in the input file "<<endl;
92// abort() ;
93// }
94// AliceGeom->Write(0, TObject::kOverwrite);
8d0f3f77 95
fbf811ec 96// gAlice->MakeTree("R",splitFile);
97// cwd->cd() ;
98// cout << "INFO: AliPHOSTrackSegmentMaker::SetSPlitMode -> TrackSegments will be stored in " << splitFileName.Data() << endl ;
99// }