]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONGlobalTrigger.cxx
Doxygen warnings fixed
[u/mrichter/AliRoot.git] / MUON / AliMUONGlobalTrigger.cxx
1 /**************************************************************************
2  * Copyright(c) 1998-1999, 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
17 /* $Id$ */
18
19
20 #include "AliMUONGlobalTrigger.h"
21 #include "AliLog.h"
22 #include "AliMUONLocalStruct.h"
23
24 //-----------------------------------------------------------------------------
25 /// \class AliMUONGlobalTrigger
26 /// Global Trigger algorithm data output.
27 /// Built from Local and Regional algorithms.                          \n 
28 /// Update for copy & assigment operator,
29 /// add SetGlobalPattern and GetGlobalPattern method for rawdata 
30 /// (Ch. Finck)
31 /// \author Ph. Crochet
32 //-----------------------------------------------------------------------------
33
34 /// \cond CLASSIMP
35 ClassImp(AliMUONGlobalTrigger)
36 /// \endcond
37
38 //----------------------------------------------------------------------
39 AliMUONGlobalTrigger::AliMUONGlobalTrigger()
40   : TObject(),
41     fSingleLpt(0),
42     fSingleHpt(0),
43       
44     fPairUnlikeLpt(0),
45     fPairUnlikeHpt(0),
46     
47     fPairLikeLpt(0),
48     fPairLikeHpt(0)
49
50   /// Default constructor 
51       AliDebug(1,Form("this=%p",this));
52 }
53
54 //----------------------------------------------------------------------
55 AliMUONGlobalTrigger::AliMUONGlobalTrigger(const AliMUONGlobalTrigger& theMUONGlobalTrig)
56   : TObject(theMUONGlobalTrig),
57   
58     fSingleLpt(theMUONGlobalTrig.fSingleLpt),
59     fSingleHpt(theMUONGlobalTrig.fSingleHpt),
60     
61     fPairUnlikeLpt(theMUONGlobalTrig.fPairUnlikeLpt),
62     fPairUnlikeHpt(theMUONGlobalTrig.fPairUnlikeHpt),
63     
64     fPairLikeLpt(theMUONGlobalTrig.fPairLikeLpt),
65     fPairLikeHpt(theMUONGlobalTrig.fPairLikeHpt)
66 {
67   /// Copy constructor
68       AliDebug(1,Form("this=%p copy ctor",this));
69
70 }
71
72 //----------------------------------------------------------------------
73 AliMUONGlobalTrigger::~AliMUONGlobalTrigger()
74 {
75   /// Destructor
76   AliDebug(1,Form("this=%p",this));
77 }
78
79 //----------------------------------------------------------------------
80 AliMUONGlobalTrigger& AliMUONGlobalTrigger::operator=(const AliMUONGlobalTrigger& theMUONGlobalTrig)
81 {
82   /// Assignement operator;
83   /// equal operator (useful for non-pointer member in TClonesArray)
84
85   if (this == &theMUONGlobalTrig)
86     return *this;
87     
88   // base class assignement
89   TObject::operator=(theMUONGlobalTrig);
90
91   fSingleLpt  = theMUONGlobalTrig.fSingleLpt;
92   fSingleHpt  = theMUONGlobalTrig.fSingleHpt;
93   
94   fPairUnlikeLpt  = theMUONGlobalTrig.fPairUnlikeLpt;
95   fPairUnlikeHpt  = theMUONGlobalTrig.fPairUnlikeHpt;
96   
97   fPairLikeLpt    = theMUONGlobalTrig.fPairLikeLpt;
98   fPairLikeHpt    = theMUONGlobalTrig.fPairLikeHpt;
99
100   return *this;
101 }
102
103 //-----------------------------------------------------------
104 void AliMUONGlobalTrigger::SetFromGlobalResponse(UShort_t globalResponse)
105 {
106   /// Set class members from global response
107   /// coming from rawdata & global trigger board
108   /// [US:2, LS:2, Single:2] with [Hpt, Lpt]
109   /// remove Apt
110
111   // don't have the information anymore of the sign
112   fSingleLpt = globalResponse & 0x1;
113   fSingleHpt = (globalResponse >> 1) & 0x1;
114
115   fPairUnlikeLpt = (globalResponse >> 4)  & 0x1;
116   fPairUnlikeHpt = (globalResponse >> 5)  & 0x1;
117   
118   fPairLikeLpt = (globalResponse >> 2)  & 0x1;
119   fPairLikeHpt = (globalResponse >> 3)  & 0x1;
120   
121 }
122
123 //-----------------------------------------------------------
124 UChar_t AliMUONGlobalTrigger::GetGlobalResponse() const
125 {
126   /// Global trigger response
127   /// from class member values
128   /// [US:2, LS:2, Single:2] with [Hpt, Lpt]
129
130   Int_t response = 0;
131
132   if (SingleLpt())     response|= 0x1;
133   if (SingleHpt())     response|= 0x2;
134
135   if (PairLikeLpt())   response|= 0x4;
136   if (PairLikeHpt())   response|= 0x8;
137  
138   if (PairUnlikeLpt()) response|= 0x10;
139   if (PairUnlikeHpt()) response|= 0x20;
140
141   return response;
142 }
143 //----------------------------------------------------------------------
144 void AliMUONGlobalTrigger::Print(Option_t*) const
145 {
146   ///
147   /// Printing Global Trigger information
148   ///
149       printf("=============================================\n");
150       printf(" Global Trigger output       Low pt  High pt\n");
151       printf(" Single                    :\t");
152       printf("%i\t%i\t",SingleLpt(),SingleHpt());
153       printf("\n");
154       
155       printf(" UnlikeSign pair           :\t"); 
156       printf("%i\t%i\t",PairUnlikeLpt(),PairUnlikeHpt());
157       printf("\n");
158       
159       printf(" LikeSign pair             :\t");  
160       printf("%i\t%i\t",PairLikeLpt(),PairLikeHpt());
161       printf("\n");
162       
163       printf("=============================================\n");
164
165 }
166
167