#ifndef TBASKETSQL_CXX
#define TBASKETSQL_CXX
#include "TBasket.h"
#include "TTree.h"
#include "TBranch.h"
#include "TFile.h"
#include "TMath.h"
#include "TBasketSQL.h"
#include <Riostream.h>
#include <vector>
#include "TTreeSQL.h"
#include "TBufferSQL.h"
ClassImp(TBasketSQL)
namespace std {} using namespace std;
TBasketSQL::TBasketSQL() : TBasket()
{
}
TBasketSQL::TBasketSQL(const char *name, const char *title, TBranch *branch,
TSQLResult ** rs, TString *insert_query,
vector<Int_t> *vc, TSQLRow **r) :
fResultPtr(rs),fRowPtr(r)
{
SetName(name);
SetTitle(title);
fClassName = "TBasketSQL";
fBufferSize = branch->GetBasketSize();
fNevBufSize = branch->GetEntryOffsetLen();
fNevBuf = 0;
fEntryOffset = 0;
fDisplacement= 0;
fBuffer = 0;
fInsertQuery = insert_query;
if (vc==0) {
fBufferRef = 0;
} else {
fBufferRef = new TBufferSQL(TBuffer::kWrite, fBufferSize, vc, fInsertQuery, fRowPtr);
}
fHeaderOnly = kTRUE;
fLast = 0;
fBuffer = 0;
fBranch = branch;
fHeaderOnly = kFALSE;
if (fNevBufSize) {
fEntryOffset = new Int_t[fNevBufSize];
for (Int_t i=0;i<fNevBufSize;i++) fEntryOffset[i] = 0;
}
branch->GetTree()->IncrementTotalBuffers(fBufferSize);
}
TBasketSQL::~TBasketSQL()
{
}
void TBasketSQL::CreateBuffer(const char *name, TString title,
vector<Int_t> *vc,
TBranch *branch, TSQLResult ** rs)
{
fResultPtr = rs;
SetName(name);
SetTitle(title);
fClassName = "TBasketSQL";
fBufferSize = branch->GetBasketSize();
fNevBufSize = branch->GetEntryOffsetLen();
fNevBuf = 0;
fEntryOffset = 0;
fDisplacement= 0;
fBuffer = 0;
if(vc==0) {
fBufferRef = 0;
Error("CreateBuffer","Need a vector of columns\n");
} else {
fBufferRef = new TBufferSQL(TBuffer::kWrite, fBufferSize, vc, fInsertQuery, fRowPtr);
}
fHeaderOnly = kTRUE;
fLast = 0;
fBuffer = 0;
fBranch = branch;
fHeaderOnly = kFALSE;
if (fNevBufSize) {
fEntryOffset = new Int_t[fNevBufSize];
for (Int_t i=0;i<fNevBufSize;i++) fEntryOffset[i] = 0;
}
branch->GetTree()->IncrementTotalBuffers(fBufferSize);
}
void TBasketSQL::PrepareBasket(Long64_t entry)
{
((TBufferSQL*)fBufferRef)->ResetOffset();
((TTreeSQL*)fBranch->GetTree())->PrepEntry(entry);
fBufferRef->Reset();
}
Int_t TBasketSQL::ReadBasketBytes(Long64_t , TFile *)
{
Error("ReadBasketBytes","This member function should not be called!");
return 0;
}
Int_t TBasketSQL::ReadBasketBuffers(Long64_t , Int_t, TFile *)
{
Error("ReadBasketBuffers","This member function should not be called!");
return 0;
}
void TBasketSQL::Update(Int_t, Int_t)
{
((TBufferSQL*)fBufferRef)->ResetOffset();
fNevBuf++;
}
#endif
ROOT page - Class index - Class Hierarchy - Top of the page
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.