ATLAS Offline Software
Loading...
Searching...
No Matches
AGDDController.cxx File Reference
#include "AGDDControl/AGDDController.h"
#include "AGDDKernel/AGDDBuilder.h"
#include "AGDDControl/IAGDDParser.h"
#include "AGDDControl/XercesParser.h"
#include "AGDDControl/AGDD2GeoModelBuilder.h"
#include "AGDDKernel/AGDDVolume.h"
#include "AGDDKernel/AGDDPositioner.h"
#include "AGDDKernel/AliasStore.h"
#include "AGDDModel/AGDDParameterStore.h"
#include "AGDDModel/AGDDMaterialStore.h"
#include "GeoModelInterfaces/IGeoModelSvc.h"
#include "GeoModelUtilities/GeoModelExperiment.h"
#include "GeoModelKernel/GeoVDetectorManager.h"
#include "GeoModelKernel/GeoPhysVol.h"
#include "GeoModelKernel/GeoVPhysVol.h"
#include "StoreGate/StoreGateSvc.h"
#include <map>
#include <vector>
#include <string>
#include <fstream>
#include <ctime>
#include <TString.h>
#include <iostream>

Go to the source code of this file.

Functions

void AGDDController::UseGeoModelDetector ATLAS_NOT_THREAD_SAFE (const std::string &name)

Function Documentation

◆ ATLAS_NOT_THREAD_SAFE()

void AGDDController::UseGeoModelDetector ATLAS_NOT_THREAD_SAFE ( const std::string & name)

Definition at line 128 of file AGDDController.cxx.

129{
130 SmartIF<IService> svcDetStore = Gaudi::svcLocator()->service("DetectorStore");
131 StoreGateSvc* pDetStore=dynamic_cast<StoreGateSvc*>(svcDetStore.get());
132 if (!pDetStore)
133 {
134 std::cout<<"AGDDController could not get at the detector store!"<<std::endl;
135 return;
136 }
137 const GeoModelExperiment* theExpt = nullptr;
138 StatusCode sc=pDetStore->retrieve( theExpt,"ATLAS");
139 if (sc.isFailure())
140 {
141 std::cout<<"AGDDController could not get GeoModelExperiment!"<<std::endl;
142 return;
143 }
144 else
145 {
146 const GeoVDetectorManager *theManager=theExpt->getManager(name);
147 if (theManager->getNumTreeTops()>1) std::cout<<"AGDDController: more than one treetop!!!"<<std::endl;
148 PVConstLink pv=theManager->getTreeTop(0);
149 GeoVPhysVol* ppv=const_cast<GeoVPhysVol*>(&(*pv));
150 static_cast<AGDD2GeoModelBuilder*>(m_theBuilder)->SetMotherVolume(static_cast<GeoPhysVol*>(ppv));
151 }
152
153}
static Double_t sc
const GeoVDetectorManager * getManager(const std::string &name) const
The Athena Transient Store API.
StatusCode retrieve(const T *&ptr) const
Retrieve the default object into a const T*.