Fixing coding violations (Livio, Pietro)
[u/mrichter/AliRoot.git] / PWG3 / AliAODEventInfo.cxx
CommitLineData
aba89748 1// AliAODEventInfo: a class for AODs for the MUON Arm of the ALICE Experiment
2// Author: P. Cortese, Universita' del Piemonte Orientale in Alessandria and
3// INFN of Torino - Italy
4//
5// This class provides additional information about the AliAODEvent, some
6// of this is specific to MUON. The information stored in this class will
7// follow the evolution of the framework (i.e. some data members may be
8// moved into the header in the future).
9// Currently it stores the beam energy and the information needed to decode
10// the trigger pattern (which are the bits corresponding to the different
11// muon triggers).
12//
71b7d225 13
14#include "AliAODEventInfo.h"
aba89748 15#include "AliAODHeader.h"
71b7d225 16#define AliAODEventInfo_CXX
17
18// ************************************************************************** //
19ClassImp(AliAODEventInfo)
20
21//______________________________________________________________________________
22AliAODEventInfo::AliAODEventInfo():fBeamEnergy(0),
aba89748 23 fMuonSingleLPtL0(0),fMuonSingleHPtL0(0),fMuonLikeLPtL0(0),
24 fMuonLikeHPtL0(0),fMuonUnlikeLPtL0(0),fMuonUnlikeHPtL0(0),
25 fEv(0),fEi(this),fHe(0),fTr(0),fDi(0)
71b7d225 26{
aba89748 27 // Default constructor
71b7d225 28}
29
30//______________________________________________________________________________
31AliAODEventInfo::~AliAODEventInfo()
32{
aba89748 33 // Default destructor
71b7d225 34}
35
36//______________________________________________________________________________
aba89748 37Bool_t AliAODEventInfo::IsHeaderAccessible(Char_t *msg) const {
38 // Tests if the header pointer is set
39 if(fHe!=0){
71b7d225 40 return 1;
41 }else{
42 if(msg)printf("Error! Header is not accessible: %s",msg);
43 return 0;
44 }
45}
46
47//______________________________________________________________________________
aba89748 48void AliAODEventInfo::SelectTriggerBits(UChar_t muonSingleLPtL0,
49 UChar_t muonSingleHPtL0,UChar_t muonLikeLPtL0, UChar_t muonLikeHPtL0,
50 UChar_t muonUnlikeLPtL0, UChar_t muonUnlikeHPtL0){
51 // Define which bit in the trigger pattern corresponds to the given trigger condition
52 fMuonSingleLPtL0=muonSingleLPtL0;
53 fMuonSingleHPtL0=muonSingleHPtL0;
54 fMuonLikeLPtL0=muonLikeLPtL0;
55 fMuonLikeHPtL0=muonLikeHPtL0;
56 fMuonUnlikeLPtL0=muonUnlikeLPtL0;
57 fMuonUnlikeHPtL0=muonUnlikeHPtL0;
58}
59
60//______________________________________________________________________________
61Bool_t AliAODEventInfo::MuonSingleLPtL0() const {
62 // Test if the event fired MUON_Single_LPt_L0
63 if(IsHeaderAccessible("MuonSingleLPtL0"))
64 return ((((AliAODHeader*)fHe.GetObject())->GetTriggerMask())>>fMuonSingleLPtL0)&0x1;
71b7d225 65 else
66 return 0;
67}
68
aba89748 69//__________________________________________
70Bool_t AliAODEventInfo::MuonSingleHPtL0() const {
71 // Test if the event fired MUON_Single_HPt_L0
72 if(IsHeaderAccessible("MuonSingleHPtL0"))
73 return ((((AliAODHeader*)fHe.GetObject())->GetTriggerMask())>>fMuonSingleHPtL0)&0x1;
71b7d225 74 else
75 return 0;
76}
77
aba89748 78//__________________________________________
79Bool_t AliAODEventInfo::MuonLikeLPtL0() const {
80 // Test if the event fired MUON_Like_LPt_L0
81 if(IsHeaderAccessible("MuonLikeLPtL0"))
82 return ((((AliAODHeader*)fHe.GetObject())->GetTriggerMask())>>fMuonLikeLPtL0)&0x1;
71b7d225 83 else
84 return 0;
85}
86
aba89748 87//__________________________________________
88Bool_t AliAODEventInfo::MuonLikeHPtL0() const {
89 // Test if the event fired MUON_Like_HPt_L0
90 if(IsHeaderAccessible("MuonLikeHPtL0"))
91 return ((((AliAODHeader*)fHe.GetObject())->GetTriggerMask())>>fMuonLikeHPtL0)&0x1;
71b7d225 92 else
93 return 0;
94}
95
aba89748 96//__________________________________________
97Bool_t AliAODEventInfo::MuonUnlikeLPtL0() const {
98 // Test if the event fired MUON_Unlike_LPt_L0
99 if(IsHeaderAccessible("MuonUnlikeLPtL0"))
100 return ((((AliAODHeader*)fHe.GetObject())->GetTriggerMask())>>fMuonUnlikeLPtL0)&0x1;
71b7d225 101 else
102 return 0;
103}
104
aba89748 105//__________________________________________
106Bool_t AliAODEventInfo::MuonUnlikeHPtL0() const {
107 // Test if the event fired MUON_Unlike_HPt_L0
108 if(IsHeaderAccessible("MuonUnlikeHPtL0"))
109 return ((((AliAODHeader*)fHe.GetObject())->GetTriggerMask())>>fMuonUnlikeHPtL0)&0x1;
71b7d225 110 else
111 return 0;
112}