ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
MuonSpectrometer
MuonDetDescr
MuonAGDDBase
src
sTGC_readoutHandler.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
MuonAGDDBase/sTGC_readoutHandler.h
"
6
#include "
MuonAGDDBase/sTGCHandler.h
"
7
#include "
MuonAGDDDescription/sTGCDetectorDescription.h
"
8
#include "
AGDDControl/AGDDController.h
"
9
#include "
AGDDControl/XMLHandlerStore.h
"
10
#include "GaudiKernel/Bootstrap.h"
11
#include <iostream>
12
13
14
sTGC_readoutHandler::sTGC_readoutHandler
(
const
std::string& s,
15
AGDDController
& c)
16
:
XMLHandler
(s, c)
17
{
18
}
19
20
void
sTGC_readoutHandler::ElementHandle
(
AGDDController
& c,
21
xercesc::DOMNode *t)
22
{
23
sTGCHandler
* sTGCHand =
dynamic_cast<
sTGCHandler
*
>
24
(c.GetHandlerStore().GetHandler(
"sTGC"
));
25
if
(!sTGCHand) std::abort();
26
27
sTGCDetectorDescription
* sTGC = sTGCHand->
GetsTGCCurrent
();
28
// std::cout<<" this is sTGC_readoutHandler::Handle"<<sTGC->GetName()<<std::endl;
29
30
bool
ret=
true
;
31
sTGC->
roParameters
.
sPadWidth
=
getAttributeAsDouble
(c, t,
"sPadWidth"
, ret);
32
if
(! ret) std::cout <<
"WARNING: sPadWidth is missing"
<< std::endl;
33
34
sTGC->
roParameters
.
lPadWidth
=
getAttributeAsDouble
(c, t,
"lPadWidth"
, ret);
35
if
(! ret) std::cout <<
"WARNING: lPadWidth is missing"
<< std::endl;
36
37
sTGC->
roParameters
.
sStripWidth
=
getAttributeAsDouble
(c, t,
"sStripWidth"
, ret);
38
if
(! ret) std::cout <<
"WARNING: sStripWidth is missing"
<< std::endl;
39
40
sTGC->
roParameters
.
lStripWidth
=
getAttributeAsDouble
(c, t,
"lStripWidth"
, ret);
41
if
(! ret) std::cout <<
"WARNING: lStripWidth is missing"
<< std::endl;
42
43
sTGC->
roParameters
.
padH
=
getAttributeAsVector
(c, t,
"padH"
, ret);
44
if
(! ret) std::cout <<
"WARNING: padH is missing"
<< std::endl;
45
46
sTGC->
roParameters
.
nPadPhi
=
getAttributeAsIntVector
(c, t,
"nPadPhi"
, ret);
47
if
(! ret) {
// Check for backwards compatibility
48
std::cout <<
"INFO: nPadPhi is missing trying older format nPadX"
<< std::endl;
49
sTGC->
roParameters
.
nPadPhi
=
getAttributeAsIntVector
(c, t,
"nPadX"
, ret);
50
if
(! ret) std::cout <<
"WARNING: nPadX is missing"
<< std::endl;
51
}
52
53
sTGC->
roParameters
.
anglePadPhi
=
getAttributeAsDouble
(c, t,
"anglePadPhi"
, ret);
54
if
(! ret){
55
std::cout <<
"INFO: anglePadPhi is missing trying older format anglePadX"
<< std::endl;
56
sTGC->
roParameters
.
anglePadPhi
=
getAttributeAsDouble
(c, t,
"anglePadX"
, ret);
57
if
(! ret) std::cout <<
"WARNING: anglePadX is missing"
<< std::endl;
58
}
59
60
sTGC->
roParameters
.
firstPadPhiDivision_A
=
getAttributeAsVector
(c, t,
"firstPadPhiDivision_A"
, ret);
61
sTGC->
roParameters
.
firstPadPhiDivision_C
=
getAttributeAsVector
(c, t,
"firstPadPhiDivision_C"
, ret);
62
if
(! ret){
63
std::cout <<
"INFO: firstPadPhiDivision_C/A is missing trying older format firstPadPhi"
<< std::endl;
64
sTGC->
roParameters
.
firstPadPhiDivision_A
=
getAttributeAsVector
(c, t,
"firstPadPhi"
, ret);
65
sTGC->
roParameters
.
firstPadPhiDivision_C
=
getAttributeAsVector
(c, t,
"firstPadPhi"
, ret);
66
if
(! ret) std::cout <<
"WARNING: firstPadPhi is missing"
<< std::endl;
67
}
68
69
70
71
sTGC->
roParameters
.
PadPhiShift_A
=
getAttributeAsVector
(c, t,
"PadPhiShift_A"
, ret);
72
sTGC->
roParameters
.
PadPhiShift_C
=
getAttributeAsVector
(c, t,
"PadPhiShift_C"
, ret);
73
if
(! ret){
74
std::cout <<
"INFO: PadPhiShift_C/A is missing trying older format firstPadPhi"
<< std::endl;
75
sTGC->
roParameters
.
PadPhiShift_A
=
getAttributeAsVector
(c, t,
"firstPadPhi"
, ret);
76
sTGC->
roParameters
.
PadPhiShift_C
=
getAttributeAsVector
(c, t,
"firstPadPhi"
, ret);
77
if
(! ret) std::cout <<
"WARNING: firstPadPhi is missing"
<< std::endl;
78
}
79
80
sTGC->
roParameters
.
nPadH
=
getAttributeAsVector
(c, t,
"nPadH"
, ret);
81
if
(! ret) std::cout <<
"WARNING: nPadH is missing"
<< std::endl;
82
83
sTGC->
roParameters
.
firstPadH
=
getAttributeAsVector
(c, t,
"firstPadH"
, ret);
84
if
(! ret) std::cout <<
"WARNING: firstPadH is missing"
<< std::endl;
85
86
sTGC->
roParameters
.
firstPadRow
=
getAttributeAsIntVector
(c, t,
"firstPadRow"
, ret);
87
if
(! ret) std::cout <<
"WARNING: firstPadRow is missing"
<< std::endl;
88
89
sTGC->
roParameters
.
nWires
=
getAttributeAsIntVector
(c, t,
"nWires"
, ret);
90
if
(! ret) std::cout <<
"WARNING: nWires is missing"
<< std::endl;
91
92
sTGC->
roParameters
.
wireCutout
=
getAttributeAsVector
(c, t,
"wireCutout"
, ret);
93
if
(! ret) std::cout <<
"WARNING: wireCutout is missing"
<< std::endl;
94
95
sTGC->
roParameters
.
firstWire
=
getAttributeAsVector
(c, t,
"firstWire"
, ret);
96
if
(! ret) std::cout <<
"WARNING: firstWire is missing"
<< std::endl;
97
98
sTGC->
roParameters
.
wireGroupWidth
=
getAttributeAsDouble
(c, t,
"wireGroupWidth"
, ret);
99
if
(! ret) std::cout <<
"WARNING: wireGroupWidth is missing"
<< std::endl;
100
101
sTGC->
roParameters
.
nStrips
=
getAttributeAsInt
(c, t,
"nStrips"
, ret);
102
if
(! ret) std::cout <<
"WARNING: nStrips is missing"
<< std::endl;
103
104
sTGC->
roParameters
.
firstTriggerBand
=
getAttributeAsIntVector
(c, t,
"firstTriggerBand"
, ret);
105
if
(! ret) std::cout <<
"WARNING: firstTriggerBand is missing"
<< std::endl;
106
107
sTGC->
roParameters
.
nTriggerBands
=
getAttributeAsIntVector
(c, t,
"nTriggerBands"
, ret);
108
if
(! ret) std::cout <<
"WARNING: nTriggerBands is missing"
<< std::endl;
109
110
sTGC->
roParameters
.
firstStripInTrigger
=
getAttributeAsIntVector
(c, t,
"firstStripInTrigger"
, ret);
111
if
(! ret) std::cout <<
"WARNING: firstStripInTrigger is missing"
<< std::endl;
112
113
sTGC->
roParameters
.
firstStripWidth
=
getAttributeAsVector
(c, t,
"firstStripWidth"
, ret);
114
if
(! ret) std::cout <<
"WARNING: firstStripWidth is missing"
<< std::endl;
115
116
sTGC->
roParameters
.
StripsInBandsLayer1
=
getAttributeAsIntVector
(c, t,
"StripsInBandsLayer1"
, ret);
117
if
(! ret) std::cout <<
"WARNING: StripsInBandsLayer1 is missing"
<< std::endl;
118
119
sTGC->
roParameters
.
StripsInBandsLayer2
=
getAttributeAsIntVector
(c, t,
"StripsInBandsLayer2"
, ret);
120
if
(! ret) std::cout <<
"WARNING: StripsInBandsLayer2 is missing"
<< std::endl;
121
122
sTGC->
roParameters
.
StripsInBandsLayer3
=
getAttributeAsIntVector
(c, t,
"StripsInBandsLayer3"
, ret);
123
if
(! ret) std::cout <<
"WARNING: StripsInBandsLayer3 is missing"
<< std::endl;
124
125
sTGC->
roParameters
.
StripsInBandsLayer4
=
getAttributeAsIntVector
(c, t,
"StripsInBandsLayer4"
, ret);
126
if
(! ret) std::cout <<
"WARNING: StripsInBandsLayer4 is missing"
<< std::endl;
127
128
sTGC->
roParameters
.
nWireGroups
=
getAttributeAsIntVector
(c, t,
"nWireGroups"
, ret);
129
if
(! ret) std::cout <<
"WARNING: nWireGroups is missing"
<< std::endl;
130
131
sTGC->
roParameters
.
firstWireGroup
=
getAttributeAsIntVector
(c, t,
"firstWireGroup"
, ret);
132
if
(! ret) std::cout <<
"WARNING: firstWireGroup is missing"
<< std::endl;
133
}
AGDDController.h
XMLHandlerStore.h
AGDDController
Definition
AGDDController.h:30
XMLHandler::getAttributeAsInt
int getAttributeAsInt(AGDDController &c, const xercesc::DOMNode *t, const std::string &) const
Definition
XMLHandler.cxx:89
XMLHandler::getAttributeAsVector
std::vector< double > getAttributeAsVector(AGDDController &c, const xercesc::DOMNode *t, const std::string &) const
Definition
XMLHandler.cxx:100
XMLHandler::getAttributeAsIntVector
std::vector< int > getAttributeAsIntVector(AGDDController &c, const xercesc::DOMNode *t, const std::string &) const
Definition
XMLHandler.cxx:116
XMLHandler::getAttributeAsDouble
double getAttributeAsDouble(AGDDController &c, const xercesc::DOMNode *t, const std::string &) const
Definition
XMLHandler.cxx:78
XMLHandler::XMLHandler
XMLHandler(const std::string &n, AGDDController &c)
Definition
XMLHandler.cxx:15
sTGCDetectorDescription
Definition
sTGCDetectorDescription.h:51
sTGCDetectorDescription::roParameters
sTGCReadoutParameters roParameters
Definition
sTGCDetectorDescription.h:99
sTGCHandler
Definition
sTGCHandler.h:14
sTGCHandler::GetsTGCCurrent
sTGCDetectorDescription * GetsTGCCurrent()
Definition
sTGCHandler.cxx:60
sTGC_readoutHandler::sTGC_readoutHandler
sTGC_readoutHandler(const std::string &, AGDDController &c)
Definition
sTGC_readoutHandler.cxx:14
sTGC_readoutHandler::ElementHandle
virtual void ElementHandle(AGDDController &c, xercesc::DOMNode *t) override
Definition
sTGC_readoutHandler.cxx:20
sTGCDetectorDescription.h
sTGCHandler.h
sTGC_readoutHandler.h
sTGCReadoutParameters::lStripWidth
double lStripWidth
Definition
sTGCDetectorDescription.h:23
sTGCReadoutParameters::firstWireGroup
std::vector< int > firstWireGroup
Definition
sTGCDetectorDescription.h:48
sTGCReadoutParameters::nWireGroups
std::vector< int > nWireGroups
Definition
sTGCDetectorDescription.h:47
sTGCReadoutParameters::lPadWidth
double lPadWidth
Definition
sTGCDetectorDescription.h:21
sTGCReadoutParameters::StripsInBandsLayer1
std::vector< int > StripsInBandsLayer1
Definition
sTGCDetectorDescription.h:43
sTGCReadoutParameters::sStripWidth
double sStripWidth
Definition
sTGCDetectorDescription.h:22
sTGCReadoutParameters::firstPadPhiDivision_A
std::vector< double > firstPadPhiDivision_A
Definition
sTGCDetectorDescription.h:27
sTGCReadoutParameters::firstStripInTrigger
std::vector< int > firstStripInTrigger
Definition
sTGCDetectorDescription.h:41
sTGCReadoutParameters::firstPadPhiDivision_C
std::vector< double > firstPadPhiDivision_C
Definition
sTGCDetectorDescription.h:28
sTGCReadoutParameters::firstStripWidth
std::vector< double > firstStripWidth
Definition
sTGCDetectorDescription.h:42
sTGCReadoutParameters::StripsInBandsLayer4
std::vector< int > StripsInBandsLayer4
Definition
sTGCDetectorDescription.h:46
sTGCReadoutParameters::nPadPhi
std::vector< int > nPadPhi
Definition
sTGCDetectorDescription.h:25
sTGCReadoutParameters::firstPadH
std::vector< double > firstPadH
Definition
sTGCDetectorDescription.h:32
sTGCReadoutParameters::wireGroupWidth
int wireGroupWidth
Definition
sTGCDetectorDescription.h:37
sTGCReadoutParameters::StripsInBandsLayer3
std::vector< int > StripsInBandsLayer3
Definition
sTGCDetectorDescription.h:45
sTGCReadoutParameters::firstWire
std::vector< double > firstWire
Definition
sTGCDetectorDescription.h:36
sTGCReadoutParameters::PadPhiShift_C
std::vector< double > PadPhiShift_C
Definition
sTGCDetectorDescription.h:30
sTGCReadoutParameters::nWires
std::vector< int > nWires
Definition
sTGCDetectorDescription.h:34
sTGCReadoutParameters::StripsInBandsLayer2
std::vector< int > StripsInBandsLayer2
Definition
sTGCDetectorDescription.h:44
sTGCReadoutParameters::padH
std::vector< double > padH
Definition
sTGCDetectorDescription.h:24
sTGCReadoutParameters::wireCutout
std::vector< double > wireCutout
Definition
sTGCDetectorDescription.h:35
sTGCReadoutParameters::firstTriggerBand
std::vector< int > firstTriggerBand
Definition
sTGCDetectorDescription.h:39
sTGCReadoutParameters::anglePadPhi
double anglePadPhi
Definition
sTGCDetectorDescription.h:26
sTGCReadoutParameters::firstPadRow
std::vector< int > firstPadRow
Definition
sTGCDetectorDescription.h:33
sTGCReadoutParameters::sPadWidth
double sPadWidth
Definition
sTGCDetectorDescription.h:20
sTGCReadoutParameters::PadPhiShift_A
std::vector< double > PadPhiShift_A
Definition
sTGCDetectorDescription.h:29
sTGCReadoutParameters::nStrips
int nStrips
Definition
sTGCDetectorDescription.h:38
sTGCReadoutParameters::nPadH
std::vector< double > nPadH
Definition
sTGCDetectorDescription.h:31
sTGCReadoutParameters::nTriggerBands
std::vector< int > nTriggerBands
Definition
sTGCDetectorDescription.h:40
Generated on
for ATLAS Offline Software by
1.17.0