- The part of JETAN dealing with ESD data has been separated from the one using MC...
[u/mrichter/AliRoot.git] / JETAN / AliJetReader.cxx
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  
16 //------------------------------------------------------------------------
17 // Jet reader base class
18 // manages the reading of input for jet algorithms
19 // Author: jgcn@mda.cinvestav.mx
20 //------------------------------------------------------------------------
21
22 // root
23 #include <TClonesArray.h>
24 //AliRoot
25 #include "AliJetReader.h"
26 #include "AliJetReaderHeader.h"
27 #include "AliESD.h"
28 #include "AliHeader.h"
29
30 ClassImp(AliJetReader)
31
32 ////////////////////////////////////////////////////////////////////////
33
34 AliJetReader::AliJetReader():
35   fChain(0),
36   fChainMC(0),
37   fMomentumArray(0),
38   fArrayMC(0),
39   fESD(0),
40   fReaderHeader(0),
41   fSignalFlag(0),
42   fCutFlag(0)
43     
44 {
45   // Default constructor
46   fMomentumArray = new TClonesArray("TLorentzVector",2000);
47   fSignalFlag = TArrayI();
48   fCutFlag = TArrayI();
49 }
50
51 ////////////////////////////////////////////////////////////////////////
52
53 AliJetReader::~AliJetReader()
54 {
55   // Destructor
56   delete fChain;
57   delete fChainMC;
58   delete fESD;
59   if (fMomentumArray) {
60       fMomentumArray->Delete();
61       delete fMomentumArray;
62   }
63   delete fArrayMC;
64 }
65
66
67 ////////////////////////////////////////////////////////////////////////
68
69 void AliJetReader::ClearArray()
70
71 {
72   if (fMomentumArray)  fMomentumArray->Clear();
73 }