ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
MuonSpectrometer
MuonDetDescr
MuonAGDDBase
src
micromegasHandler.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/micromegasHandler.h
"
6
#include "
MuonAGDDBase/AGDDMicromegas.h
"
7
#include "
AGDDControl/AGDDController.h
"
8
#include <iostream>
9
10
11
micromegasHandler::micromegasHandler
(
const
std::string& s,
12
AGDDController
& c)
13
:
XMLHandler
(s, c),
14
m_mmCurrent
(nullptr)
15
{
16
}
17
18
void
micromegasHandler::ElementHandle
(
AGDDController
& c,
19
xercesc::DOMNode *t)
20
{
21
22
// std::cout<<" this is micromegasHandler::Handle"<<std::endl;
23
24
bool
ret=
true
;
25
std::string name=
getAttributeAsString
(c, t,
"type"
,ret);
26
std::string sType=
getAttributeAsString
(c, t,
"subType"
,ret);
27
std::vector<double> vvv;
28
vvv.push_back(
getAttributeAsDouble
(c, t,
"sWidth"
,ret));
29
vvv.push_back(
getAttributeAsDouble
(c, t,
"lWidth"
,ret));
30
vvv.push_back(
getAttributeAsDouble
(c, t,
"Length"
,ret));
31
vvv.push_back(
getAttributeAsDouble
(c, t,
"Tck"
,ret));
32
33
std::string technology=
getAttributeAsString
(c, t,
"tech"
,ret);
34
35
AGDDMicromegas
*b=
new
AGDDMicromegas
(name,
36
c.GetDetectorStore(),
37
c.GetVolumeStore(),
38
c.GetSectionStore());
39
m_mmCurrent
= b;
40
b->SetXYZ(vvv);
41
b->subType(sType);
42
b->tech=technology;
43
44
double
xf=
getAttributeAsDouble
(c, t,
"xFrame"
,0.);
45
b->xFrame(xf);
46
double
ysf=
getAttributeAsDouble
(c, t,
"ysFrame"
,0.);
47
b->ysFrame(ysf);
48
double
ylf=
getAttributeAsDouble
(c, t,
"ylFrame"
,0.);
49
b->ylFrame(ylf);
50
51
// std::string col=getAttributeAsString(c, t, "color",ret);
52
// if (ret)
53
// b->SetColor(col);
54
}
55
56
57
MMDetectorDescription
*
micromegasHandler::GetMMCurrent
()
58
{
59
return
m_mmCurrent
;
60
}
61
AGDDController.h
AGDDMicromegas.h
AGDDController
Definition
AGDDController.h:30
AGDDMicromegas
Definition
AGDDMicromegas.h:19
MMDetectorDescription
Definition
MMDetectorDescription.h:45
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
XMLHandler::getAttributeAsString
std::string getAttributeAsString(AGDDController &c, const xercesc::DOMNode *t, const std::string &) const
Definition
XMLHandler.cxx:69
micromegasHandler::m_mmCurrent
MMDetectorDescription * m_mmCurrent
Definition
micromegasHandler.h:22
micromegasHandler::GetMMCurrent
MMDetectorDescription * GetMMCurrent()
Definition
micromegasHandler.cxx:57
micromegasHandler::ElementHandle
virtual void ElementHandle(AGDDController &c, xercesc::DOMNode *t) override
Definition
micromegasHandler.cxx:18
micromegasHandler::micromegasHandler
micromegasHandler(const std::string &, AGDDController &c)
Definition
micromegasHandler.cxx:11
micromegasHandler.h
Generated on
for ATLAS Offline Software by
1.17.0