18 #include <boost/bind.hpp>
20 #ifdef PERFTOOL_GEO_TABLE
21 #include <google/profiler.h>
30 #include "TGeoVolume.h"
31 #include "TGeoMatrix.h"
32 #include "TGeoShape.h"
34 #include "TGeoMatrix.h"
38 #include "boost/lexical_cast.hpp"
55 gval.fMask = kGCForeground | kGCBackground | kGCStipple | kGCFillStyle | kGCGraphicsExposures;
56 gval.fStipple = gClient->GetResourcePool()->GetCheckeredBitmap();
57 gval.fGraphicsExposures = kFALSE;
58 gval.fBackground = gVirtualX->GetPixel(kGray);
59 m_colorContext = gClient->GetResourcePool()->GetGCPool()->GetGC(&gval,kTRUE);
65 gClient->GetResourcePool()->GetGCPool()->FreeGC(m_colorContext->GetGC());
70 m_color = gVirtualX->GetPixel(c);
82 m_colorContext->SetFillStyle(kFillSolid);
83 Pixel_t baq = m_colorContext->GetForeground();
84 m_colorContext->SetForeground(m_color);
85 gVirtualX->FillRectangle(iID, m_colorContext->GetGC(), iX, iY, iWidth, iHeight);
89 m_colorContext->SetFillStyle(kFillOpaqueStippled);
90 gVirtualX->FillRectangle(iID, m_colorContext->GetGC(), iX, iY, iWidth, iHeight);
92 m_colorContext->SetForeground(baq);
114 gval.fMask = kGCForeground | kGCBackground | kGCStipple | kGCFillStyle | kGCGraphicsExposures;
115 gval.fForeground = gVirtualX->GetPixel(kGray);
116 gval.fBackground = gVirtualX->GetPixel(kWhite);
117 gval.fFillStyle = kFillOpaqueStippled;
118 gval.fStipple = gClient->GetResourcePool()->GetCheckeredBitmap();
119 gval.fGraphicsExposures = kFALSE;
143 std::vector<std::string> returnValue;
146 returnValue.push_back(
"Name");
147 returnValue.push_back(
"Color");
148 returnValue.push_back(
"Opcty");
149 returnValue.push_back(
"RnrSelf");
150 returnValue.push_back(
"RnrChildren");
151 returnValue.push_back(
"Material");
185 if (xPos > off && xPos < (off + 20))
212 mtx.MultiplyLeft(
m_entries.at(pIdx).m_node->GetMatrix());
217 mtx.Multiply(data.
m_node->GetMatrix());
240 std::vector<std::string> relPath;
248 size_t ns = relPath.size();
249 for (
size_t i = 1;
i < ns; ++
i )
252 path += relPath[ns-
i -1];
283 using boost::lexical_cast;
284 using boost::bad_lexical_cast;
286 int t = lexical_cast<
int>(
m_editor->GetText());
287 if (t > 100 || t < 0 )
296 catch (bad_lexical_cast &) {
297 fwLog(
fwlog::kError) <<
"Bad Lexical cast. Transparency must be set in procentage [0-100].";
331 TGeoNode *parentNode =
m_entries[selectedIdx].m_node;
332 int nD = parentNode->GetNdaughters();
334 for (
int n = 0;
n != nD; ++
n)
336 int idx = selectedIdx + 1 +
n + dOff;
362 bool foundParent =
false;
374 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...
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.