Bug corrected.
[u/mrichter/AliRoot.git] / STEER / AliTriggerScalersESD.cxx
CommitLineData
56413996 1/*************************************************************************\r
2* Copyright(c) 1998-2008, ALICE Experiment at CERN, All rights reserved. *\r
3* *\r
4* Author: The ALICE Off-line Project. *\r
5* Contributors are mentioned in the code where appropriate. *\r
6* *\r
7* Permission to use, copy, modify and distribute this software and its *\r
8* documentation strictly for non-commercial purposes is hereby granted *\r
9* without fee, provided that the above copyright notice appears in all *\r
10* copies and that both the copyright notice and this permission notice *\r
11* appear in the supporting documentation. The authors make no claims *\r
12* about the suitability of this software for any purpose. It is *\r
13* provided "as is" without express or implied warranty. * **************************************************************************/\r
14\r
15///////////////////////////////////////////////////////////////////////////////\r
16//\r
17// Class to define the ALICE Trigger Scalers \r
18//\r
19// For each trigger class there are six scalers:\r
20//\r
21// LOCB L0 triggers before any vetos \r
22// LOCA L0 triggers after all vetos \r
23// L1CB L1 triggers before any vetos \r
24// L1CA L1 triggers after all vetos \r
25// L2CB L2 triggers before any vetos \r
26// L2CA L2 triggers after all vetos \r
27//\r
28//////////////////////////////////////////////////////////////////////////////\r
29\r
30#include <Riostream.h>\r
31\r
32#include "AliLog.h"\r
33#include "AliTriggerScalersESD.h"\r
34\r
35ClassImp( AliTriggerScalersESD )\r
36\r
37//_____________________________________________________________________________\r
38AliTriggerScalersESD::AliTriggerScalersESD(): \r
39 TObject(),\r
40 fClassIndex(0),\r
41 fLOCB(0), \r
42 fLOCA(0), \r
43 fL1CB(0), \r
44 fL1CA(0), \r
45 fL2CB(0), \r
46 fL2CA(0) \r
47{\r
48 // Default constructor\r
49}\r
50\r
51//_____________________________________________________________________________\r
52AliTriggerScalersESD::AliTriggerScalersESD( UChar_t classIndex, ULong64_t LOCB, ULong64_t LOCA, \r
53 ULong64_t L1CB, ULong64_t L1CA, ULong64_t L2CB, ULong64_t L2CA ): \r
54 TObject(),\r
55 fClassIndex( classIndex ),\r
56 fLOCB(LOCB), \r
57 fLOCA(LOCA), \r
58 fL1CB(L1CB), \r
59 fL1CA(L1CA), \r
60 fL2CB(L2CB), \r
61 fL2CA(L2CA) \r
62{\r
63 // Default constructor\r
64}\r
4994d351 65//_____________________________________________________________________________\r
a7a2d653 66AliTriggerScalersESD::AliTriggerScalersESD(UChar_t classIndex,ULong64_t* s64):\r
67TObject(),\r
68fClassIndex( classIndex ),\r
69fLOCB(s64[0]), \r
70fLOCA(s64[1]), \r
71fL1CB(s64[2]), \r
72fL1CA(s64[3]), \r
73fL2CB(s64[4]), \r
74fL2CA(s64[5]) \r
75{\r
76 // Construct from array\r
77}\r
78//_____________________________________________________________________________\r
4994d351 79AliTriggerScalersESD::AliTriggerScalersESD(const AliTriggerScalersESD& scal ): \r
80 TObject(scal),\r
81 fClassIndex( scal.fClassIndex ),\r
82 fLOCB(scal.fLOCB), \r
83 fLOCA(scal.fLOCA), \r
84 fL1CB(scal.fL1CB), \r
85 fL1CA(scal.fL1CA), \r
86 fL2CB(scal.fL2CB), \r
87 fL2CA(scal.fL2CA) \r
88{\r
89 // Copy constructor\r
90}\r
4994d351 91//_____________________________________________________________________________\r
92AliTriggerScalersESD& AliTriggerScalersESD::operator=(const AliTriggerScalersESD& scal)\r
93{\r
94if(&scal == this) return *this;\r
95((TObject *)this)->operator=(scal);\r
96\r
97 fClassIndex = scal.fClassIndex;\r
98 fLOCB = scal.fLOCB; \r
99 fLOCA = scal.fLOCA; \r
100 fL1CB = scal.fL1CB; \r
101 fL1CA = scal.fL1CA; \r
102 fL2CB = scal.fL2CB; \r
103 fL2CA = scal.fL2CA;\r
104\r
105return *this;\r
106}\r
a7a2d653 107//____________________________________________________________________________\r
108void AliTriggerScalersESD::GetAllScalers(ULong64_t *scalers) const\r
109{\r
110 scalers[0]=fLOCB;\r
111 scalers[1]=fLOCA;\r
112 scalers[2]=fL1CB;\r
113 scalers[3]=fL1CA;\r
114 scalers[4]=fL2CB;\r
115 scalers[5]=fL2CA;\r
116}\r
56413996 117//_____________________________________________________________________________\r
118void AliTriggerScalersESD::Print( const Option_t* ) const\r
119{\r
120 // Print\r
121 cout << "Trigger Scalers for Class: " << (Int_t)fClassIndex << endl;\r
122 cout << " LOCB: " << fLOCB << " LOCA: " << fLOCA; //<< endl;\r
123 cout << " L1CB: " << fL1CB << " L1CA: " << fL1CA; //<< endl;\r
124 cout << " L2CB: " << fL2CB << " L2CA: " << fL2CA << endl;\r
125}\r