17 #include <boost/bind.hpp>
19 #ifdef PERFTOOL_GEO_TABLE
20 #include <google/profiler.h>
29 #include "TGeoVolume.h"
30 #include "TGeoMatrix.h"
31 #include "TGeoShape.h"
33 #include "TGeoMatrix.h"
37 #include "boost/lexical_cast.hpp"
54 gval.fMask = kGCForeground | kGCBackground | kGCStipple | kGCFillStyle | kGCGraphicsExposures;
55 gval.fStipple = gClient->GetResourcePool()->GetCheckeredBitmap();
56 gval.fGraphicsExposures = kFALSE;
57 gval.fBackground = gVirtualX->GetPixel(kGray);
58 m_colorContext = gClient->GetResourcePool()->GetGCPool()->GetGC(&gval,kTRUE);
64 gClient->GetResourcePool()->GetGCPool()->FreeGC(m_colorContext->GetGC());
69 m_color = gVirtualX->GetPixel(c);
81 m_colorContext->SetFillStyle(kFillSolid);
82 Pixel_t baq = m_colorContext->GetForeground();
83 m_colorContext->SetForeground(m_color);
84 gVirtualX->FillRectangle(iID, m_colorContext->GetGC(), iX, iY, iWidth, iHeight);
88 m_colorContext->SetFillStyle(kFillOpaqueStippled);
89 gVirtualX->FillRectangle(iID, m_colorContext->GetGC(), iX, iY, iWidth, iHeight);
91 m_colorContext->SetForeground(baq);
113 gval.fMask = kGCForeground | kGCBackground | kGCStipple | kGCFillStyle | kGCGraphicsExposures;
114 gval.fForeground = gVirtualX->GetPixel(kGray);
115 gval.fBackground = gVirtualX->GetPixel(kWhite);
116 gval.fFillStyle = kFillOpaqueStippled;
117 gval.fStipple = gClient->GetResourcePool()->GetCheckeredBitmap();
118 gval.fGraphicsExposures = kFALSE;
142 std::vector<std::string> returnValue;
145 returnValue.push_back(
"Name");
146 returnValue.push_back(
"Color");
147 returnValue.push_back(
"Opcty");
148 returnValue.push_back(
"RnrSelf");
149 returnValue.push_back(
"RnrChildren");
150 returnValue.push_back(
"Material");
184 if (xPos > off && xPos < (off + 20))
211 mtx.MultiplyLeft(
m_entries.at(pIdx).m_node->GetMatrix());
216 mtx.Multiply(data.
m_node->GetMatrix());
239 std::vector<std::string> relPath;
247 size_t ns = relPath.size();
248 for (
size_t i = 1;
i < ns; ++
i )
251 path += relPath[ns-
i -1];
282 using boost::lexical_cast;
283 using boost::bad_lexical_cast;
285 int t = lexical_cast<
int>(
m_editor->GetText());
286 if (t > 100 || t < 0 )
295 catch (bad_lexical_cast &) {
296 fwLog(
fwlog::kError) <<
"Bad Lexical cast. Transparency must be set in procentage [0-100].";
330 TGeoNode *parentNode =
m_entries[selectedIdx].m_node;
331 int nD = parentNode->GetNdaughters();
333 for (
int n = 0;
n != nD; ++
n)
335 int idx = selectedIdx + 1 +
n + dOff;
361 bool foundParent =
false;
373 if (pidx == topNodeIdx) { foundParent =
true;
virtual int numberOfColumns() const =0
Number of columns in the table.
virtual UInt_t height() const
returns the minimum height of the cell to which the renderer is representing
bool isNodeRendered(int idx, int top_node_idx) const
virtual std::vector< std::string > getTitles() const
returns the title names for each column
virtual void draw(Drawable_t iID, int iX, int iY, unsigned int iWidth, unsigned int iHeight)
bool firstColumnClicked(int row, int xPos)
void setBlackIcon(bool value)
const char * name() const
std::vector< int > m_row_to_index
virtual bool getVisibility(const NodeInfo &nodeInfo) const
virtual void recalculateVisibility()=0
virtual ~ColorBoxRenderer()
virtual bool getVisibilityChld(const NodeInfo &nodeInfo) const
void getNodePath(int, std::string &) const
void getNodeMatrix(const NodeInfo &nodeInfo, TGeoHMatrix &mat) const
void dataChanged()
Classes which inherit from FWTableManagerBase must call this when their underlying data changes...
virtual void setVisibilityChld(NodeInfo &, bool)
std::vector< int > rowToIndex()
TGGC * m_highlightContext
void setData(Color_t c, bool)
void setHighlightContext(const TGGC *context)
virtual void setCellEditor(TGTextEntry *editor)
FWGeometryTableManagerBase()
virtual const std::string title() const
virtual ~FWGeometryTableManagerBase()
void setBackgroundToWhite(bool)
void applyTransparencyFromEditor()
void setGraphicsContext(const TGGC *iContext)
void setDaughtersSelfVisibility(bool)
int m_editTransparencyIdx
virtual void setVisibility(NodeInfo &, bool)
static void getNNodesTotal(TGeoNode *geoNode, int &off)
virtual int unsortedRowNumber(int unsorted) const
when passed the index to the sorted order of the rows it returns the original row number from the und...
tuple idx
DEBUGGING if hasattr(process,"trackMonIterativeTracking2012"): print "trackMonIterativeTracking2012 D...
void setCellValueEditor(TGTextEntry *editor)
char data[epos_bytes_allocation]
void setBitVal(UChar_t f, bool x)
void visualPropertiesChanged()
Classes which inherit from FWTableManagerBase must call this when how the data is shown (e...
volatile std::atomic< bool > shutdown_flag false
FWTextTreeCellRenderer m_renderer
void redrawTable(bool setExpand=false)
ColorBoxRenderer m_colorBoxRenderer
bool testBit(UChar_t f) const
virtual int numberOfRows() const
Number of rows in the table.