113 |
orb_obj = 0; |
orb_obj = 0; |
114 |
|
|
115 |
run_obj = 0;//new GL_RUN(); |
run_obj = 0;//new GL_RUN(); |
116 |
|
soft_obj = 0;// Emiliano |
117 |
|
|
118 |
|
|
119 |
for(Int_t i=0; i<8; i++ )tree_clone[i]=NULL; |
for(Int_t i=0; i<8; i++ )tree_clone[i]=NULL; |
144 |
void PamLevel2::Delete(){ |
void PamLevel2::Delete(){ |
145 |
|
|
146 |
if(run_obj)delete run_obj; |
if(run_obj)delete run_obj; |
147 |
|
if(soft_obj)delete soft_obj; //Emiliano |
148 |
|
|
149 |
// cout << "void PamLevel2::Clear()"<<endl; |
// cout << "void PamLevel2::Clear()"<<endl; |
150 |
if(trk1_obj) delete trk1_obj; |
if(trk1_obj) delete trk1_obj; |
175 |
void PamLevel2::Clear(){ |
void PamLevel2::Clear(){ |
176 |
|
|
177 |
// cout << "void PamLevel2::Clear()"<<endl; |
// cout << "void PamLevel2::Clear()"<<endl; |
178 |
if(run_obj)delete run_obj; |
|
179 |
|
// |
180 |
|
// if(run_obj)delete run_obj; |
181 |
|
if(run_obj) run_obj->Clear(); // Emiliano: Do not deallocate run_obj here, it will give segmentation fault! call clear instead |
182 |
|
if(soft_obj) soft_obj->Clear(); |
183 |
|
|
184 |
if(trk1_obj) trk1_obj->Clear(); |
if(trk1_obj) trk1_obj->Clear(); |
185 |
if(trk2_obj) trk2_obj->Clear(); |
if(trk2_obj) trk2_obj->Clear(); |
215 |
TString objname = c; |
TString objname = c; |
216 |
|
|
217 |
if(!objname.CompareTo("TrkLevel1")) { |
if(!objname.CompareTo("TrkLevel1")) { |
218 |
if(!trk1_obj) trk1_obj = new TrkLevel1(); |
if(!trk1_obj){ |
219 |
|
trk1_obj = new TrkLevel1(); |
220 |
|
trk1_obj->Set(); |
221 |
|
} |
222 |
return &trk1_obj; |
return &trk1_obj; |
223 |
}; |
}; |
224 |
if(!objname.CompareTo("TrkLevel2")) { |
if(!objname.CompareTo("TrkLevel2")) { |
225 |
if(!trk2_obj) trk2_obj = new TrkLevel2(); |
if(!trk2_obj){ |
226 |
|
trk2_obj = new TrkLevel2(); |
227 |
|
trk2_obj->Set(); |
228 |
|
} |
229 |
return &trk2_obj; |
return &trk2_obj; |
230 |
}; |
}; |
231 |
if(!objname.CompareTo("TrkHough")) { |
if(!objname.CompareTo("TrkHough")) { |
237 |
return &calo1_obj; |
return &calo1_obj; |
238 |
}; |
}; |
239 |
if(!objname.CompareTo("CaloLevel2")) { |
if(!objname.CompareTo("CaloLevel2")) { |
240 |
if(!calo2_obj) calo2_obj = new CaloLevel2(); |
if(!calo2_obj){ |
241 |
|
calo2_obj = new CaloLevel2(); |
242 |
|
calo2_obj->Set(); |
243 |
|
}; |
244 |
return &calo2_obj; |
return &calo2_obj; |
245 |
}; |
}; |
246 |
if(!objname.CompareTo("ToFLevel2")) { |
if(!objname.CompareTo("ToFLevel2")) { |
247 |
if(!tof_obj) tof_obj = new ToFLevel2(); |
if(!tof_obj){ |
248 |
|
tof_obj = new ToFLevel2(); |
249 |
|
tof_obj->Set(); |
250 |
|
} |
251 |
return &tof_obj; |
return &tof_obj; |
252 |
}; |
}; |
253 |
if(!objname.CompareTo("TrigLevel2")) { |
if(!objname.CompareTo("TrigLevel2")) { |
272 |
}; |
}; |
273 |
|
|
274 |
if(!objname.CompareTo("RunInfo"))return &run_obj; |
if(!objname.CompareTo("RunInfo"))return &run_obj; |
275 |
|
|
276 |
|
if(!objname.CompareTo("SoftInfo"))return &soft_obj; // Emiliano |
277 |
|
|
278 |
return NULL; |
return NULL; |
279 |
}; |
}; |
280 |
//-------------------------------------- |
//-------------------------------------- |
915 |
TList *contents = new TList; // create output list |
TList *contents = new TList; // create output list |
916 |
contents->SetOwner(); |
contents->SetOwner(); |
917 |
|
|
918 |
char *fullpath; |
// char *fullpath; |
919 |
|
const char *fullpath; |
920 |
|
|
921 |
// if no input file list is given: |
// if no input file list is given: |
922 |
if ( flisttxt != "" ){ |
if ( flisttxt != "" ){ |
923 |
|
|
924 |
if( !gSystem->IsFileInIncludePath(flisttxt,&fullpath) ){ |
// if( !gSystem->IsFileInIncludePath(flisttxt,&fullpath) ){ |
925 |
|
if( !(fullpath = gSystem->FindFile("./",flisttxt)) ){ |
926 |
cout <<"File "<<flisttxt<<" not found"<<endl; |
cout <<"File "<<flisttxt<<" not found"<<endl; |
927 |
return 0; |
return 0; |
928 |
} |
} |
929 |
// flisttxt = gSystem->ConcatFileName(gSystem->DirName(flisttxt),gSystem->BaseName(flisttxt)); |
// flisttxt = gSystem->ConcatFileName(gSystem->DirName(flisttxt),gSystem->BaseName(flisttxt)); |
930 |
flisttxt = fullpath; |
flisttxt = fullpath; |
931 |
|
|
932 |
if( !gSystem->ChangeDirectory(ddir) ){ |
if( !gSystem->ChangeDirectory(ddir) ){ |
933 |
cout << "Cannot change directory : "<<ddir<<endl; |
cout << "Cannot change directory : "<<ddir<<endl; |
934 |
return 0; |
return 0; |
950 |
} |
} |
951 |
if(file.Contains("#"))file = file(0,file.First("#")); |
if(file.Contains("#"))file = file(0,file.First("#")); |
952 |
// cout <<"(2) " << file << endl; |
// cout <<"(2) " << file << endl; |
953 |
if( gSystem->IsFileInIncludePath(file,&fullpath) ){ |
// if( gSystem->IsFileInIncludePath(file,&fullpath) ){ |
954 |
|
if( (fullpath = gSystem->FindFile(ddir,file)) ){ |
955 |
|
|
956 |
contents->Add(new TSystemFile(fullpath,gSystem->DirName(fullpath)));// add file to the list |
contents->Add(new TSystemFile(fullpath,gSystem->DirName(fullpath)));// add file to the list |
957 |
|
|
979 |
while ( (questo = (TSystemFile*) next()) ) { |
while ( (questo = (TSystemFile*) next()) ) { |
980 |
TString name = questo-> GetName(); |
TString name = questo-> GetName(); |
981 |
if( name.EndsWith(".root") ){ |
if( name.EndsWith(".root") ){ |
982 |
char *fullpath; |
const char *fullpath = gSystem->FindFile(ddir,name); |
983 |
gSystem->IsFileInIncludePath(name,&fullpath); |
// char *fullpath; |
984 |
|
// gSystem->IsFileInIncludePath(name,&fullpath); |
985 |
contents->Add(new TSystemFile(fullpath,gSystem->DirName(fullpath))); |
contents->Add(new TSystemFile(fullpath,gSystem->DirName(fullpath))); |
986 |
}; |
}; |
987 |
} |
} |
1383 |
|
|
1384 |
R->SetBranchAddress("RunInfo", GetPointerTo("RunInfo")); |
R->SetBranchAddress("RunInfo", GetPointerTo("RunInfo")); |
1385 |
cout << "Run : set branch address RunInfo"<<endl; |
cout << "Run : set branch address RunInfo"<<endl; |
1386 |
|
R->SetBranchAddress("SoftInfo", GetPointerTo("SoftInfo")); // Emiliano |
1387 |
|
cout << "Software : set branch address SoftInfo"<<endl; // Emiliano |
1388 |
|
|
1389 |
return R; |
return R; |
1390 |
|
|
1405 |
|
|
1406 |
R->SetBranchAddress("RunInfo", GetPointerTo("RunInfo")); |
R->SetBranchAddress("RunInfo", GetPointerTo("RunInfo")); |
1407 |
cout << "Run : set branch address RunInfo"<<endl; |
cout << "Run : set branch address RunInfo"<<endl; |
1408 |
|
R->SetBranchAddress("SoftInfo", GetPointerTo("SoftInfo")); // Emiliano |
1409 |
|
cout << "Software : set branch address SoftInfo"<<endl; // Emiliano |
1410 |
|
|
1411 |
return R; |
return R; |
1412 |
|
|