]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/ESD/AliTriggerScalersESD.cxx
end-of-line normalization
[u/mrichter/AliRoot.git] / STEER / ESD / AliTriggerScalersESD.cxx
1 /*************************************************************************
2 * Copyright(c) 1998-2008, 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 //
18 //  Class to define the ALICE Trigger Scalers  
19 //
20 //  For each trigger class there are six scalers:
21 //
22 //    LOCB       L0 triggers before any vetos 
23 //    LOCA       L0 triggers after all vetos 
24 //    L1CB       L1 triggers before any vetos 
25 //    L1CA       L1 triggers after all vetos 
26 //    L2CB       L2 triggers before any vetos 
27 //    L2CA       L2 triggers after all vetos 
28 //
29 //////////////////////////////////////////////////////////////////////////////
30
31 #include <Riostream.h>
32
33 #include "AliLog.h"
34 #include "AliTriggerScalersESD.h"
35
36 using std::endl;
37 using std::cout;
38 ClassImp( AliTriggerScalersESD )
39
40 //_____________________________________________________________________________
41 AliTriggerScalersESD::AliTriggerScalersESD(): 
42   TObject(),
43   fClassIndex(0),
44   fLOCB(0),     
45   fLOCA(0),     
46   fL1CB(0),     
47   fL1CA(0),     
48   fL2CB(0),     
49   fL2CA(0)      
50 {
51   // Default constructor
52 }
53
54 //_____________________________________________________________________________
55 AliTriggerScalersESD::AliTriggerScalersESD( UChar_t classIndex, ULong64_t LOCB, ULong64_t LOCA,        
56                                       ULong64_t L1CB, ULong64_t L1CA, ULong64_t L2CB, ULong64_t L2CA ):   
57   TObject(),
58   fClassIndex( classIndex ),
59   fLOCB(LOCB),     
60   fLOCA(LOCA),     
61   fL1CB(L1CB),     
62   fL1CA(L1CA),     
63   fL2CB(L2CB),     
64   fL2CA(L2CA)      
65 {
66   // Default constructor
67 }
68 //_____________________________________________________________________________
69 AliTriggerScalersESD::AliTriggerScalersESD(UChar_t classIndex,ULong64_t* s64):
70 TObject(),
71 fClassIndex( classIndex ),
72 fLOCB(s64[0]),     
73 fLOCA(s64[1]),     
74 fL1CB(s64[2]),     
75 fL1CA(s64[3]),     
76 fL2CB(s64[4]),     
77 fL2CA(s64[5])      
78 {
79  // Construct from array
80 }
81 //_____________________________________________________________________________
82 AliTriggerScalersESD::AliTriggerScalersESD(const AliTriggerScalersESD& scal ):   
83   TObject(scal),
84   fClassIndex( scal.fClassIndex ),
85   fLOCB(scal.fLOCB),     
86   fLOCA(scal.fLOCA),     
87   fL1CB(scal.fL1CB),     
88   fL1CA(scal.fL1CA),     
89   fL2CB(scal.fL2CB),     
90   fL2CA(scal.fL2CA)      
91 {
92   // Copy constructor
93 }
94 //_____________________________________________________________________________
95 AliTriggerScalersESD& AliTriggerScalersESD::operator=(const AliTriggerScalersESD& scal)
96 {
97 if(&scal == this) return *this;
98 ((TObject *)this)->operator=(scal);
99
100   fClassIndex = scal.fClassIndex;
101   fLOCB = scal.fLOCB;     
102   fLOCA = scal.fLOCA;     
103   fL1CB = scal.fL1CB;     
104   fL1CA = scal.fL1CA;     
105   fL2CB = scal.fL2CB;     
106   fL2CA = scal.fL2CA;
107
108 return *this;
109 }
110 //____________________________________________________________________________
111 void AliTriggerScalersESD::GetAllScalers(ULong64_t *scalers) const
112 {
113  scalers[0]=fLOCB;
114  scalers[1]=fLOCA;
115  scalers[2]=fL1CB;
116  scalers[3]=fL1CA;
117  scalers[4]=fL2CB;
118  scalers[5]=fL2CA;
119 }
120 //_____________________________________________________________________________
121 void AliTriggerScalersESD::Print( const Option_t* ) const
122 {
123    // Print
124   cout << "Trigger Scalers for Class: " << (Int_t)fClassIndex << endl;
125   cout << "  LOCB: " << fLOCB << " LOCA: " << fLOCA; //<< endl;
126   cout << "  L1CB: " << fL1CB << " L1CA: " << fL1CA; //<< endl;
127   cout << "  L2CB: " << fL2CB << " L2CA: " << fL2CA << endl;
128 }