AliPhysics  vAN-20150630 (513c479)
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros
AliEMCalTriggerAnaClassManager.cxx
Go to the documentation of this file.
1 /**************************************************************************
2  * Copyright(c) 1998-2015, 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 <TObjArray.h>
16 
20 
24 
25 namespace EMCalTriggerPtAnalysis {
26 
30 AliEMCalTriggerAnaClassManager::AliEMCalTriggerAnaClassManager():
31  TNamed(),
32  fTriggerClasses(NULL),
33  fSelected(NULL)
34 {
35 }
36 
42  TNamed(name, ""),
43  fTriggerClasses(NULL),
44  fSelected(NULL)
45 {
46  fTriggerClasses = new TObjArray;
47  fTriggerClasses->SetOwner(kTRUE);
48  fSelected = new TObjArray;
49  fSelected->SetOwner(kFALSE);
50 }
51 
57  if(fSelected) delete fSelected;
58 }
59 
66  fSelected->Clear();
67  if(!fTriggerClasses->GetEntries()) throw TriggerManagerEmptyException();
68  for(TIter clsiter = TIter(fTriggerClasses).Begin(); clsiter != TIter::End(); ++clsiter){
69  AliEMCalTriggerAnaTriggerClass * myclass = static_cast<AliEMCalTriggerAnaTriggerClass *>(*clsiter);
70  if(myclass->IsEventTriggered(trgevent)) fSelected->Add(myclass);
71  }
72 }
73 
79  fTriggerClasses->Add(triggerclass);
80 }
86  for(TIter clsiter = TIter(fTriggerClasses).Begin(); clsiter != TIter::End(); ++clsiter){
87  (static_cast<AliEMCalTriggerAnaTriggerClass *>(*clsiter))->SetTriggerDecisionHandler(triggerdecision);
88  }
89 }
90 
96  bool result = kFALSE;
97  for(TIter clsiter = TIter(fSelected).Begin(); clsiter != TIter::End(); ++clsiter){
98  if((static_cast<AliEMCalTriggerAnaTriggerClass *>(*clsiter))->IsMinBiasTrigger()){
99  result = kTRUE;
100  break;
101  }
102  }
103  return kTRUE;
104 }
105 
112  if(!fTriggerClasses->GetEntries()) throw TriggerManagerEmptyException();
113  return fSelected;
114 }
121  if(!fTriggerClasses->GetEntries()) throw TriggerManagerEmptyException();
122  return fTriggerClasses;
123 }
124 
125 } /* namespace EMCalTriggerPtAnalysis */
Class performing the selection of triggered events.
ClassImp(AliAnalysisTaskTriggerRates) AliAnalysisTaskTriggerRates
Declaration of class AliEMCalTriggerAnaTriggerDecision, a container for trigger decision in EMCAL-tri...
void SetTriggerDecision(AliEMCalTriggerAnaTriggerDecision *triggerdecision)
TObjArray * fSelected
List of selected trigger classes.
Exception handling in case event selection is performed on an empty trigger manager.
void AddTriggerClass(AliEMCalTriggerAnaTriggerClass *triggerclass)
Declaration of a management class for trigger classes.
Simple event container within the high- track analysis.
bool IsEventTriggered(const AliEMCalTriggerEventData *const) const
Definition of a trigger class.