Public Member Functions | Public Attributes | List of all members
gar::evd3d::EventDisplay3DUtils Class Reference

#include <EventDisplay3DUtils.h>

Public Member Functions

 EventDisplay3DUtils ()
 
void PrevEvent ()
 
void NextEvent ()
 
void GotoEvent ()
 
int LogColor (double val, double minVal, double maxVal, double magScale=5.0)
 

Public Attributes

TGTextBuffer * fTbRun
 
TGTextBuffer * fTbEvt
 
int fColorBase
 
int fColorCount
 

Detailed Description

Definition at line 18 of file EventDisplay3DUtils.h.

Constructor & Destructor Documentation

gar::evd3d::EventDisplay3DUtils::EventDisplay3DUtils ( )
explicit

Definition at line 19 of file EventDisplay3DUtils.cxx.

20  :fTbRun(0)
21  ,fTbEvt(0)
22  {
23  Double_t s[] = { 0.00, 0.20, 0.35, 0.43, 0.45, 0.50, 1.00};
24  Double_t r[] = { 0.00, 0.90, 1.00, 1.00, 1.00, 1.00, 0.00};
25  Double_t g[] = { 0.50, 0.10, 0.75, 0.90, 1.00, 1.00, 0.00};
26  Double_t b[] = { 0.30, 0.00, 0.00, 0.00, 0.00, 1.00, 0.00};
27  fColorCount = 200;
28  unsigned int abc = sizeof(s)/sizeof(s[0]);
29 
30  fColorBase = TColor::CreateGradientColorTable(abc, s, r, g, b,
31  fColorCount);
32  }
static constexpr double g
Definition: Units.h:144
static bool * b
Definition: config.cpp:1043
static QCString * s
Definition: config.cpp:1042

Member Function Documentation

void gar::evd3d::EventDisplay3DUtils::GotoEvent ( )

Definition at line 44 of file EventDisplay3DUtils.cxx.

45  {
46  int run = std::stoi(fTbRun->GetString());
47  int event = std::stoi(fTbEvt->GetString());
48  evdb::NavState::SetTarget(run, event);
49  evdb::NavState::Set(evdb::kGOTO_EVENT);
50  }
constexpr BitMask< Storage > Set(Flag_t< Storage > flag)
Returns a bit mask which sets the specified flag.
Event finding and building.
int gar::evd3d::EventDisplay3DUtils::LogColor ( double  val,
double  minVal,
double  maxVal,
double  magScale = 5.0 
)

Definition at line 52 of file EventDisplay3DUtils.cxx.

53  {
54  int nCol = fColorCount/2;
55  double scale = std::pow(10.0,magScale);
56  double nvalue = std::max(0.0,std::min((value-minVal)/(maxVal-minVal),1.0));
57  double lValue = std::log10(1.0+scale*nvalue)/magScale;
58  int iValue = nCol*lValue;
59  iValue = std::max(0,std::min(iValue,nCol-1));
60  return fColorBase + iValue;
61  }
constexpr T pow(T x)
Definition: pow.h:72
static int max(int a, int b)
T min(sqlite3 *const db, std::string const &table_name, std::string const &column_name)
Definition: statistics.h:55
void gar::evd3d::EventDisplay3DUtils::NextEvent ( )

Definition at line 39 of file EventDisplay3DUtils.cxx.

40  {
41  evdb::NavState::Set(evdb::kNEXT_EVENT);
42  }
constexpr BitMask< Storage > Set(Flag_t< Storage > flag)
Returns a bit mask which sets the specified flag.
void gar::evd3d::EventDisplay3DUtils::PrevEvent ( )

Definition at line 34 of file EventDisplay3DUtils.cxx.

35  {
36  evdb::NavState::Set(evdb::kPREV_EVENT);
37  }
constexpr BitMask< Storage > Set(Flag_t< Storage > flag)
Returns a bit mask which sets the specified flag.

Member Data Documentation

int gar::evd3d::EventDisplay3DUtils::fColorBase

Definition at line 31 of file EventDisplay3DUtils.h.

int gar::evd3d::EventDisplay3DUtils::fColorCount

Definition at line 32 of file EventDisplay3DUtils.h.

TGTextBuffer* gar::evd3d::EventDisplay3DUtils::fTbEvt

Definition at line 27 of file EventDisplay3DUtils.h.

TGTextBuffer* gar::evd3d::EventDisplay3DUtils::fTbRun

Definition at line 26 of file EventDisplay3DUtils.h.


The documentation for this class was generated from the following files: