fixed a few little things

This commit is contained in:
Jan Kieseler
2023-10-07 11:10:57 +02:00
parent 5718c8b9f1
commit 34a0305601
6 changed files with 39 additions and 16 deletions
+11
View File
@@ -43,6 +43,11 @@ public:
void setIsActive(bool isActive);
void assignPhysicalVolume(G4VPhysicalVolume* physicalVolume);
void unAssign(){
physicalVolume = nullptr;
sensors.clear();
}
double thickness;
double sens_xwidth;
double sens_ywidth;
@@ -99,6 +104,12 @@ public:
}
}
void unAssign(){
for(auto& layer: layers){
layer.unAssign();
}
}
private:
double xywidth;
+10 -2
View File
@@ -28,6 +28,7 @@ G4System(bool Gui=false):gui(Gui){};
delete runManager;
delete ui;
}
};
@@ -43,15 +44,22 @@ void applyUICommand(const std::string& command){
UImanager->ApplyCommand(command);
}
ConstructionWrapper cw;
void displayEvent()const{}; //just a placeholder, this will be implemented in python
void printMaterial(const std::string& name)const;
ConstructionWrapper& getConstructionWrapper(){
check();
if ( assigned_cw == nullptr ){
throw std::runtime_error("ConstructionWrapper not assigned");
}
return *assigned_cw;
}
private:
void check()const;
ConstructionWrapper * assigned_cw=nullptr;
bool gui;