25 m_caughtExceptionInCellRender(
false)
38 m_rowFillContext = gClient->GetResourcePool()->GetGCPool()->GetGC(&gc,kTRUE);
69 if (
collection()->modelInfo(
index).displayProperties().filterPassed()) { ++
n;}
85 std::vector<std::string>
ret;
87 for (
unsigned int i = 0;
i <
n; ++
i) {
114 fwLog(
fwlog::kError) <<
"Error: caught exception in the cell renderer while evaluating an expression. Return -999. Error is suppressed in future\n";
124 snprintf(s,
sizeof(s),
"%d",
int(rint(ret)));
127 snprintf(s,
sizeof(s),
"0x%x",
int(rint(ret)));
130 snprintf(s,
sizeof(s),
int(rint(ret)) != 0 ?
"true" :
"false");
133 snprintf(fs,
sizeof(fs),
"%%.%df", precision);
134 snprintf(s,
sizeof(s), fs, ret);
141 SetForeground(gVirtualX->GetPixel(kWhite));
144 SetForeground(gVirtualX->GetPixel(kBlack));
156 SetForeground(0xffffff);
168 bool operator () (
const std::pair<bool, double> &i1,
169 const std::pair<bool, double> &i2)
172 if (i1.first and not i2.first)
174 if (i2.first and not i1.first)
177 else return i1.second > i2.second;
181 bool operator () (
const std::pair<bool, double> &i1,
182 const std::pair<bool, double> &i2)
185 if (i1.first and not i2.first)
187 if (i2.first and not i1.first)
190 else return i1.second < i2.second;
196 const std::vector<FWExpressionEvaluator> &evaluators,
197 std::multimap<std::pair<bool, double>,
int,
S>& iMap,
198 std::vector<int>& oNewSort)
211 iMap.insert(std::make_pair(
217 std::vector<int>::iterator itVec = oNewSort.begin();
218 for(
typename std::multimap<std::pair<bool, double>,
int,
S>::iterator
230 static const bool sort_down =
true;
235 if (iSortOrder == sort_down) {
236 std::multimap<std::pair<bool, double>, int, itemOrderGt>
s;
239 std::multimap<std::pair<bool, double>, int, itemOrderLt>
s;
250 std::vector<int> visible;
252 std::vector<int> invisible;
260 visible.push_back(
i);
261 else invisible.push_back(
i);
265 visible.begin(), visible.end());
267 invisible.begin(), invisible.end());
286 if(0==item) {
return;}
289 for (std::vector<FWTableViewManager::TableEntry>::const_iterator
316 SetForeground(gVirtualX->GetPixel(kWhite));
319 SetForeground(gVirtualX->GetPixel(kBlack));
323 displayProperties().color()));
329 std::ostringstream
s;
virtual FWTableCellRendererBase * cellRenderer(int iSortedRowNumber, int iCol) const
FWTableViewTableManager(const FWTableView *)
Color_t background() const
const FWDisplayProperties & displayProperties() const
auto_ptr< ClusterSequence > cs
FWTableViewManager * m_manager
void dataChanged()
Called if mouse button pressed in Row Header, defaults is to do nothing.
virtual int unsortedRowNumber(int iSortedRowNumber) const
virtual int numberOfRows() const
Number of rows in the table.
const FWEventItem * collection() const
FWFramedTextTableCellRenderer * m_rowRenderer
std::vector< int > m_sortedToUnsortedIndices
void setData(const std::string &)
const std::string & filterExpression() const
std::vector< FWTableViewManager::TableEntry > * m_tableFormats
bool filterPassed() const
virtual std::vector< std::string > getTitles() const
returns the title names for each column
void dataChanged()
Classes which inherit from FWTableManagerBase must call this when their underlying data changes...
FWColorManager & colorManager() const
virtual int numberOfColumns() const
Number of columns in the table.
std::vector< FWExpressionEvaluator > m_evaluators
const Items & items() const
virtual bool hasRowHeaders() const
require all cells to be the same height
virtual ~FWTableViewTableManager()
const FWEventItem * item() const
FWTableWidget * m_tableWidget
virtual void implSort(int iCol, bool iSortOrder)
void setGraphicsContext(const TGGC *iContext)
virtual FWTableCellRendererBase * rowHeader(int iSortedRowNumber) const
Returns the renderer for the row header for the sorted row number iSortedRowNumber.
FWTextTableCellRenderer * m_renderer
bool showFilteredEntries() const
const FWTableView * m_view
void setData(const std::string &, bool isSelected)
TGGC * m_highlightContext
double S(const TLorentzVector &, const TLorentzVector &)
const TClass * modelType() const
volatile std::atomic< bool > shutdown_flag false
const void * modelData(int iIndex) const
ModelInfo modelInfo(int iIndex) const
tuple size
Write out results.
bool m_caughtExceptionInCellRender