27 ClassImp(TTreeResult);
32 TTreeResult::TTreeResult()
44 TTreeResult::TTreeResult(Int_t nfields)
46 fColumnCount = nfields;
48 fFields =
new TString [nfields];
49 fResult =
new TObjArray;
56 TTreeResult::~TTreeResult()
67 void TTreeResult::Close(Option_t *)
81 Bool_t TTreeResult::IsValid(Int_t field)
84 Error(
"IsValid",
"result set closed");
87 if (field < 0 || field >= GetFieldCount()) {
88 Error(
"IsValid",
"field index out of bounds");
97 Int_t TTreeResult::GetFieldCount()
100 Error(
"GetFieldCount",
"result set closed");
109 const char *TTreeResult::GetFieldName(Int_t field)
114 return fFields[field].Data();
122 TSQLRow *TTreeResult::Next()
125 Error(
"Next",
"result set closed");
129 if (fNextRow >= fRowCount)
132 TTreeRow *row =
new TTreeRow((TTreeRow*)fResult->At(fNextRow));
142 void TTreeResult::AddField(Int_t field,
const char *fieldname)
147 fFields[field] = fieldname;
154 void TTreeResult::AddRow(TSQLRow *row)
157 Error(
"AddRow",
"result set closed");