ATLAS Offline Software
PRDDetTypes.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 //______________________________________________
9 {
10  switch (t) {
11  case Pixel: return "Pixel";
12  case SCT: return "SCT";
13  case TRT: return "TRT";
14  case CSC: return "CSC";
15  case CSCstrip: return "CSCstrip";
16  case RPC: return "RPC";
17  case TGC: return "TGC";
18  case sTGC: return "sTGC";
19  case MDT: return "MDT";
20  case MM: return "MM";
21  case SpacePoints: return "SpacePoints";
22  default: return "UNKNOWN";
23  }
24 }
25 
26 //______________________________________________
28 {
29  status = true;
30  if (str=="Pixel") return Pixel;
31  if (str=="SCT") return SCT;
32  if (str=="TRT") return TRT;
33  if (str=="CSC") return CSC;
34  if (str=="CSCstrip") return CSCstrip;
35  if (str=="RPC") return RPC;
36  if (str=="TGC") return TGC;
37  if (str=="sTGC") return sTGC;
38  if (str=="MDT") return MDT;
39  if (str=="MM") return MM;
40  if (str=="SpacePoints") return SpacePoints;
41  status = false;
42  return Pixel;//people better watch the return status!
43 }
44 
45 
46 //______________________________________________
48 {
49  switch (t) {
50  case Pixel: return 0;
51  case SCT: return 1;
52  case TRT: return 2;
53  case CSC: return 3;
54  case RPC: return 4;
55  case TGC: return 5;
56  case MDT: return 6;
57  case SpacePoints: return 7;
58  case CSCstrip: return 8;
59  case sTGC: return 9;
60  case MM: return 10;
61  default: return -1;
62  }
63 }
64 
65 //______________________________________________
67 {
68  status = true;
69  switch (i) {
70  case 0: return Pixel;
71  case 1: return SCT;
72  case 2: return TRT;
73  case 3: return CSC;
74  case 4: return RPC;
75  case 5: return TGC;
76  case 6: return MDT;
77  case 7: return SpacePoints;
78  case 8: return CSCstrip;
79  case 9: return sTGC;
80  case 10: return MM;
81  default:
82  status = false;
83  return Pixel;//people better watch the return status!
84  }
85 }
PRDDetType::MM
@ MM
Definition: PRDDetTypes.h:13
PRDDetType::CSC
@ CSC
Definition: PRDDetTypes.h:13
PRDDetType::SpacePoints
@ SpacePoints
Definition: PRDDetTypes.h:13
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
PRDDetType::SCT
@ SCT
Definition: PRDDetTypes.h:13
PRDDetType::Type
Type
Definition: PRDDetTypes.h:12
PRDDetType::RPC
@ RPC
Definition: PRDDetTypes.h:13
lumiFormat.i
int i
Definition: lumiFormat.py:92
PRDDetType::typeToInt
static qint32 typeToInt(const Type &t)
Definition: PRDDetTypes.cxx:47
xAODType
Definition: ObjectType.h:13
PRDDetType::intToType
static Type intToType(const qint32 &i, bool &status)
Definition: PRDDetTypes.cxx:66
PRDDetType::CSCstrip
@ CSCstrip
Definition: PRDDetTypes.h:13
PRDDetType::sTGC
@ sTGC
Definition: PRDDetTypes.h:13
PRDDetType::MDT
@ MDT
Definition: PRDDetTypes.h:13
PRDDetType::Pixel
@ Pixel
Definition: PRDDetTypes.h:13
str
Definition: BTagTrackIpAccessor.cxx:11
merge.status
status
Definition: merge.py:17
PRDDetType::stringToType
static Type stringToType(const QString &str, bool &status)
Definition: PRDDetTypes.cxx:27
PRDDetType::TGC
@ TGC
Definition: PRDDetTypes.h:13
PRDDetType::TRT
@ TRT
Definition: PRDDetTypes.h:13
PRDDetTypes.h
PRDDetType::typeToString
static QString typeToString(const Type &)
Definition: PRDDetTypes.cxx:8