8 #include <TEveManager.h> 10 #include <TGLViewer.h> 29 TEveManager::Create();
31 TGLViewer* glViewer = gEve->GetDefaultGLViewer();
32 glViewer->SetCurrentCamera(TGLViewer::kCameraPerspXOZ);
33 glViewer->SetGuideState(TGLUtil::kAxesEdge,kTRUE,kFALSE,0);
34 glViewer->SetDrawCameraCenter(kTRUE);
50 Double_t
s[] = { 0.00, 0.20, 0.35, 0.43, 0.45, 0.50, 1.00};
51 Double_t
r[] = { 0.00, 0.90, 1.00, 1.00, 1.00, 1.00, 0.00};
52 Double_t
g[] = { 0.50, 0.10, 0.75, 0.90, 1.00, 1.00, 0.00};
53 Double_t
b[] = { 0.30, 0.00, 0.00, 0.00, 0.00, 1.00, 0.00};
55 unsigned int abc =
sizeof(
s)/
sizeof(s[0]);
57 fColorBase = TColor::CreateGradientColorTable(abc, s, r, g, b,
62 std::cout <<
"Event display constructed" <<
std::endl;
68 std::cout <<
"Event display deconstructed" <<
std::endl;
73 int iValue = nCol*(value - minVal)/(maxVal - minVal);
81 double scale =
std::pow(10.0,magScale);
83 double lValue = std::log10(1.0+scale*nvalue)/magScale;
84 int iValue = nCol*lValue;
static constexpr double g
TEventChangeManager * fEventChangeManager
virtual ~TEventDisplay()
Deconstruct the event display.
Handle drawing the GEANT4 (truth) hits.
Handle drawing the trajectories.
TGUIManager * fGUIManager
static TEventDisplay & Get(void)
static int max(int a, int b)
int LinearColor(double val, double minVal, double maxVal)
Get a color from the palette using a linear value scale.
static EDep::TEventDisplay * fEventDisplay
T min(sqlite3 *const db, std::string const &table_name, std::string const &column_name)
int LogColor(double val, double minVal, double maxVal, double magScale=5.0)
Get a color from the palette using a logarithmic value scale.
A singleton class for an event display based on EVE.
QTextStream & endl(QTextStream &s)
void AddUpdateHandler(EDep::TVEventChangeHandler *handler)