#include <SimDesc/SimulationSvc.h>
Inheritance diagram for SimulationSvc:
Public Types | |
SUCCESS | |
NO_INTERFACE | |
VERSMISMATCH | |
LAST_ERROR | |
enum | Status |
typedef std::map< int, const SimAttribute * > | PartAttr |
typedef std::vector< RegionCuts > | VectOfRegCuts |
Public Member Functions | |
SimulationSvc (const std::string &name, ISvcLocator *svc) | |
Standard Constructor. | |
virtual | ~SimulationSvc () |
default destructor | |
virtual StatusCode | initialize () |
Initializes the service. | |
virtual StatusCode | queryInterface (const InterfaceID &riid, void **ppvInterface) |
Queries interfaces of Interface. | |
virtual const PartAttr * | simAttribute (const ILVolume *vol) const |
This method returns the simulation attribute associated to a given logical volume. | |
virtual const PartAttr * | simAttribute (const std::string volname) const |
This method returns the simulation attribute associated to a given logical volume. | |
virtual const bool | hasSimAttribute (const ILVolume *vol) const |
This method tells whether a simulation attribute is associated to a given logical volume or not. | |
virtual const bool | hasSimAttribute (const std::string volname) const |
This method tells whether a simulation attribute is associated to a given logical volume or not. | |
virtual const std::vector< RegionCuts > * | regionsDefs () const |
This method returns the pointer to the vector of region definitions. | |
virtual void | reload () |
this method erases the current set of attributes and loads a new set | |
virtual void | clear () |
this method erases the current set of attributes | |
virtual unsigned long | addRef () |
virtual unsigned long | release () |
virtual const std::string & | name () const |
virtual const InterfaceID & | type () const |
virtual StatusCode | configure () |
virtual StatusCode | start () |
virtual StatusCode | stop () |
virtual StatusCode | finalize () |
virtual StatusCode | terminate () |
virtual Gaudi::StateMachine::State | FSMState () const |
virtual Gaudi::StateMachine::State | targetFSMState () const |
virtual StatusCode | reinitialize () |
virtual StatusCode | restart () |
virtual StatusCode | sysInitialize () |
virtual StatusCode | sysStart () |
virtual StatusCode | sysStop () |
virtual StatusCode | sysFinalize () |
virtual StatusCode | sysReinitialize () |
virtual StatusCode | sysRestart () |
virtual StatusCode | setProperty (const Property &p) |
virtual StatusCode | setProperty (const std::string &s) |
virtual StatusCode | setProperty (const std::string &n, const std::string &v) |
StatusCode | setProperty (const std::string &name, const TYPE &value) |
virtual StatusCode | getProperty (Property *p) const |
virtual const Property & | getProperty (const std::string &name) const |
virtual StatusCode | getProperty (const std::string &n, std::string &v) const |
virtual const std::vector< Property * > & | getProperties () const |
ISvcLocator * | serviceLocator () const |
IMessageSvc * | msgSvc () |
IMessageSvc * | msgSvc () const |
IMessageSvc * | messageService () |
IMessageSvc * | messageService () const |
StatusCode | setProperties () |
StatusCode | service (const std::string &name, T *&psvc, bool createIf=true) const |
StatusCode | service (const std::string &svcType, const std::string &svcName, T *&psvc) const |
Property * | declareProperty (const std::string &name, T &property, const std::string &doc="none") const |
Property * | declareRemoteProperty (const std::string &name, IProperty *rsvc, const std::string &rname="") const |
IAuditorSvc * | auditorSvc () const |
Static Public Member Functions | |
static const InterfaceID & | interfaceID () |
static const InterfaceID & | interfaceID () |
static const InterfaceID & | interfaceID () |
static const InterfaceID & | interfaceID () |
Retrieve interface ID. | |
Public Attributes | |
SUCCESS | |
NO_INTERFACE | |
VERSMISMATCH | |
LAST_ERROR | |
Protected Member Functions | |
int | outputLevel () const |
Protected Attributes | |
IntegerProperty | m_outputLevel |
Gaudi::StateMachine::State | m_state |
Gaudi::StateMachine::State | m_targetState |
IMessageSvc * | m_messageSvc |
Private Types | |
typedef std::map< std::string, const SimAttribute * > | AttributeSet |
This defines a set of attributes. | |
typedef std::map< std::string, PartAttr * > | Dict |
This defines a dictionnary. | |
Private Attributes | |
AttributeSet | m_attributeSet |
a map of attributes to be used | |
Dict | m_logvol2Sim |
a dictionnary linking logical volumes and SimAttributes | |
VectOfRegCuts | m_regionsDefs |
vector of regions definitions | |
std::string | m_simDbLocation |
The location of the Xml file containing all definitions. | |
Friends | |
class | SvcFactory< SimulationSvc > |
Friend needed. | |
friend class | ServiceManager |
Classes | |
struct | Prcuts |
definition of a struct used for temporary purposes More... |
It is able to associate simulation attributes to logical volumes. These describe the way these volumes should be simulated
Definition at line 26 of file SimulationSvc.h.
typedef std::map<std::string, const SimAttribute*> SimulationSvc::AttributeSet [private] |
This defines a set of attributes.
Each one is associated to a name
Definition at line 122 of file SimulationSvc.h.
typedef std::map<std::string, PartAttr*> SimulationSvc::Dict [private] |
typedef std::map<int, const SimAttribute*> ISimulationSvc::PartAttr [inherited] |
Definition at line 35 of file ISimulationSvc.h.
typedef std::vector<RegionCuts> ISimulationSvc::VectOfRegCuts [inherited] |
Definition at line 36 of file ISimulationSvc.h.
SimulationSvc::SimulationSvc | ( | const std::string & | name, | |
ISvcLocator * | svc | |||
) |
Standard Constructor.
name | String with service name | |
svc | Pointer to service locator interface |
Definition at line 43 of file SimulationSvc.cpp.
00043 : 00044 Service (name, svc) { 00045 declareProperty ("SimulationDbLocation", m_simDbLocation="empty" ); 00046 }
SimulationSvc::~SimulationSvc | ( | ) | [virtual] |
default destructor
Definition at line 48 of file SimulationSvc.cpp.
00049 { 00050 for (AttributeSet::iterator it=m_attributeSet.begin(); 00051 it!= m_attributeSet.end();it++) delete (*it).second; 00052 m_attributeSet.clear(); 00053 00054 for (Dict::iterator itt=m_logvol2Sim.begin(); 00055 itt!= m_logvol2Sim.end();itt++) delete (*itt).second; 00056 m_logvol2Sim.clear(); 00057 00058 m_regionsDefs.clear(); 00059 }
StatusCode SimulationSvc::initialize | ( | ) | [virtual] |
Initializes the service.
Reimplemented from Service.
Definition at line 64 of file SimulationSvc.cpp.
00064 { 00065 // Before anything we have to initialize grand mother 00066 StatusCode status = Service::initialize(); 00067 if (!status.isSuccess()) { 00068 return status; 00069 } 00070 if( m_simDbLocation.empty() || "empty" == m_simDbLocation ) { 00071 if ( 0 != getenv("XMLDDDBROOT") ) { 00072 m_simDbLocation = getenv("XMLDDDBROOT"); 00073 m_simDbLocation += "/DDDB/Simulation/simulation.xml"; 00074 } else { 00075 m_simDbLocation = ""; 00076 } 00077 } 00078 // loads the color set 00079 reload(); 00080 // returns 00081 return StatusCode::SUCCESS; 00082 }
StatusCode SimulationSvc::queryInterface | ( | const InterfaceID & | riid, | |
void ** | ppvInterface | |||
) | [virtual] |
Queries interfaces of Interface.
riid | ID of Interface to be retrieved | |
ppvInterface | Pointer to Location for interface pointer |
Reimplemented from Service.
Definition at line 467 of file SimulationSvc.cpp.
00467 { 00468 if (IID_ISimulationSvc.versionMatch(riid)) { 00469 *ppvInterface = (ISimulationSvc*)this; 00470 } else { 00471 // Interface is not directly availible: try out a base class 00472 return Service::queryInterface(riid, ppvInterface); 00473 } 00474 addRef(); 00475 return StatusCode::SUCCESS; 00476 }
const SimulationSvc::PartAttr * SimulationSvc::simAttribute | ( | const ILVolume * | vol | ) | const [virtual] |
This method returns the simulation attribute associated to a given logical volume.
vol | the logical volume |
Implements ISimulationSvc.
Definition at line 410 of file SimulationSvc.cpp.
00410 { 00411 PartAttr* part = 0; 00412 00413 if (0 != vol) { 00414 // try first to find an attribute associated directly to the logical volume 00415 std::string bnn = vol->name(); 00416 Dict::const_iterator it = m_logvol2Sim.find (bnn); 00417 if (it != m_logvol2Sim.end()) 00418 { 00419 part=it->second; 00420 } 00421 else 00422 { 00423 MsgStream msg (msgSvc(), name()); 00424 msg << MSG::WARNING << "No SimAttribute for " 00425 << vol->name() << endmsg; 00426 } 00427 } 00428 return part; 00429 }
const SimulationSvc::PartAttr * SimulationSvc::simAttribute | ( | const std::string | volname | ) | const [virtual] |
This method returns the simulation attribute associated to a given logical volume.
vol | the logical volume |
Implements ISimulationSvc.
Definition at line 435 of file SimulationSvc.cpp.
00435 { 00436 PartAttr* part = 0; 00437 00438 // try first to find an attribute associated directly to the logical volume 00439 Dict::const_iterator it = m_logvol2Sim.find (volname); 00440 if (it != m_logvol2Sim.end()) 00441 { 00442 part=it->second; 00443 } 00444 else 00445 { 00446 MsgStream msg (msgSvc(), name()); 00447 msg << MSG::WARNING << "No SimAttribute for " 00448 << volname << endmsg; 00449 } 00450 return part; 00451 }
const bool SimulationSvc::hasSimAttribute | ( | const ILVolume * | vol | ) | const [virtual] |
This method tells whether a simulation attribute is associated to a given logical volume or not.
vol | the logical volume |
Implements ISimulationSvc.
Definition at line 381 of file SimulationSvc.cpp.
00381 { 00382 if (0 != vol) { 00383 // try first to find an attribute associated directly to the logical volume 00384 std::string bnn = vol->name(); 00385 Dict::const_iterator it = m_logvol2Sim.find (bnn); 00386 if (it != m_logvol2Sim.end()) { 00387 return true; 00388 } 00389 } 00390 return false; 00391 }
const bool SimulationSvc::hasSimAttribute | ( | const std::string | volname | ) | const [virtual] |
This method tells whether a simulation attribute is associated to a given logical volume or not.
vol | the logical volume |
Implements ISimulationSvc.
Definition at line 396 of file SimulationSvc.cpp.
00396 { 00397 00398 // try first to find an attribute associated directly to the logical volume 00399 Dict::const_iterator it = m_logvol2Sim.find (volname); 00400 if (it != m_logvol2Sim.end()) { 00401 return true; 00402 } 00403 return false; 00404 }
const std::vector< RegionCuts > * SimulationSvc::regionsDefs | ( | ) | const [virtual] |
This method returns the pointer to the vector of region definitions.
@return | std::vector<RegionCuts> |
Implements ISimulationSvc.
Definition at line 457 of file SimulationSvc.cpp.
00458 { 00459 return &m_regionsDefs; 00460 }
void SimulationSvc::reload | ( | ) | [virtual] |
this method erases the current set of attributes and loads a new set
Implements ISimulationSvc.
Definition at line 96 of file SimulationSvc.cpp.
00096 { 00097 MsgStream msg (msgSvc(), "SimulationSvc"); 00098 00099 // erases the old set of attributes 00100 clear(); 00101 00102 // gets the XmlSvc 00103 IXmlSvc* xmlSvc; 00104 StatusCode status = serviceLocator()->service("XmlCnvSvc", xmlSvc, true); 00105 if (status.isFailure()) { 00106 msg << MSG::ERROR << "Unable to get XmlCnvSvc. The simulation " 00107 << "attributes will not be loaded." << endmsg; 00108 return; 00109 } 00110 00111 msg << MSG::INFO << "Loading simulation attributes file \"" 00112 << m_simDbLocation << "\" ..." << endmsg; 00113 00114 // parses the file containing the simatt definitions 00115 IOVDOMDocument* iovDoc = xmlSvc->parse(m_simDbLocation.c_str()); 00116 if (!iovDoc) { 00117 msg << MSG::ERROR << "Unable to parse file " << m_simDbLocation 00118 << ". The simulation attributes will not be loaded." << endmsg; 00119 return; 00120 } 00121 xercesc::DOMDocument* document = iovDoc->getDOM(); 00122 if (0 == document) { 00123 msg << MSG::ERROR << "Unable to parse file " << m_simDbLocation 00124 << ". The simulation attributes will not be loaded." << endmsg; 00125 xmlSvc->releaseDoc(iovDoc); 00126 return; 00127 } 00128 00129 // go through the tree of elements and fill in the attribute sets 00130 const XMLCh* SimStr = xercesc::XMLString::transcode("SimAtt"); 00131 xercesc::DOMNodeList* domAttrList = document->getElementsByTagName(SimStr); 00132 unsigned int i; 00133 const XMLCh* nameStr = xercesc::XMLString::transcode("name"); 00134 const XMLCh* mASStr = xercesc::XMLString::transcode("maxAllowedStep"); 00135 const XMLCh* mTRStr = xercesc::XMLString::transcode("maxTrackLength"); 00136 const XMLCh* mTStr = xercesc::XMLString::transcode("maxTime"); 00137 const XMLCh* mEkStr = xercesc::XMLString::transcode("minEkine"); 00138 const XMLCh* mRStr = xercesc::XMLString::transcode("minRange"); 00139 00140 for (i = 0; i < domAttrList->getLength(); i++) { 00141 xercesc::DOMNode* attrNode = domAttrList->item(i); 00142 xercesc::DOMElement* attr = (xercesc::DOMElement *) attrNode; 00143 00144 std::string name = dom2Std (attr->getAttribute (nameStr)); 00145 std::string mASAttribute = dom2Std (attr->getAttribute (mASStr)); 00146 std::string mTRAttribute = dom2Std (attr->getAttribute (mTRStr)); 00147 std::string mTAttribute = dom2Std (attr->getAttribute (mTStr)); 00148 std::string mEkAttribute = dom2Std (attr->getAttribute (mEkStr)); 00149 std::string mRAttribute = dom2Std (attr->getAttribute (mRStr)); 00150 00151 // computes the values 00152 double maxAllowedStep = -1.0; 00153 double maxTrackLength = -1.0; 00154 double maxTime = -1.0; 00155 double minEkine = -1.0; 00156 double minRange = -1.0; 00157 if (!mASAttribute.empty()) { 00158 maxAllowedStep = xmlSvc->eval(mASAttribute, false); 00159 } 00160 if (!mTRAttribute.empty()) { 00161 maxTrackLength = xmlSvc->eval(mTRAttribute, true); 00162 } 00163 if (!mTAttribute.empty()) { 00164 maxTime = xmlSvc->eval(mTAttribute, true); 00165 } 00166 if (!mEkAttribute.empty()) { 00167 minEkine = xmlSvc->eval(mEkAttribute, true); 00168 } 00169 if (!mRAttribute.empty()) { 00170 minRange = xmlSvc->eval(mRAttribute, true); 00171 } 00172 00173 // creates the attribute and register it 00174 m_attributeSet[name] = 00175 new SimAttribute 00176 (maxAllowedStep, maxTrackLength, maxTime, minEkine, minRange); 00177 } 00178 xercesc::XMLString::release((XMLCh**) &mASStr); 00179 xercesc::XMLString::release((XMLCh**) &mTRStr); 00180 xercesc::XMLString::release((XMLCh**) &mTStr); 00181 xercesc::XMLString::release((XMLCh**) &mEkStr); 00182 xercesc::XMLString::release((XMLCh**) &mRStr); 00183 xercesc::XMLString::release((XMLCh**) &SimStr); 00184 00185 00186 // go through the tree of elements and fill in the logvol2Sim map 00187 const XMLCh* LVStr = xercesc::XMLString::transcode("LogVols"); 00188 const XMLCh* ItemStr = xercesc::XMLString::transcode("Item"); 00189 00190 xercesc::DOMNodeList* domLogvolsList = document->getElementsByTagName(LVStr); 00191 if (domLogvolsList->getLength() > 0) { 00192 xercesc::DOMNode* logvolsNode = domLogvolsList->item(0); 00193 xercesc::DOMElement* logvolsElement = (xercesc::DOMElement *) logvolsNode; 00194 00195 xercesc::DOMNodeList* domLogvolList = logvolsElement->getElementsByTagName(ItemStr); 00196 unsigned int i; 00197 const XMLCh* partStr = xercesc::XMLString::transcode("particle"); 00198 const XMLCh* attrStr = xercesc::XMLString::transcode("attr"); 00199 const XMLCh* CutStr = xercesc::XMLString::transcode("Cut"); 00200 00201 for (i = 0; i < domLogvolList->getLength(); i++) { 00202 xercesc::DOMNode* logvolNode = domLogvolList->item(i); 00203 xercesc::DOMElement* logvol = (xercesc::DOMElement *) logvolNode; 00204 00205 std::string name = dom2Std (logvol->getAttribute (nameStr)); 00206 00207 PartAttr* partattr = new PartAttr(); 00208 m_logvol2Sim[name]=partattr; 00209 00210 xercesc::DOMNodeList* domLogvolNode = logvol->getElementsByTagName(CutStr); 00211 unsigned int j; 00212 for (j = 0; j < domLogvolNode->getLength(); j++) { 00213 xercesc::DOMNode* cutNode = domLogvolNode->item(j); 00214 xercesc::DOMElement* cut = (xercesc::DOMElement *) cutNode; 00215 std::string dompart = dom2Std (cut->getAttribute(partStr)); 00216 int particle = (int) xmlSvc->eval(dompart, false); 00217 std::string attr = dom2Std (cut->getAttribute (attrStr)); 00218 // register the association 00219 partattr->operator[](particle) = m_attributeSet[attr]; 00220 } 00221 } 00222 xercesc::XMLString::release((XMLCh**) &partStr); 00223 xercesc::XMLString::release((XMLCh**) &attrStr); 00224 xercesc::XMLString::release((XMLCh**) &CutStr); 00225 } 00226 00227 xercesc::XMLString::release((XMLCh**) &LVStr); 00228 xercesc::XMLString::release((XMLCh**) &ItemStr); 00229 00231 // the part below deals with the production cuts per region 00232 00233 //create a temporary map to store ProductionCut definitions 00234 std::map<std::string, Prcuts> regcut; 00235 00236 // go through the tree of elements and fill in the ProductionCut sets 00237 const XMLCh* ProdCutStr = xercesc::XMLString::transcode("ProductionCut"); 00238 00239 xercesc::DOMNodeList* domPrCutList = document->getElementsByTagName(ProdCutStr); 00240 const XMLCh* GaStr = xercesc::XMLString::transcode("gammaCut"); 00241 const XMLCh* ElStr = xercesc::XMLString::transcode("electronCut"); 00242 const XMLCh* PoStr = xercesc::XMLString::transcode("positronCut"); 00243 const XMLCh* PrStr = xercesc::XMLString::transcode("ProtonCut"); 00244 const XMLCh* APStr = xercesc::XMLString::transcode("antiProtonCut"); 00245 const XMLCh* NeStr = xercesc::XMLString::transcode("neutronCut"); 00246 const XMLCh* ANStr = xercesc::XMLString::transcode("antiNeutronCut"); 00247 00248 unsigned int ii; 00249 for (ii = 0; ii < domPrCutList->getLength(); ii++) { 00250 xercesc::DOMNode* prcutNode = domPrCutList->item(ii); 00251 xercesc::DOMElement* prcut = (xercesc::DOMElement *) prcutNode; 00252 std::string name = dom2Std (prcut->getAttribute (nameStr)); 00253 std::string atrgammacut = dom2Std (prcut->getAttribute (GaStr)); 00254 std::string atrelectroncut = dom2Std (prcut->getAttribute (ElStr)); 00255 std::string atrpositroncut = dom2Std (prcut->getAttribute (PoStr)); 00256 std::string atrprotoncut = dom2Std (prcut->getAttribute (PrStr)); 00257 std::string atraprotoncut = dom2Std (prcut->getAttribute (APStr)); 00258 std::string atrneutroncut = dom2Std (prcut->getAttribute (NeStr)); 00259 std::string atraneutroncut = dom2Std (prcut->getAttribute (ANStr)); 00260 00261 Prcuts tempcuts; 00262 00263 // set default values 00264 tempcuts.gammacut = -1.0; 00265 tempcuts.electroncut = -1.0; 00266 tempcuts.positroncut = -1.0; 00267 tempcuts.protoncut = -1.0; 00268 tempcuts.aprotoncut = -1.0; 00269 tempcuts.neutroncut = -1.0; 00270 tempcuts.aneutroncut = -1.0; 00271 // get values (if any) 00272 00273 if (!atrgammacut.empty()) { 00274 tempcuts.gammacut = xmlSvc->eval(atrgammacut, false); 00275 } 00276 if (!atrelectroncut.empty()) { 00277 tempcuts.electroncut = xmlSvc->eval(atrelectroncut, true); 00278 } 00279 if (!atrpositroncut.empty()) { 00280 tempcuts.positroncut = xmlSvc->eval(atrpositroncut, true); 00281 } 00282 if (!atrprotoncut.empty()) { 00283 tempcuts.protoncut = xmlSvc->eval(atrprotoncut, true); 00284 } 00285 if (!atraprotoncut.empty()) { 00286 tempcuts.aprotoncut = xmlSvc->eval(atraprotoncut, true); 00287 } 00288 if (!atrneutroncut.empty()) { 00289 tempcuts.neutroncut = xmlSvc->eval(atrneutroncut, true); 00290 } 00291 if (!atraneutroncut.empty()) { 00292 tempcuts.aneutroncut = xmlSvc->eval(atraneutroncut, true); 00293 } 00294 00295 // fill in the temporary map 00296 regcut[name] = tempcuts; 00297 } 00298 xercesc::XMLString::release((XMLCh**) &GaStr); 00299 xercesc::XMLString::release((XMLCh**) &ElStr); 00300 xercesc::XMLString::release((XMLCh**) &PoStr); 00301 xercesc::XMLString::release((XMLCh**) &PrStr); 00302 xercesc::XMLString::release((XMLCh**) &APStr); 00303 xercesc::XMLString::release((XMLCh**) &NeStr); 00304 xercesc::XMLString::release((XMLCh**) &ANStr); 00305 xercesc::XMLString::release((XMLCh**) &ProdCutStr); 00306 00307 // go through the tree of elements 00308 // the following few lines fixed by SE 3-11-2005. 00309 // the fix is to avoid the mixing the terms Region and Regions. 00310 // 00311 const XMLCh* RegnsStr = xercesc::XMLString::transcode("Regions"); 00312 const XMLCh* RegStr = xercesc::XMLString::transcode("Region"); 00313 const XMLCh* VolStr = xercesc::XMLString::transcode("Volume"); 00314 const XMLCh* ProdStr = xercesc::XMLString::transcode("prodcut"); 00315 00316 xercesc::DOMNodeList* domRegionsList = document->getElementsByTagName(RegnsStr); 00317 00318 msg << MSG::DEBUG << "SimSvc Production regions list length \"" 00319 << (int) domRegionsList ->getLength() << "\" ..." << endmsg; 00320 // only 1 regions element is allowed in the following. A regions can have 00321 // many many region elements. Each region element may have different volumes. 00322 // end of fixes by SE. 00323 if (domRegionsList->getLength() > 0) { 00324 xercesc::DOMNode* regionsNode = domRegionsList->item(0); 00325 xercesc::DOMElement* regionsElement = (xercesc::DOMElement*) regionsNode; 00326 xercesc::DOMNodeList* domRegionList = regionsElement->getElementsByTagName(RegStr); 00327 msg << MSG::DEBUG << "SimSvc Production region list length \"" 00328 << (int) domRegionList ->getLength() << "\" ..." << endmsg; 00329 00330 unsigned int i; 00331 for (i = 0; i < domRegionList->getLength(); i++) { 00332 xercesc::DOMNode* regionNode = domRegionList->item(i); 00333 xercesc::DOMElement* region = (xercesc::DOMElement*) regionNode; 00334 std::string regname = dom2Std (region->getAttribute (nameStr)); 00335 std::string prcut = dom2Std (region->getAttribute (ProdStr)); 00336 00337 msg << MSG::DEBUG << "SimSvc region name prcut \"" 00338 << regname<<" "<<prcut << "\" ..." << endmsg; 00339 00340 xercesc::DOMNodeList* domRegionNode = region->getElementsByTagName(VolStr); 00341 unsigned int j; 00342 std::vector<std::string> volvect; 00343 00344 for (j = 0; j < domRegionNode->getLength(); j++) 00345 { 00346 xercesc::DOMNode* volNode = domRegionNode->item(j); 00347 xercesc::DOMElement* vol = (xercesc::DOMElement*) volNode; 00348 00349 std::string volname = dom2Std (vol->getAttribute (nameStr)); 00350 msg << MSG::DEBUG << "SimSvc vol name \"" 00351 << volname <<" "<< "\" ..." << endmsg; 00352 00353 volvect.push_back(volname); 00354 } 00355 00356 RegionCuts rcut(regname, 00357 volvect, 00358 regcut[prcut].gammacut, 00359 regcut[prcut].electroncut, 00360 regcut[prcut].positroncut, 00361 regcut[prcut].protoncut, 00362 regcut[prcut].aprotoncut, 00363 regcut[prcut].neutroncut, 00364 regcut[prcut].aneutroncut); 00365 m_regionsDefs.push_back(rcut); 00366 } 00367 } 00368 xercesc::XMLString::release((XMLCh**) &nameStr); 00369 xercesc::XMLString::release((XMLCh**) &RegStr); 00370 xercesc::XMLString::release((XMLCh**) &VolStr); 00371 xercesc::XMLString::release((XMLCh**) &ProdStr); 00372 00373 xmlSvc->releaseDoc(iovDoc); 00374 00375 }
void SimulationSvc::clear | ( | ) | [virtual] |
this method erases the current set of attributes
Definition at line 87 of file SimulationSvc.cpp.
00087 { 00088 m_attributeSet.clear(); 00089 m_logvol2Sim.clear(); 00090 m_regionsDefs.clear(); 00091 }
static const InterfaceID& ISimulationSvc::interfaceID | ( | ) | [inline, static, inherited] |
Retrieve interface ID.
Reimplemented from IInterface.
Definition at line 39 of file ISimulationSvc.h.
00039 { return IID_ISimulationSvc; }
friend class SvcFactory< SimulationSvc > [friend] |
AttributeSet SimulationSvc::m_attributeSet [private] |
Dict SimulationSvc::m_logvol2Sim [private] |
a dictionnary linking logical volumes and SimAttributes
Definition at line 134 of file SimulationSvc.h.
VectOfRegCuts SimulationSvc::m_regionsDefs [private] |
std::string SimulationSvc::m_simDbLocation [private] |
The location of the Xml file containing all definitions.
Definition at line 152 of file SimulationSvc.h.