Accidentally added SRC removed.
[u/mrichter/AliRoot.git] / ANALYSIS / AliEventPoolOTF.cxx
CommitLineData
2d0a3a45 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// Realisation of an AliVEventPool via
20// on the flight (OTF) generation of the bin using AliTagAnalysis.
21// Author Andreas Morsch
22// andreas.morsch@cern.ch
23
24#include "AliEventPoolOTF.h"
25
26#include "AliRunTagCuts.h"
27#include "AliLHCTagCuts.h"
28#include "AliDetectorTagCuts.h"
29#include "AliEventTagCuts.h"
30#include "AliTagAnalysis.h"
31
32ClassImp(AliEventPoolOTF)
33
34
35////////////////////////////////////////////////////////////////////////
36
37AliEventPoolOTF::AliEventPoolOTF():
38 AliVEventPool(),
39 fTagAnalysis(0),
40 fRunCuts(0),
41 fLHCCuts(0),
42 fDetectorCuts(0),
43 fEventCuts(0),
44 fTagDirectory(0),
45 fMultMin(0),
46 fMultMax(0),
47 fMultStep(0),
a065d8ed 48 fMultiplicity(),
49 fBinNumber(0)
2d0a3a45 50{
51 // Default constructor
52}
53
54AliEventPoolOTF::AliEventPoolOTF(const char* name, const char* title):
55 AliVEventPool(name, title),
56 fTagAnalysis(new AliTagAnalysis("AOD")),
57 fRunCuts(new AliRunTagCuts()),
58 fLHCCuts(new AliLHCTagCuts()),
59 fDetectorCuts(new AliDetectorTagCuts()),
60 fEventCuts(new AliEventTagCuts()),
61 fTagDirectory("."),
62 fMultMin(0),
63 fMultMax(0),
64 fMultStep(0),
a065d8ed 65 fMultiplicity(),
66 fBinNumber(0)
2d0a3a45 67{
68 // Constructor
69}
70
71
72AliEventPoolOTF::AliEventPoolOTF(const AliEventPoolOTF& obj):
73 AliVEventPool(obj),
74 fTagAnalysis(0),
75 fRunCuts(0),
76 fLHCCuts(0),
77 fDetectorCuts(0),
78 fEventCuts(0),
79 fTagDirectory(0),
80 fMultMin(0),
81 fMultMax(0),
82 fMultStep(0),
a065d8ed 83 fMultiplicity(),
84 fBinNumber(0)
2d0a3a45 85{
86 // Copy constructor
87}
88
89AliEventPoolOTF& AliEventPoolOTF::operator=(const AliEventPoolOTF& other)
90{
91// Assignment operator
92 AliVEventPool::operator=(other);
93 return *this;
94}
95
96
97void AliEventPoolOTF::Init()
98{
99 //
100 fTagAnalysis->ChainLocalTags(fTagDirectory);
101 fMultiplicity = fMultMin;
102}
103
104TChain* AliEventPoolOTF::GetNextChain()
105{
106 //
107 TChain* chain = 0;
a065d8ed 108 fBinNumber++;
845e843e 109 Int_t mmax = fMultiplicity + fMultStep - 1;
2d0a3a45 110 if (mmax > fMultMax) {
111 return 0;
112 } else {
113 fEventCuts->SetMultiplicityRange(fMultiplicity, mmax);
114 chain = fTagAnalysis->QueryTags(fRunCuts, fLHCCuts, fDetectorCuts, fEventCuts);
115 fMultiplicity += fMultStep;
116 return chain;
117 }
118}
119
120void AliEventPoolOTF::GetCurrentBin(Float_t* /*bin*/)
121{
122 //
123}
124
125Int_t AliEventPoolOTF::GetDimension()
126{
127 //
128 return (1);
129}
130