33 |
using namespace std; |
using namespace std; |
34 |
|
|
35 |
Q2TH::Q2TH(TString host, TString user, TString psw){ |
Q2TH::Q2TH(TString host, TString user, TString psw){ |
36 |
|
this->Open(host,user,psw); |
37 |
|
}; |
38 |
|
|
39 |
|
void Q2TH::Open(TString host, TString user, TString psw){ |
40 |
fh = gSystem->ExpandPathName(host.Data()); |
fh = gSystem->ExpandPathName(host.Data()); |
41 |
fu = gSystem->ExpandPathName(user.Data()); |
fu = gSystem->ExpandPathName(user.Data()); |
42 |
fp = gSystem->ExpandPathName(psw.Data()); |
fp = gSystem->ExpandPathName(psw.Data()); |
43 |
|
printf(" Connecting to DB %s \n",fh.Data()); |
44 |
dbc = TSQLServer::Connect(fh.Data(),fu.Data(),fp.Data()); |
dbc = TSQLServer::Connect(fh.Data(),fu.Data(),fp.Data()); |
45 |
|
if ( dbc && dbc->IsConnected() ){ |
46 |
|
printf(" connected! \n"); |
47 |
|
} else { |
48 |
|
printf(" ERROR! not connected... :( \n"); |
49 |
|
}; |
50 |
}; |
}; |
51 |
|
|
52 |
TObject *Q2TH::Draw(TString query, Bool_t verbose, TString hname){ |
TObject *Q2TH::Draw(TString query, Bool_t verbose, TString hname){ |