ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
DetectorDescription
AGDD
AGDDHandlers
src
intersectionHandler.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 "
AGDDHandlers/intersectionHandler.h
"
6
#include "
AGDDModel/AGDDIntersection.h
"
7
#include "
AGDDControl/XercesParser.h
"
8
#include "
AGDDControl/AGDDController.h
"
9
#include <iostream>
10
#include "
AGDDKernel/AGDDPositioner.h
"
11
#include "
AGDDKernel/AGDDVolumeStore.h
"
12
#include "
AGDDKernel/AGDDPositionerStore.h
"
13
14
using namespace
xercesc;
15
16
intersectionHandler::intersectionHandler
(
const
std::string& s,
17
AGDDController
& c)
18
:
XMLHandler
(s, c)
19
{
20
}
21
22
void
intersectionHandler::ElementHandle
(
AGDDController
& c,
23
xercesc::DOMNode *t)
24
{
25
AGDDVolumeStore
& vs = c.GetVolumeStore();
26
AGDDSectionStore
&
ss
= c.GetSectionStore();
27
AGDDPositionerStore
& ps = c.GetPositionerStore();
28
29
bool
res
;
30
std::string name=
getAttributeAsString
(c, t,
"name"
);
31
AGDDIntersection
*is =
new
AGDDIntersection
(name, vs,
ss
);
32
33
StopLoop
(
true
);
34
35
DOMNode* child;
36
37
int
before=ps.NrOfPositioners();
38
39
IAGDDParser
& parser = *c.GetParser();
40
for
(child=t->getFirstChild();child!=0;child=child->getNextSibling())
41
{
42
if
(child->getNodeType()==DOMNode::ELEMENT_NODE) {
43
parser.elementLoop(c, child);
44
}
45
}
46
47
int
after=ps.NrOfPositioners();
48
for
(
int
i=before;i<after;i++)
49
{
50
AGDDPositioner
*posit=ps.GetPositioner(i);
51
if
(vs.
Exist
(posit->
Volume
()))
52
is->
AddDaughter
(posit);
53
}
54
55
std::string col=
getAttributeAsString
(c, t,
"color"
,
res
);
56
if
(
res
)
57
is->
SetColor
(col);
58
}
AGDDController.h
AGDDIntersection.h
AGDDPositionerStore.h
AGDDPositioner.h
AGDDVolumeStore.h
res
std::pair< std::vector< unsigned int >, bool > res
Definition
JetGroupProductTest.cxx:11
ss
static Double_t ss
Definition
LArPhysWaveHECTool.cxx:37
XercesParser.h
AGDDController
Definition
AGDDController.h:30
AGDDIntersection
Definition
AGDDIntersection.h:13
AGDDPositionerStore
Definition
AGDDPositionerStore.h:14
AGDDPositioner
Definition
AGDDPositioner.h:18
AGDDPositioner::Volume
const std::string & Volume()
Definition
AGDDPositioner.cxx:21
AGDDSectionStore
Definition
AGDDSectionStore.h:15
AGDDVolumeStore
Definition
AGDDVolumeStore.h:15
AGDDVolumeStore::Exist
bool Exist(std::string)
Definition
AGDDVolumeStore.cxx:20
AGDDVolume::SetColor
void SetColor(const std::string &c)
Definition
AGDDVolume.h:36
AGDDVolume::AddDaughter
void AddDaughter(AGDDPositioner *v)
Definition
AGDDVolume.cxx:21
IAGDDParser
Definition
IAGDDParser.h:15
XMLHandler::StopLoop
void StopLoop(bool)
Definition
XMLHandler.cxx:28
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
intersectionHandler::ElementHandle
virtual void ElementHandle(AGDDController &c, xercesc::DOMNode *t) override
Definition
intersectionHandler.cxx:22
intersectionHandler::intersectionHandler
intersectionHandler(const std::string &, AGDDController &c)
Definition
intersectionHandler.cxx:16
intersectionHandler.h
Generated on
for ATLAS Offline Software by
1.17.0