19#include <fairlogger/Logger.h>
23#include <TEveGeoShapeExtract.h>
24#include <TEveManager.h>
25#include <TEveProjectionManager.h>
32namespace event_visualisation
48 TFile*
f = TFile::Open(Form(
"%s/simple_geom_%s.root", geomPath.c_str(), detectorName.c_str()));
50 LOGF(error,
"GeometryManager::GetSimpleGeom -- no file with geometry found for: ", detectorName,
"!");
53 LOGF(info,
"GeometryManager::GetSimpleGeom for: ", detectorName,
" from ",
54 Form(
"%s/simple_geom_%s.root", geomPath.c_str(), detectorName.c_str()));
56 auto geomShapreExtract =
dynamic_cast<TEveGeoShapeExtract*
>(
f->Get(detectorName.c_str()));
57 TEveGeoShape* geomShape = TEveGeoShape::ImportShapeExtract(geomShapreExtract);
60 geomShape->SetName(detectorName.c_str());
68 gEve->GetDefaultGLViewer()->UpdateScene();
73void GeometryManager::drawDeep(TEveGeoShape* geomShape,
Color_t color, Char_t transparency,
Color_t lineColor)
75 if (geomShape->HasChildren()) {
76 geomShape->SetRnrSelf(
false);
78 if (strcmp(geomShape->GetElementName(),
"TPC_Drift_1") == 0) {
79 geomShape->SetRnrSelf(kTRUE);
81 geomShape->SetMainColor(
color);
84 geomShape->SetLineColor(lineColor);
85 geomShape->SetLineWidth(1);
86 geomShape->SetDrawFrame(
true);
88 geomShape->SetDrawFrame(
false);
90 if (transparency >= 0) {
91 geomShape->SetMainTransparency(transparency);
95 for (TEveElement::List_i
i = geomShape->BeginChildren();
i != geomShape->EndChildren(); ++
i) {
96 drawDeep(
static_cast<TEveGeoShape*
>(*
i),
color, transparency, lineColor);
99 geomShape->SetRnrSelf(
true);
101 geomShape->SetMainColor(
color);
103 if (lineColor >= 0) {
104 geomShape->SetLineColor(lineColor);
105 geomShape->SetLineWidth(1);
106 geomShape->SetDrawFrame(
true);
108 geomShape->SetDrawFrame(
false);
110 if (transparency >= 0) {
111 geomShape->SetMainTransparency(transparency);
114 if (strcmp(geomShape->GetElementName(),
"PHOS_5") == 0) {
115 geomShape->SetRnrSelf(
false);
static ConfigurationManager & getInstance()
Returns an instance of ConfigurationManager.
const TEnv & getSettings()
static std::string getSimpleGeomR3Path()
TEveGeoShape * getGeometryForDetector(std::string detectorName)
Returns ROOT shapes describing simplified geometry of given detector.
static GeometryManager & getInstance()
Returns an instance of GeometryManager.
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
Defining DataPointCompositeObject explicitly as copiable.