ATLAS Offline Software
compositionHandler.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 <iostream>
13 
14 
15 using namespace xercesc;
16 
19  : XMLHandler(s, c)
20 {
21 }
22 
24  xercesc::DOMNode *t)
25 {
26  std::string name=getAttributeAsString(c, t, "name");
27 // if (msgLog().level()<=MSG::DEBUG)
28 // msgLog()<<MSG::DEBUG<<" Composition "<<name<<endmsg;
29 
30  AGDDComposition *cm=new AGDDComposition(name, c.GetVolumeStore(), c.GetSectionStore());
31 
32  StopLoop(true);
33  DOMNode *child;
34 
35  int before=c.GetPositionerStore().NrOfPositioners();
36 
37  IAGDDParser& parser = *c.GetParser();
38  for (child=t->getFirstChild();child!=0;child=child->getNextSibling())
39  {
40  if (child->getNodeType()==DOMNode::ELEMENT_NODE) {
41  parser.elementLoop(c, child);
42  }
43  }
44 
45  int after=c.GetPositionerStore().NrOfPositioners();
46  for (int i=before;i<after;i++)
47  {
48  AGDDPositioner *posit=c.GetPositionerStore().GetPositioner(i);
49  if (c.GetVolumeStore().Exist(posit->Volume()))
50  cm->AddDaughter(posit);
51  }
52 
53 }
AGDDController.h
AGDDComposition.h
python.CaloScaleNoiseConfig.parser
parser
Definition: CaloScaleNoiseConfig.py:75
AGDDPositioner.h
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
AGDDComposition
Definition: AGDDComposition.h:13
XercesParser.h
AGDDVolumeStore.h
IAGDDParser
Definition: IAGDDParser.h:15
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
AGDDPositioner
Definition: AGDDPositioner.h:18
AGDDController
Definition: AGDDController.h:30
compositionHandler::compositionHandler
compositionHandler(const std::string &, AGDDController &c)
Definition: compositionHandler.cxx:17
cm
const double cm
Definition: Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/FCAL_ChannelMap.cxx:25
lumiFormat.i
int i
Definition: lumiFormat.py:85
compositionHandler::ElementHandle
virtual void ElementHandle(AGDDController &c, xercesc::DOMNode *t) override
Definition: compositionHandler.cxx:23
XMLHandler::getAttributeAsString
std::string getAttributeAsString(AGDDController &c, const xercesc::DOMNode *t, const std::string &) const
Definition: XMLHandler.cxx:69
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
XMLHandler
Definition: XMLHandler.h:15
AGDDPositioner::Volume
const std::string & Volume()
Definition: AGDDPositioner.cxx:21
compositionHandler.h
AGDDPositionerStore.h
python.compressB64.c
def c
Definition: compressB64.py:93
XMLHandler::StopLoop
void StopLoop(bool)
Definition: XMLHandler.cxx:28