161 EDepSimLog(
"Read a gdml geometry from |" << newValue <<
"|");
163 if (gdmlParser)
delete gdmlParser;
164 gdmlParser =
new G4GDMLParser;
168 gdmlParser->Read(newValue,
false);
171 std::istringstream
input((
const char*)newValue);
181 #define STRINGIFY(s) #s 182 #define STRINGIFY_DEFINITION(s) STRINGIFY(s) 186 =
std::remove(packageroot.begin(), packageroot.end(),
'"');
187 packageroot.erase(new_end, packageroot.end());
189 + name +
"-" + version +
".mac";
193 G4UImanager* UI = G4UImanager::GetUIpointer();
194 UI->ApplyCommand(
"/control/execute " + file);
197 std::istringstream
input((
const char*)newValue);
201 input >> sdName >> sagitta >> unitName;
202 sagitta *= G4UnitDefinition::GetValueOf(unitName);
203 SDFactory factory(
"segment");
204 SegmentSD* sd =
dynamic_cast<SegmentSD*
>(factory.MakeSD(sdName));
206 sd->SetMaximumHitSagitta(sagitta);
209 std::cout <<
"Invalid sensitive detector" <<
std::endl;
213 std::istringstream
input((
const char*)newValue);
217 input >> sdName >> length >> unitName;
218 length *= G4UnitDefinition::GetValueOf(unitName);
219 SDFactory factory(
"segment");
220 SegmentSD* sd =
dynamic_cast<SegmentSD*
>(factory.MakeSD(sdName));
222 sd->SetMaximumHitLength(length);
225 std::cout <<
"Invalid sensitive detector" <<
std::endl;
229 std::istringstream
input((
const char*)newValue);
#define EDepSimLog(outStream)
virtual void ShouldPrintMass(std::string name)
A method to request that a volume mass should be printed;.
G4UIcmdWithoutParameter * fUpdateCmd
G4GDMLParser * GetGDMLParser()
Get the GDML parser that this class is using.
void AddExcludedSensitiveDetector(std::string exclude)
G4UIcommand * fControlCmd
void Export(const char *file)
Export the geometry to a file.
G4UIcmdWithAString * fExportCmd
G4UIcommand * fHitExcludedCmd
G4UIcmdWithAString * fPrintMassCmd
std::string getenv(std::string const &name)
G4UIcmdWithoutParameter * fValidateCmd
EDepSim::UserDetectorConstruction * fConstruction
G4UIcmdWithAString * fGDMLCmd
void SetGDMLParser(G4GDMLParser *parser)
Set the GDML parser that this class should use.
void ValidateGeometry()
Set ValidateGeomtry to true.
G4UIcommand * fHitSagittaCmd
#define STRINGIFY_DEFINITION(s)
QTextStream & endl(QTextStream &s)
G4UIcommand * fHitLengthCmd
static EDepSim::RootGeometryManager * Get(void)
If a persistency manager has not been created, create one.