| 1522 |
*/ |
*/ |
| 1523 |
PamTrack *PamLevel2::GetTrackImage(int it){ |
PamTrack *PamLevel2::GetTrackImage(int it){ |
| 1524 |
|
|
|
// if(!trk2_obj) return 0; |
|
|
|
|
|
// // *-*-*-*-*-*-*-*-*-*-*-*-* |
|
|
// SortTracks("+CAL+TOF"); |
|
|
// // *-*-*-*-*-*-*-*-*-*-*-*-* |
|
|
// // if(!sorted_tracks)return 0; |
|
|
// if(sorted_tracks.IsEmpty())return 0; |
|
|
|
|
|
// PamTrack *image = 0; |
|
|
|
|
|
// if( it >=0 && it < trk2_obj->TrkLevel2::GetNTracks() ){ |
|
|
// TrkTrack *temp = (TrkTrack*)sorted_tracks.At(it); |
|
|
// if( temp->HasImage() ){ |
|
|
// TrkTrack *t = trk2_obj->TrkLevel2::GetStoredTrack(temp->GetImageSeqNo()); |
|
|
// image = GetPamTrackAlong(t); |
|
|
// }else{ |
|
|
// cout <<"PamLevel2::GetTrackImage(int) : Track SeqNo "<<it<<" does not have image"<<endl; |
|
|
// }; |
|
|
// }else{ |
|
|
// cout << "PamLevel2::GetTrackImage(int) : Tracker track SeqNo "<< it <<" does not exist (GetNTracks() = "<<trk2_obj->TrkLevel2::GetNTracks()<<")"<<endl; |
|
|
// }; |
|
|
|
|
|
// return image; |
|
|
|
|
|
|
|
| 1525 |
// *-*-*-*-*-*-*-*-*-*-*-*-* |
// *-*-*-*-*-*-*-*-*-*-*-*-* |
| 1526 |
SortTracks(); |
SortTracks(); |
| 1527 |
// *-*-*-*-*-*-*-*-*-*-*-*-* |
// *-*-*-*-*-*-*-*-*-*-*-*-* |
| 2145 |
if(GP) { |
if(GP) { |
| 2146 |
// GetPointerTo("GPamela"); |
// GetPointerTo("GPamela"); |
| 2147 |
if(!gp_obj)gp_obj = new GPamela(); |
if(!gp_obj)gp_obj = new GPamela(); |
| 2148 |
gp_obj->SetBranchAddress(t); //ho dovuto fare in maniera diversa dagli altri |
// gp_obj->SetBranchAddress(t); //ho dovuto fare in maniera diversa dagli altri |
| 2149 |
// t->SetBranchAddress("GPamela", GetPointerTo("GPamela")); |
// // t->SetBranchAddress("GPamela", GetPointerTo("GPamela")); |
| 2150 |
|
if(SELLI) t->SetBranchAddress("GPamela", GetPointerTo("GPamela")); |
| 2151 |
|
else gp_obj->SetBranchAddress(t); //ho dovuto fare in maniera diversa dagli altri |
| 2152 |
|
|
| 2153 |
cout << "h20 : set branch address GPamela "<<endl; |
cout << "h20 : set branch address GPamela "<<endl; |
| 2154 |
}; |
}; |
| 2155 |
|
|
| 2231 |
if(GP) { |
if(GP) { |
| 2232 |
// GetPointerTo("GPamela"); |
// GetPointerTo("GPamela"); |
| 2233 |
if(!gp_obj)gp_obj = new GPamela(); |
if(!gp_obj)gp_obj = new GPamela(); |
| 2234 |
gp_obj->SetBranchAddress(t); //ho dovuto fare in maniera diversa dagli altri |
if(SELLI) t->SetBranchAddress("GPamela", GetPointerTo("GPamela")); |
| 2235 |
|
else gp_obj->SetBranchAddress(t); //ho dovuto fare in maniera diversa dagli altri |
| 2236 |
|
// gp_obj->SetBranchAddress(t); //ho dovuto fare in maniera diversa dagli altri |
| 2237 |
cout << "h20 : set branch address GPamela "<<endl; |
cout << "h20 : set branch address GPamela "<<endl; |
| 2238 |
}; |
}; |
| 2239 |
// SelectionList |
// SelectionList |
| 4020 |
*/ |
*/ |
| 4021 |
Bool_t PamLevel2::SetDBConnection(){ |
Bool_t PamLevel2::SetDBConnection(){ |
| 4022 |
|
|
| 4023 |
cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<endl; |
if(DBG){ |
| 4024 |
cout<<"Connecting to DB"<<endl; |
cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<endl; |
| 4025 |
cout<<"HOST "<<host<<endl; |
cout<<"Connecting to DB"<<endl; |
| 4026 |
cout<<"USER "<<user<<endl; |
cout<<"HOST "<<host<<endl; |
| 4027 |
cout<<"PSW "<<psw<<endl; |
cout<<"USER "<<user<<endl; |
| 4028 |
|
cout<<"PSW "<<psw<<endl; |
| 4029 |
|
} |
| 4030 |
dbc = TSQLServer::Connect(host.Data(),user.Data(),psw.Data()); |
dbc = TSQLServer::Connect(host.Data(),user.Data(),psw.Data()); |
| 4031 |
if( !dbc )return false; |
if( !dbc )return false; |
| 4032 |
if( !dbc->IsConnected() )return false; |
if( !dbc->IsConnected() )return false; |
| 4034 |
myquery.str(""); // EMILIANO |
myquery.str(""); // EMILIANO |
| 4035 |
myquery << "SET time_zone='+0:00'"; // EMILIANO |
myquery << "SET time_zone='+0:00'"; // EMILIANO |
| 4036 |
dbc->Query(myquery.str().c_str()); // EMILIANO |
dbc->Query(myquery.str().c_str()); // EMILIANO |
| 4037 |
cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<endl; |
if(DBG)cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<endl; |
| 4038 |
return true; |
return true; |
| 4039 |
|
|
| 4040 |
} |
} |