AliPhysics  8417398 (8417398)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliEMCalTriggerTaskGroup.cxx
Go to the documentation of this file.
1 /**************************************************************************
2  * Copyright(c) 1998-2014, 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 #include <THashList.h>
16 #include <TList.h>
19 
21 
25 
26 namespace EMCalTriggerPtAnalysis {
27 
31 AliEMCalTriggerTaskGroup::AliEMCalTriggerTaskGroup() :
32  TNamed(),
33  fAnalysisComponents(NULL),
34  fEventSelection(NULL),
35  fBinning(NULL),
36  fKineCuts(NULL),
37  fWeightHandler(NULL)
38 {
39 }
40 
45  TNamed(name, ""),
46  fAnalysisComponents(NULL),
47  fEventSelection(NULL),
48  fBinning(NULL),
49  fKineCuts(NULL),
50  fWeightHandler(NULL)
51 {
52  fAnalysisComponents = new TObjArray();
53  fAnalysisComponents->SetOwner();
54 }
55 
62  TNamed(ref),
63  fAnalysisComponents(NULL),
64  fEventSelection(NULL),
65  fBinning(NULL),
66  fKineCuts(NULL),
67  fWeightHandler(NULL)
68 {
69  ref.Copy(*this);
70 }
71 
78  TNamed::operator=(ref);
79  if(this != &ref){
80  ref.Copy(*this);
81  }
82  return *this;
83 }
84 
91 }
92 
100  TIter compIter(fAnalysisComponents);
102  // Build a global histogram list
103  TList *histlist = new TList;
104  TObject *htmp(NULL);
105  while((ana = dynamic_cast<AliEMCalTriggerTracksAnalysisComponent *>(compIter()))){
106  ana->SetBinning(fBinning);
107  ana->SetKineCuts(fKineCuts);
108  ana->SetTriggerClassManager(classmgr);
110  ana->CreateHistos();
111  TList *ltmp = ana->GetHistList();
112  TIter hiter(ltmp);
113  while((htmp = hiter())) histlist->Add(htmp);
114  }
115  return histlist;
116 }
117 
124  if(fEventSelection && !fEventSelection->IsEventSelected(event)) return;
125  TIter compIter(fAnalysisComponents);
127  while((ana = dynamic_cast<AliEMCalTriggerTracksAnalysisComponent *>(compIter())))
128  ana->Process(event);
129 }
130 
138  fAnalysisComponents->Add(analysis);
139 }
140 
147  fWeightHandler = handler;
148  for(TIter compIter = TIter(fAnalysisComponents).Begin(); compIter != TIter::End(); ++compIter){
151  }
152 }
153 
159 void AliEMCalTriggerTaskGroup::Copy(TObject& other) const {
160  AliEMCalTriggerTaskGroup &target = static_cast<AliEMCalTriggerTaskGroup &>(other);
161  target.fKineCuts = fKineCuts;
162  target.fBinning = fBinning;
165  target.fAnalysisComponents = new TObjArray();
166  target.fAnalysisComponents->SetOwner(false);
167  for(TIter compIter = TIter(fAnalysisComponents).Begin(); compIter != TIter::End(); ++compIter){
168  target.fAnalysisComponents->Add(*compIter);
169  }
170 }
171 
172 } /* namespace EMCalTriggerPtAnalysis */
void ana(Int_t mode=mGRID)
Definition: ana.C:86
void AddAnalysisComponent(AliEMCalTriggerTracksAnalysisComponent *const analysis)
Base class for analysis components.
const AliEMCalTriggerWeightHandler * fWeightHandler
Weight handler for event weighting.
virtual bool IsEventSelected(const AliEMCalTriggerEventData *const ev) const
TList * InitialiseAnalysisComponents(const AliEMCalTriggerAnaClassManager *mgr=NULL)
void Process(const AliEMCalTriggerEventData *const event)
Container class for analysis components with common event selection.
AliEMCalTriggerTaskGroup & operator=(const AliEMCalTriggerTaskGroup &ref)
const AliEMCalTriggerBinningComponent * fBinning
Binning handler.
void SetWeightHandler(const AliEMCalTriggerWeightHandler *handler)
Base class for analysis components in the analysis of EMCAL-triggered events.
void SetBinning(const AliEMCalTriggerBinningComponent *const binning)
Class for event selection in the analysis of triggered events.
TObjArray * fAnalysisComponents
List of analysis components connected to the group.
virtual void Process(const AliEMCalTriggerEventData *const data)=0
void SetTriggerClassManager(const AliEMCalTriggerAnaClassManager *classmgr)
ClassImp(AliAnalysisTaskCRC) AliAnalysisTaskCRC
Simple event container within the high- track analysis.
const AliEMCalTriggerKineCuts * fKineCuts
Kinematical cuts shared by the task group.
const AliEMCalTriggerEventSelection * fEventSelection
Common event selection for the group.
Class for event selection (apart from trigger selection)
Container class for Analysis components with a common event selection.