Line data Source code
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 : /* $Id: AliTriggerScalers.cxx 22322 2007-11-22 11:43:14Z cvetan $ */
17 :
18 : ///////////////////////////////////////////////////////////////////////////////
19 : //
20 : // Class to define the ALICE Trigger Scalers
21 : //
22 : // For each trigger class there are six scalers:
23 : //
24 : // LOCB L0 triggers before any vetos
25 : // LOCA L0 triggers after all vetos
26 : // L1CB L1 triggers before any vetos
27 : // L1CA L1 triggers after all vetos
28 : // L2CB L2 triggers before any vetos
29 : // L2CA L2 triggers after all vetos
30 : // LMCB LM triggers before any vetos
31 : // LMCA LM triggers after all vetos
32 : //
33 : //////////////////////////////////////////////////////////////////////////////
34 :
35 : #include <Riostream.h>
36 :
37 : #include "AliLog.h"
38 : #include "AliTriggerScalers.h"
39 :
40 : using std::endl;
41 : using std::cout;
42 176 : ClassImp( AliTriggerScalers )
43 :
44 : //_____________________________________________________________________________
45 : AliTriggerScalers::AliTriggerScalers():
46 2 : TObject(),
47 2 : fClassIndex(0),
48 2 : fLOCB(0),
49 2 : fLOCA(0),
50 2 : fL1CB(0),
51 2 : fL1CA(0),
52 2 : fL2CB(0),
53 2 : fL2CA(0),
54 2 : fLMCB(0),
55 2 : fLMCA(0)
56 10 : {
57 : // Default constructor
58 4 : }
59 :
60 : //_____________________________________________________________________________
61 : AliTriggerScalers::AliTriggerScalers( UChar_t classIndex, UInt_t LOCB, UInt_t LOCA,
62 : UInt_t L1CB, UInt_t L1CA, UInt_t L2CB, UInt_t L2CA ):
63 0 : TObject(),
64 0 : fClassIndex( classIndex ),
65 0 : fLOCB(LOCB),
66 0 : fLOCA(LOCA),
67 0 : fL1CB(L1CB),
68 0 : fL1CA(L1CA),
69 0 : fL2CB(L2CB),
70 0 : fL2CA(L2CA),
71 0 : fLMCB(0),
72 0 : fLMCA(0)
73 0 : {
74 : // Default constructor for L0,L1,L2 levels
75 0 : }
76 : //_____________________________________________________________________________
77 : AliTriggerScalers::AliTriggerScalers( UChar_t classIndex, UInt_t LOCB, UInt_t LOCA,
78 : UInt_t L1CB, UInt_t L1CA, UInt_t L2CB, UInt_t L2CA, UInt_t LMCB,UInt_t LMCA ):
79 0 : TObject(),
80 0 : fClassIndex( classIndex ),
81 0 : fLOCB(LOCB),
82 0 : fLOCA(LOCA),
83 0 : fL1CB(L1CB),
84 0 : fL1CA(L1CA),
85 0 : fL2CB(L2CB),
86 0 : fL2CA(L2CA),
87 0 : fLMCB(LMCB),
88 0 : fLMCA(LMCA)
89 0 : {
90 : // Constructor for L0,L1,L2,LM levels
91 0 : }
92 :
93 : //_____________________________________________________________________________
94 : Int_t AliTriggerScalers::Compare( const TObject* obj ) const
95 : {
96 : // Compare Scaler by class index (to sort in Scaler Record by class index)
97 0 : if( fClassIndex < ((AliTriggerScalers*)obj)->fClassIndex ) return -1;
98 0 : if( fClassIndex > ((AliTriggerScalers*)obj)->fClassIndex ) return 1;
99 0 : return 0;
100 0 : }
101 : //____________________________________________________________________________
102 : void AliTriggerScalers::GetAllScalers(UInt_t *scalers) const
103 : {
104 4 : scalers[0]=fLOCB;
105 2 : scalers[1]=fLOCA;
106 2 : scalers[2]=fL1CB;
107 2 : scalers[3]=fL1CA;
108 2 : scalers[4]=fL2CB;
109 2 : scalers[5]=fL2CA;
110 2 : }
111 : //____________________________________________________________________________
112 : void AliTriggerScalers::GetAllScalersM012(UInt_t *scalers) const
113 : {
114 0 : scalers[2]=fLOCB;
115 0 : scalers[3]=fLOCA;
116 0 : scalers[4]=fL1CB;
117 0 : scalers[5]=fL1CA;
118 0 : scalers[6]=fL2CB;
119 0 : scalers[7]=fL2CA;
120 0 : scalers[0]=fLMCB;
121 0 : scalers[1]=fLMCA;
122 0 : }
123 : //_____________________________________________________________________________
124 : void AliTriggerScalers::Print( const Option_t* ) const
125 : {
126 : // Print
127 0 : cout << "Trigger Scalers for Class: " << (Int_t)fClassIndex << endl;
128 0 : cout << " LOCB: " << fLOCB << " LOCA: " << fLOCA; //<< endl;
129 0 : cout << " L1CB: " << fL1CB << " L1CA: " << fL1CA; //<< endl;
130 0 : cout << " L2CB: " << fL2CB << " L2CA: " << fL2CA << endl;
131 0 : cout << " LMCB: " << fLMCB << " LMCA: " << fLMCA << endl;
132 0 : }
|