ATLAS Offline Software
Loading...
Searching...
No Matches
UbeamHandler.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3*/
4
8#include <iostream>
9
10
11UbeamHandler::UbeamHandler(const std::string& s,
13 : XMLHandler(s, c)
14{
15// std::cout<<"Creating handler for Ubeam"<<std::endl;
16}
17
19 xercesc::DOMNode *t)
20{
21 bool res;
22 std::string name=getAttributeAsString(c, t, "name",res);
23 std::string material=getAttributeAsString(c, t, "material",res);
24
25 double l=getAttributeAsDouble(c, t, "length",res);
26 double w=getAttributeAsDouble(c, t, "width",res);
27 double sw=getAttributeAsDouble(c, t, "small_width",res);
28 double h=getAttributeAsDouble(c, t, "heigth",res);
29 double sh=getAttributeAsDouble(c, t, "small_heigth",res);
30
31 AGDDUbeam *b=new AGDDUbeam(name, c.GetVolumeStore(), c.GetSectionStore());
32 b->SetMaterial(material);
33 b->SetLength(l);
34 b->SetWidth(w);
35 b->SetSmallWidth(sw);
36 b->SetHeigth(h);
37 b->SetSmallHeigth(sh);
38
39 std::string col=getAttributeAsString(c, t, "color",res);
40 if (!col.empty())
41 b->SetColor(col);
42}
std::pair< std::vector< unsigned int >, bool > res
Header file for AthHistogramAlgorithm.
virtual void ElementHandle(AGDDController &c, xercesc::DOMNode *t) override
UbeamHandler(const std::string &, AGDDController &c)
double getAttributeAsDouble(AGDDController &c, const xercesc::DOMNode *t, const std::string &) const
XMLHandler(const std::string &n, AGDDController &c)
std::string getAttributeAsString(AGDDController &c, const xercesc::DOMNode *t, const std::string &) const