777fcd8b |
1 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * |
2 | * See cxx source for full Copyright notice */ |
3 | |
4 | // $Id$ |
5 | // $MpId: AliMpCathodType.h,v 1.8 2006/05/24 13:58:07 ivana Exp $ |
6 | |
3d1463c8 |
7 | //----------------------------------------------------------------------------- |
78649106 |
8 | // \ingroup basic |
9 | // \enum AliMpCathodType |
10 | // Enumeration for refering to cath0 and cath1. |
11 | // |
12 | // \author Ivana Hrivnacova; IPN Orsay |
3d1463c8 |
13 | //----------------------------------------------------------------------------- |
777fcd8b |
14 | |
15 | #include "AliMpCathodType.h" |
16 | |
17 | #include "AliLog.h" |
18 | |
19 | //_____________________________________________________________________________ |
20 | AliMp::CathodType AliMp::GetCathodType(Int_t cathodNumber) |
21 | { |
22 | switch ( cathodNumber ) { |
23 | case kCath0: return kCath0; break; |
24 | case kCath1: return kCath1; break; |
25 | default: |
26 | // Should reach this line |
27 | AliErrorGeneral("AliMpCathodType.h", "Wrong cathod number"); |
28 | return kCath0; |
29 | } |
30 | |
31 | // Should reach this line |
32 | AliErrorGeneral("AliMpCathodType.h", "Wrong cathod number"); |
33 | return kCath0; |
34 | } |
35 | |
36 | //_____________________________________________________________________________ |
37 | TString AliMp::CathodTypeName(AliMp::CathodType cathodType) |
38 | { |
39 | switch ( cathodType ) { |
40 | case kCath0: return "cath0"; break; |
41 | case kCath1: return "cath1"; break; |
42 | } |
43 | |
44 | // Cannot reach this line |
45 | AliFatalGeneral("AliMpCathodType.h", "Unknown cathod type"); |
46 | return "invalidCathod"; |
47 | } |
48 | |
49 | //_____________________________________________________________________________ |
50 | AliMp::CathodType AliMp::OtherCathodType(AliMp::CathodType cathodType) |
51 | { |
52 | switch ( cathodType ) { |
53 | case kCath0: return kCath1; break; |
54 | case kCath1: return kCath0; break; |
55 | } |
56 | |
57 | // Cannot reach this line |
58 | AliFatalGeneral("AliMpCathodType.h", "Unknown cathod type"); |
59 | return kCath0; |
60 | } |