AliPhysics  48852ec (48852ec)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliAnalysisTaskTemplate.cxx
Go to the documentation of this file.
1 /*************************************************************************
2 * Copyright(c) 1998-2008, 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 // AliAnalysisTaskTemplate
17 //
18 // author: Redmer A. Bertens, Utrecht University, 2013
19 // rbertens@cern.ch, rbertens@nikhef.nl, rbertens@uu.nl
20 //
21 // template task for flow analysis in the flow package
22 // can be used as a basis for a general flow analysis task
23 // see corresponding task in $ALICE_PHYSICS/PWG/FLOW/Base/
24 
25 // aliroot include
26 #include "AliFlowEventSimple.h"
29 #include "AliFlowCommonHist.h"
31 #include "AliLog.h"
32 
33 using std::endl;
34 using std::cout;
35 
37 
38 //_____________________________________________________________________________
40  fFlowTask(NULL),
41  fOutputList(NULL),
42  fUsePhiWeights(kFALSE),
43  fListWeights(NULL),
44  fApplyCorrectionForNUA(kFALSE),
45  fHarmonic(2) { /* constructor for ROOT IO */ }
46 //_____________________________________________________________________________
48  fFlowTask(NULL),
49  fOutputList(NULL),
50  fUsePhiWeights(usePhiWeights),
51  fListWeights(NULL),
52  fApplyCorrectionForNUA(kFALSE),
53  fHarmonic(2)
54 {
55  // constructor
56  DefineInput(0, AliFlowEventSimple::Class());
57  if(usePhiWeights) {
58  DefineInput(1, TList::Class());
59  }
60  DefineOutput(1, TList::Class());
61 }
62 //_____________________________________________________________________________
64 {
65  // destructor
66 }
67 //_____________________________________________________________________________
69 {
70  // create output objects
74  fFlowTask-> Init();
75  // connect the output list of the flow task to the output slot of this task
76  if( !(fOutputList = fFlowTask->GetHistList()) ) {
77  return;
78  } else fOutputList->SetOwner(kTRUE);
79  PostData(1,fOutputList);
80 }
81 //_____________________________________________________________________________
83 {
84  if(dynamic_cast<AliFlowEventSimple*>(GetInputData(0))) {
85  fFlowTask->Make(static_cast<AliFlowEventSimple*>(GetInputData(0)));
86  PostData(1,fOutputList);
87  }
88 }
89 //_____________________________________________________________________________
91 {
92  // terminate
93 }
94 //_____________________________________________________________________________
virtual void Terminate(Option_t *)
virtual void UserExec(Option_t *option)
AliFlowAnalysisTemplate * fFlowTask
void Make(AliFlowEventSimple *anEvent)
ClassImp(AliAnalysisTaskTemplate) AliAnalysisTaskTemplate
const char Option_t
Definition: External.C:48
bool Bool_t
Definition: External.C:53