ATLAS Offline Software
DetectorDescription
AGDD
AGDDControl
src
XMLHandlerStore.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 "
AGDDControl/XMLHandlerStore.h
"
6
#include "
AGDDControl/XMLHandler.h
"
7
8
#include <iostream>
9
10
using namespace
xercesc;
11
12
XMLHandlerStore::XMLHandlerStore
()
13
{
14
}
15
16
void
XMLHandlerStore::RegisterHandler
(
XMLHandler
*
handler
)
17
{
18
std::string
name
=
handler
->GetName();
19
if
(this->
find
(name)!=this->
end
())
20
std::cout<<
" handler "
<<
name
<<
" already defined!"
<<std::endl;
21
else
22
(*
this
)[
name
]=
handler
;
23
}
24
25
void
XMLHandlerStore::Handle
(
AGDDController
&
c
, DOMNode *element)
26
{
27
char
*
temp
=XMLString::transcode(element->getNodeName());
28
std::string
name
=
temp
;
29
XMLString::release
(&
temp
);
30
if
(this->
find
(name)!=this->
end
())
31
((*this)[
name
])->Handle(
c
, element);
32
else
33
std::cout<<
" Handler for "
<<
name
<<
" not found! continuing"
<<std::endl;
34
}
35
36
XMLHandler
*
XMLHandlerStore::GetHandler
(
const
std::string&
name
)
37
{
38
auto
it
= this->
find
(name);
39
if
(
it
!= this->
end
()) {
40
return
it
->second;
41
}
42
std::cout<<
" Handler for "
<<
name
<<
" not found! continuing"
<<std::endl;
43
return
nullptr
;
44
}
45
46
47
XMLHandler
*
XMLHandlerStore::GetHandler
(DOMNode *element)
48
{
49
char
*
temp
=XMLString::transcode(element->getNodeName());
50
std::string
name
=
temp
;
51
XMLString::release
(&
temp
);
52
return
GetHandler (
name
);
53
}
54
temp
Definition:
JetEventDict.h:21
find
std::string find(const std::string &s)
return a remapped string
Definition:
hcg.cxx:135
skel.it
it
Definition:
skel.GENtoEVGEN.py:396
XMLHandler.h
mergePhysValFiles.end
end
Definition:
DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
handler
void handler(int sig)
signal handler
Definition:
rmain.cxx:98
AGDDController
Definition:
AGDDController.h:30
XMLHandlerStore::GetHandler
XMLHandler * GetHandler(const std::string &name)
Definition:
XMLHandlerStore.cxx:36
XMLHandlerStore::XMLHandlerStore
XMLHandlerStore()
Definition:
XMLHandlerStore.cxx:12
XMLHandlerStore.h
python.EventInfoMgtInit.release
release
Definition:
EventInfoMgtInit.py:24
name
std::string name
Definition:
Control/AthContainers/Root/debug.cxx:228
XMLHandler
Definition:
XMLHandler.h:15
XMLHandlerStore::RegisterHandler
void RegisterHandler(XMLHandler *)
Definition:
XMLHandlerStore.cxx:16
python.compressB64.c
def c
Definition:
compressB64.py:93
XMLHandlerStore::Handle
void Handle(AGDDController &c, xercesc::DOMNode *)
Definition:
XMLHandlerStore.cxx:25
Generated on Mon Dec 23 2024 21:23:19 for ATLAS Offline Software by
1.8.18