]>
Commit | Line | Data |
---|---|---|
d7dd8a54 | 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 | // | |
31 | ////////////////////////////////////////////////////////////////////////////// | |
32 | ||
33 | #include <Riostream.h> | |
34 | ||
35 | #include "AliLog.h" | |
36 | #include "AliTriggerScalers.h" | |
37 | ||
66b0310c | 38 | using std::endl; |
39 | using std::cout; | |
d7dd8a54 | 40 | ClassImp( AliTriggerScalers ) |
41 | ||
42 | //_____________________________________________________________________________ | |
43 | AliTriggerScalers::AliTriggerScalers(): | |
44 | TObject(), | |
45 | fClassIndex(0), | |
46 | fLOCB(0), | |
47 | fLOCA(0), | |
48 | fL1CB(0), | |
49 | fL1CA(0), | |
50 | fL2CB(0), | |
51 | fL2CA(0) | |
52 | { | |
53 | // Default constructor | |
54 | } | |
55 | ||
56 | //_____________________________________________________________________________ | |
57 | AliTriggerScalers::AliTriggerScalers( UChar_t classIndex, UInt_t LOCB, UInt_t LOCA, | |
58 | UInt_t L1CB, UInt_t L1CA, UInt_t L2CB, UInt_t L2CA ): | |
59 | TObject(), | |
60 | fClassIndex( classIndex ), | |
61 | fLOCB(LOCB), | |
62 | fLOCA(LOCA), | |
63 | fL1CB(L1CB), | |
64 | fL1CA(L1CA), | |
65 | fL2CB(L2CB), | |
66 | fL2CA(L2CA) | |
67 | { | |
68 | // Default constructor | |
69 | } | |
70 | ||
71 | //_____________________________________________________________________________ | |
72 | Int_t AliTriggerScalers::Compare( const TObject* obj ) const | |
73 | { | |
74 | // Compare Scaler by class index (to sort in Scaler Record by class index) | |
75 | if( fClassIndex < ((AliTriggerScalers*)obj)->fClassIndex ) return -1; | |
76 | if( fClassIndex > ((AliTriggerScalers*)obj)->fClassIndex ) return 1; | |
77 | return 0; | |
78 | } | |
6414183f | 79 | //____________________________________________________________________________ |
80 | void AliTriggerScalers::GetAllScalers(UInt_t *scalers) const | |
81 | { | |
82 | scalers[0]=fLOCB; | |
83 | scalers[1]=fLOCA; | |
84 | scalers[2]=fL1CB; | |
85 | scalers[3]=fL1CA; | |
86 | scalers[4]=fL2CB; | |
87 | scalers[5]=fL2CA; | |
88 | } | |
d7dd8a54 | 89 | //_____________________________________________________________________________ |
90 | void AliTriggerScalers::Print( const Option_t* ) const | |
91 | { | |
92 | ||
93 | cout << "Trigger Scalers for Class: " << (Int_t)fClassIndex << endl; | |
94 | cout << " LOCB: " << fLOCB << " LOCA: " << fLOCA; //<< endl; | |
95 | cout << " L1CB: " << fL1CB << " L1CA: " << fL1CA; //<< endl; | |
96 | cout << " L2CB: " << fL2CB << " L2CA: " << fL2CA << endl; | |
97 | } |