major dielectron update (included also the data and plotting macros for paper)
[u/mrichter/AliRoot.git] / PWG3 / dielectron / AliDielectronDebugTree.h
1 #ifndef ALIDIELECTRONDEBUGTREE_H
2 #define ALIDIELECTRONDEBUGTREE_H
3
4 /* Copyright(c) 1998-2009, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               */
6
7 //#############################################################
8 //#                                                           # 
9 //#         Class AliDielectronDebugTree                     #
10 //#                                                           #
11 //#  Authors:                                                 #
12 //#   Anton     Andronic, GSI / A.Andronic@gsi.de             #
13 //#   Ionut C.  Arsene,   GSI / I.C.Arsene@gsi.de             #
14 //#   Julian    Book,     Uni Ffm / Julian.Book@cern.ch       #
15 //#   Frederick Kramer,   Uni Ffm, / Frederick.Kramer@cern.ch #
16 //#   Magnus    Mager,    CERN / Magnus.Mager@cern.ch         #
17 //#   WooJin J. Park,     GSI / W.J.Park@gsi.de               #
18 //#   Jens      Wiechula, Uni HD / Jens.Wiechula@cern.ch      #
19 //#                                                           #
20 //#############################################################
21
22 #include <TNamed.h>
23 #include <TString.h>
24
25 #include "AliDielectronVarManager.h"
26
27 class TTreeSRedirector;
28 class AliDielectronPair;
29 class AliDielectron;
30
31 class AliDielectronDebugTree : public TNamed {
32 public:
33   AliDielectronDebugTree();
34   AliDielectronDebugTree(const char*name, const char* title);
35
36   virtual ~AliDielectronDebugTree();
37
38   void SetOutputFileName(const char* file) { fFileName=file; }
39   
40   void AddPairVariable(AliDielectronVarManager::ValueTypes type) { fVariables[fNVars++]=(Int_t)type; }
41   void AddLegVariable(AliDielectronVarManager::ValueTypes type)  { fVariablesLeg[fNVarsLeg++]=(Int_t)type; }
42   
43   void Fill(AliDielectronPair *pair);
44
45   void SetDielectron(AliDielectron * const dielectron) { fDielectron=dielectron; }
46   
47   void DeleteStreamer();
48   void WriteTree();
49 private:
50   TString fFileName;                                          //output file name
51   
52   Int_t  fNVars;                                              //number of configured variables
53   Int_t  fVariables[AliDielectronVarManager::kNMaxValues];    //configured variables
54   Int_t  fNVarsLeg;                                           //number of configured variables
55   Int_t  fVariablesLeg[AliDielectronVarManager::kNMaxValues]; //configured variables for the legs
56
57   TTreeSRedirector *fStreamer;     //! Tree Redirector
58   AliDielectron *fDielectron;      //! pointer to mother dielectron manager
59
60   AliDielectronDebugTree(const AliDielectronDebugTree &c);
61   AliDielectronDebugTree &operator=(const AliDielectronDebugTree &c);
62
63   
64   ClassDef(AliDielectronDebugTree,1)         // Dielectron DebugTree
65 };
66
67
68
69 #endif