#include <sTGCDetectorHelper.h>
Definition at line 24 of file sTGCDetectorHelper.h.
◆ sTGCDetectorHelper()
| sTGCDetectorHelper::sTGCDetectorHelper |
( |
| ) |
|
Definition at line 16 of file sTGCDetectorHelper.cxx.
17{
18 if (
m_svc.retrieve().isFailure()) {
19 std::abort();
20 }
23
24 for ( const auto& vl_iter: vl)
25 {
26 sTGCDetectorDescription*
st=
dynamic_cast<sTGCDetectorDescription*
>(vl_iter.second);
27 if (st) {
30 }
31 }
32
33}
std::map< std::string, AGDDDetector * > detectorList
CxxUtils::LockedPointer< AGDDController > LockedController
sTGCMapSubType m_sTGCListSubType
ServiceHandle< IAGDDtoGeoSvc > m_svc
◆ Get_Controller()
◆ Get_sTGCDetector()
| sTGCDetectorDescription * sTGCDetectorHelper::Get_sTGCDetector |
( |
char | type, |
|
|
int | ieta, |
|
|
int | iphi, |
|
|
int | layer = 1, |
|
|
char | side = 'A' ) |
Definition at line 35 of file sTGCDetectorHelper.cxx.
36{
37 sTGCDetectorDescription* tgc=nullptr;
38
40 AGDDPositionerStore&
ps =
c->GetPositionerStore();
41 for (
unsigned int i=0;
i<
ps.size();
i++)
42 {
43 AGDDDetectorPositioner*
dp=
dynamic_cast<AGDDDetectorPositioner*
>(
ps[
i]);
44 if (dp)
45 {
46 if (
dp->ID.detectorType !=
"sTGC")
continue;
47 std::string_view dad=
dp->ID.detectorAddress;
48
50 char dctype='L';
51 if (dtype=='3') dctype='S';
52 if (dctype!=type) continue;
53 int deta=
myatoi(dad.substr(5,1));
54 if (deta!=ieta) continue;
55 int dphi=
myatoi(dad.substr(12,1));
56 if (dphi!=iphi) continue;
57 int dlayer=
myatoi(dad.substr(7,1));
58 if (dlayer!=layer) continue;
59 char dside=dad[13];
60 if (dside!=side) continue;
61
62 tgc=
dynamic_cast<sTGCDetectorDescription*
>(
dp->theDetector);
63 }
64 if(tgc) break;
65 }
66 if (!tgc) std::cout<<" could not find a positioned sTGC!!!! "<<std::endl;
67 return tgc;
68}
int myatoi(std::string_view str)
◆ Get_sTGCDetectorSubType() [1/2]
◆ Get_sTGCDetectorSubType() [2/2]
Definition at line 127 of file sTGCDetectorHelper.cxx.
128{
130 if(pair.first == type) return pair.second;
131 }
132 return nullptr;
133}
◆ Get_sTGCDetectorType() [1/2]
◆ Get_sTGCDetectorType() [2/2]
Definition at line 119 of file sTGCDetectorHelper.cxx.
120{
122 if(pair.first == type) return pair.second;
123 }
124 return nullptr;
125}
◆ Get_sTGCPositionedDetector()
| AGDDPositionedDetector sTGCDetectorHelper::Get_sTGCPositionedDetector |
( |
char | type, |
|
|
int | ieta, |
|
|
int | iphi, |
|
|
int | layer = 1, |
|
|
char | side = 'A' ) |
Definition at line 70 of file sTGCDetectorHelper.cxx.
71{
72 sTGCDetectorDescription* tgc=nullptr;
73 AGDDDetectorPositioner*
dp=
nullptr;
74
76 AGDDPositionerStore&
ps =
c->GetPositionerStore();
77 for (
unsigned int i=0;
i<
ps.size();
i++)
78 {
79 dp=
dynamic_cast<AGDDDetectorPositioner*
>(
ps[
i]);
80 if (dp)
81 {
82 if (
dp->ID.detectorType !=
"sTGC")
continue;
83 std::string_view dad=
dp->ID.detectorAddress;
84
86 char dctype='L';
87 if (dtype=='3') dctype='S';
88 if (dctype!=type) continue;
89 int deta=
myatoi(dad.substr(5,1));
90 if (deta!=ieta) continue;
91 int dphi=
myatoi(dad.substr(12,1));
92 if (dphi!=iphi) continue;
93 int dlayer=
myatoi(dad.substr(7,1));
94 if (dlayer!=layer) continue;
95 char dside=dad[13];
96 if (dside!=side) continue;
97
98 tgc=
dynamic_cast<sTGCDetectorDescription*
>(
dp->theDetector);
99 }
100 if(tgc) break;
101 }
102 if (!tgc) std::cout<<" could not find a positioned sTGC!!!! "<<std::endl;
104 return p_sTGC;
105}
std::pair< sTGCDetectorDescription *, AGDDDetectorPositioner * > AGDDPositionedDetector
◆ sTGC_begin()
◆ sTGC_end()
◆ m_sTGCList
| sTGCMap sTGCDetectorHelper::m_sTGCList |
|
private |
◆ m_sTGCListSubType
◆ m_svc
The documentation for this class was generated from the following files: