ATLAS Offline Software
pconHandler.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
9 #include "AGDDModel/AGDDPcon.h"
11 #include <iostream>
12 
13 
14 using namespace xercesc;
15 
16 pconHandler::pconHandler(const std::string& s,
18  : XMLHandler(s, c)
19 {
20 }
21 
23  xercesc::DOMNode *t)
24 {
25  bool res;
26  std::string name=getAttributeAsString(c, t, "name",res);
27  std::string material=getAttributeAsString(c, t, "material",res);
28 
29  AGDDPcon *vol=new AGDDPcon(name, c.GetVolumeStore(), c.GetSectionStore());
30  vol->SetMaterial(material);
31 
32  std::string col=getAttributeAsString(c, t, "color",res);
33  if (res)
34  vol->SetColor(col);
35 
36  std::vector<double> vvv=getAttributeAsVector(c, t, "profile",res);
37  if (res)
38  vol->SetProfile(vvv[0],vvv[1]);
39  else
40  vol->SetProfile(0.,360.);
41 
42  StopLoop(true);
43  DOMNode* child;
44 
45  polyplaneHandler* pplaneHand = dynamic_cast<polyplaneHandler*>
46  (c.GetHandlerStore().GetHandler("polyplane"));
47  if (!pplaneHand) std::abort();
48 
49  IAGDDParser& parser = *c.GetParser();
50  for (child=t->getFirstChild();child!=0;child=child->getNextSibling())
51  {
52  if (child->getNodeType()==DOMNode::ELEMENT_NODE) {
53  parser.elementLoop(c, child);
54  Polyplane p = pplaneHand->CurrentPolyplane();
55  vol->SetPlane(p.rin(),p.rou(),p.z());
56  }
57  }
58 
59 
60 }
AGDDController.h
polyplaneHandler
Definition: polyplaneHandler.h:12
python.CaloScaleNoiseConfig.parser
parser
Definition: CaloScaleNoiseConfig.py:75
AGDDPcon.h
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
polyplaneHandler.h
XercesParser.h
IAGDDParser
Definition: IAGDDParser.h:15
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
AGDDController
Definition: AGDDController.h:30
polyplaneHandler::CurrentPolyplane
const Polyplane & CurrentPolyplane()
Definition: polyplaneHandler.h:18
Polyplane
Definition: Polyplane.h:8
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
AGDDVolume::SetMaterial
void SetMaterial(const std::string &n)
Definition: AGDDVolume.h:24
XMLHandlerStore.h
XMLHandler::getAttributeAsVector
std::vector< double > getAttributeAsVector(AGDDController &c, const xercesc::DOMNode *t, const std::string &) const
Definition: XMLHandler.cxx:100
res
std::pair< std::vector< unsigned int >, bool > res
Definition: JetGroupProductTest.cxx:14
XMLHandler::getAttributeAsString
std::string getAttributeAsString(AGDDController &c, const xercesc::DOMNode *t, const std::string &) const
Definition: XMLHandler.cxx:69
AGDDPcon::SetProfile
void SetProfile(double phi0, double dphi)
Definition: AGDDPcon.h:25
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
pconHandler::ElementHandle
virtual void ElementHandle(AGDDController &c, xercesc::DOMNode *t) override
Definition: pconHandler.cxx:22
AGDDPcon::SetPlane
void SetPlane(double ri, double ro, double z)
Definition: AGDDPcon.h:19
pconHandler::pconHandler
pconHandler(const std::string &, AGDDController &c)
Definition: pconHandler.cxx:16
XMLHandler
Definition: XMLHandler.h:15
query_example.col
col
Definition: query_example.py:7
AGDDVolume::SetColor
void SetColor(const std::string &c)
Definition: AGDDVolume.h:36
pconHandler.h
AGDDPcon
Definition: AGDDPcon.h:13
python.compressB64.c
def c
Definition: compressB64.py:93
XMLHandler::StopLoop
void StopLoop(bool)
Definition: XMLHandler.cxx:28