]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG0/TPC/AliROCRawAnalysisSelector.cxx
added skeleton for AliROCRawAnalysis and a few other updates
[u/mrichter/AliRoot.git] / PWG0 / TPC / AliROCRawAnalysisSelector.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 /* $Id$ */
17
18
19 #include "AliROCRawAnalysisSelector.h"
20
21 #include <AliLog.h>
22
23 #include <TFile.h>
24 #include <TTree.h>
25 #include <TCanvas.h>
26
27
28 ClassImp(AliROCRawAnalysisSelector)
29
30 AliROCRawAnalysisSelector::AliROCRawAnalysisSelector() :
31   AliSelector()
32 {
33   //
34   // Constructor. Initialization of pointers
35   //
36   
37   //  for (Int_t i=0; i<kTPCSectors; i++)
38   // fClusterHistograms[i] = 0;
39 }
40
41 AliROCRawAnalysisSelector::~AliROCRawAnalysisSelector()
42 {
43   //
44   // Destructor
45   //
46 }
47
48 void AliROCRawAnalysisSelector::SlaveBegin(TTree* tree)
49 {
50   //
51   
52   AliSelector::SlaveBegin(tree);
53
54
55 void AliROCRawAnalysisSelector::Init(TTree *tree)
56 {
57   // The Init() function is called when the selector needs to initialize
58   // a new tree or chain. Typically here the branch addresses of the tree
59   // will be set. It is normaly not necessary to make changes to the
60   // generated code, but the routine can be extended by the user if needed.
61   // Init() will be called many times when running with PROOF.
62
63   AliSelector::Init(tree);
64
65   // Set branch address
66   //if (tree)
67   //  tree->SetBranchAddress("rawevent", &fRawEvent);
68     
69 }
70
71 Bool_t AliROCRawAnalysisSelector::Process(Long64_t entry)
72 {
73   //
74   // Implement your analysis here. Do not forget to call the parent class Process by
75   // if (AliSelector::Process(entry) == kFALSE)
76   //   return kFALSE;
77   //
78
79   if (AliSelector::Process(entry) == kFALSE)
80     return kFALSE;
81
82   
83    
84   return kTRUE;
85 }
86
87 void AliROCRawAnalysisSelector::SlaveTerminate()
88 {
89   //
90   
91   //for (Int_t i=0; i<kTPCSectors; i++)
92   // if (fClusterHistograms[i])
93   //    fOutput->Add(fClusterHistograms[i]);
94
95
96 void AliROCRawAnalysisSelector::Terminate()
97 {
98   // TODO read from output list for PROOF
99     
100   TFile* file = TFile::Open("rocRaw.root", "RECREATE");
101   
102   //  for (Int_t i=0; i<kTPCSectors; i++)
103   //  if (fClusterHistograms[i])
104   //    fClusterHistograms[i]->SaveHistograms();
105
106   file->Close();
107