AliPhysics  vAN-20150429 (ffa5c54)
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros
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 
99  TIter compIter(fAnalysisComponents);
101  // Build a global histogram list
102  TList *histlist = new TList;
103  TObject *htmp(NULL);
104  while((ana = dynamic_cast<AliEMCalTriggerTracksAnalysisComponent *>(compIter()))){
105  ana->SetBinning(fBinning);
106  ana->SetKineCuts(fKineCuts);
108  ana->CreateHistos();
109  TList *ltmp = ana->GetHistList();
110  TIter hiter(ltmp);
111  while((htmp = hiter())) histlist->Add(htmp);
112  }
113  return histlist;
114 }
115 
122  if(fEventSelection && !fEventSelection->IsEventSelected(event)) return;
123  TIter compIter(fAnalysisComponents);
125  while((ana = dynamic_cast<AliEMCalTriggerTracksAnalysisComponent *>(compIter())))
126  ana->Process(event);
127 }
128 
136  fAnalysisComponents->Add(analysis);
137 }
138 
145  const AliEMCalTriggerAnaTriggerDecision* trigger) {
147  TIter compIter(fAnalysisComponents);
148  while((myana = dynamic_cast<AliEMCalTriggerTracksAnalysisComponent *>(compIter())))
149  myana->SetTriggerDecision(trigger);
150 }
151 
158  fWeightHandler = handler;
159  for(TIter compIter = TIter(fAnalysisComponents).Begin(); compIter != TIter::End(); ++compIter){
162  }
163 }
164 
170 void AliEMCalTriggerTaskGroup::Copy(TObject& other) const {
171  AliEMCalTriggerTaskGroup &target = static_cast<AliEMCalTriggerTaskGroup &>(other);
172  target.fKineCuts = fKineCuts;
173  target.fBinning = fBinning;
176  target.fAnalysisComponents = new TObjArray();
177  target.fAnalysisComponents->SetOwner(false);
178  for(TIter compIter = TIter(fAnalysisComponents).Begin(); compIter != TIter::End(); ++compIter){
179  target.fAnalysisComponents->Add(*compIter);
180  }
181 }
182 
183 } /* namespace EMCalTriggerPtAnalysis */
Class performing the selection of triggered events.
ClassImp(AliAnalysisTaskTriggerRates) AliAnalysisTaskTriggerRates
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.
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)
void SetTriggerDecision(const AliEMCalTriggerAnaTriggerDecision *trigger)
Base class for analysis components in the analysis of EMCAL-triggered events.
void SetBinning(const AliEMCalTriggerBinningComponent *const binning)
TObjArray * fAnalysisComponents
List of analysis components connected to the group.
virtual void Process(const AliEMCalTriggerEventData *const data)=0
const AliEMCalTriggerKineCuts * fKineCuts
Kinematical cuts shared by the task group.
const AliEMCalTriggerEventSelection * fEventSelection
Common event selection for the group.
void SetTriggerDecision(const AliEMCalTriggerAnaTriggerDecision *trigger)
virtual bool IsEventSelected(const AliEMCalTriggerEventData *const ev) const
Container class for Analysis components with a common event selection.