49 if (
fTree ==
nullptr) {
50 Error(
"TTreeTableInterface",
"No tree supplied");
66 Info(
"TTreeTableInterface",
"nentries was 0, setting to maximum number"
67 " available in the tree");
75 Warning (
"TTreeTableInterface::TTreeTableInterface",
"nrows = 0");
78 Warning (
"TTreeTableInterface::TTreeTableInterface",
"ncolumns = 0");
106 if (!strcmp(varexp,
"*")) { allvar =
true; }
116 Error(
"TTreeTableInterface",
"No leaves in Tree");
126 std::vector<TString> cnames;
147 if (selection && strlen(selection)) {
173 if (
fSelect->GetManager()->GetMultiplicity() > 0 ) {
175 for (i = 0; i <=
fFormulas->LastIndex(); i++) {
181 for (i = 0; i <
fFormulas->LastIndex(); i++) {
211 while (entriesToDisplay != 0){
215 if (localEntry < 0)
break;
216 if (tnumber !=
fTree->GetTreeNumber()) {
217 tnumber =
fTree->GetTreeNumber();
220 for(i = 0; i <
fFormulas->LastIndex(); i++)
242 for (
Int_t inst = 0; inst < ndata; inst++){
244 if (
fSelect->EvalInstance(inst) == 0){
251 entrylist->
Enter(entry);
269 if (row == prow + 1) {
275 fTree->LoadTree(entry);
277 Error(
"TTreeTableInterface",
"Row requested does not exist");
285 Warning(
"TTreeTableInterface::GetValue",
"Value requested is a "
286 "string, returning 0.");
290 Error(
"TTreeTableInterface",
"Column requested does not exist");
305 if (row == prow + 1) {
311 fTree->LoadTree(entry);
313 Error(
"TTreeTableInterface",
"Row requested does not exist");
324 Error(
"TTreeTableInterface",
"Column requested does not exist");
337 Error(
"TTreeTableInterface",
"Row requested does not exist");
351 Error(
"TTreeTableInterface",
"Column requested does not exist");
382 Error(
"TTreeTableInterface::AddColumn",
"Only 1 expression allowed.");
404 Error(
"TTreeTableInterface::AddColumn",
"Please specify a "
423 Error(
"TTreeTableInterface::RemoveColumn",
"Please specify a "
427 Error(
"TTreeTableInterface::RemoveColumn",
"Can't remove last column");
437 if (formula)
delete formula;
447 Error(
"TTreeTableInterface::SetFormula",
"Please specify a "
455 if (form)
delete form;
473 fTree->SetEntryList(entrylist);
int Int_t
Signed integer 4 bytes (int).
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int).
double Double_t
Double 8 bytes.
long long Long64_t
Portable signed long integer 8 bytes.
const char Option_t
Option string (const char).
Error("WriteTObject","The current directory (%s) is not associated with a file. The object (%s) has not been written.", GetName(), objname)
void Info(const char *location, const char *msgfmt,...)
Use this function for informational messages.
void Warning(const char *location, const char *msgfmt,...)
Use this function in warning situations.
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
virtual bool Enter(Long64_t entry, TTree *tree=nullptr)
A TLeaf describes individual elements of a TBranch See TBranch structure in TTree.
The TNamed class is the base class for all named ROOT classes.
const char * GetName() const override
Returns name of object.
const char * GetTitle() const override
Returns title of object.
Int_t GetEntries() const override
Return the number of objects in array (i.e.
TObject * At(Int_t idx) const override
A specialized TSelector for TTree::Draw.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
const char * GetRowHeader(UInt_t row) override
Return a string to use as a label for rowheader at column.
~TTreeTableInterface() override
TTreeTableInterface destructor.
Long64_t fFirstEntry
First entry.
Long64_t fEntry
Present entry number in fTree.
const char * GetColumnHeader(UInt_t column) override
Return a string to use as a label for columnheader at column.
UInt_t GetNColumns() override
Return the amount of column available.
UInt_t fNRows
Amount of rows in the data.
virtual void SetFormula(TTreeFormula *formula, UInt_t position)
Set the TTreeFormula of position to formula.
const char * GetValueAsString(UInt_t row, UInt_t column) override
Return the content of row,column as string to use in a TGTableCell label.
void SyncFormulas()
Sync the formulas using the TTreeFormulaManager.
UInt_t fNColumns
Amount of columns in the data.
virtual void RemoveColumn(UInt_t position)
Remove column at position, TGTable->Update() is needed afterwards to apply the change to the TGTable.
UInt_t GetNRows() override
Return the amount of rows in the Tree.
TTreeFormula * fSelect
Selection condition.
TTreeFormulaManager * fManager
Coordinator for the formulas.
Double_t GetValue(UInt_t row, UInt_t column) override
Return the value of row,column.
virtual void SetEntryList(TEntryList *entrylist=nullptr)
Set the currently active entrylist.
void InitEntries()
Initialise the TEntryList with the entries that match the selection criterium.
TTree * fTree
Data in a TTree.
virtual void SetSelection(const char *selection)
Set the selection expression.
virtual void AddColumn(const char *expression, UInt_t position)
Add column according ot expression at position, TGTable->Update() is needed afterwards to apply the c...
TList * fFormulas
Array of TTreeFormulas to display values.
Long64_t fNEntries
Number of entries in the tree.
bool fForceDim
Force dimension.
void SetVariablesExpression(const char *varexp)
Compile the variables expression from the given varexp.
TEntryList * fEntries
Currently active entries.
TTreeTableInterface(TTree *tree=nullptr, const char *varexp=nullptr, const char *selection=nullptr, Option_t *option=nullptr, Long64_t nentries=0, Long64_t firstentry=0)
TTreeTableInterface constructor.
TSelectorDraw * fSelector
Selector.
TList * fInput
Used for fSelector.
A TTree represents a columnar dataset.