Changeset 9039 for trunk/MagicSoft/Mars/mbase
- Timestamp:
- 07/23/08 14:15:14 (16 years ago)
- Location:
- trunk/MagicSoft/Mars/mbase
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mbase/MStatusArray.cc
r9026 r9039 44 44 #include "MStatusArray.h" 45 45 46 #include <TH1.h> // TH1::AddDirectoryStatus(); 46 #include <TH1.h> // TH1::AddDirectoryStatus(); 47 #include <TFile.h> // gFile 47 48 #include <TClass.h> 48 49 #include <TCanvas.h> … … 344 345 Delete(); 345 346 347 const TString keyname = name?name:"MStatusDisplay"; 348 349 // Check if key exists (to suppress an error on the console 350 if (!gDirectory->GetListOfKeys()->FindObject(keyname)) 351 { 352 gLog << inf << keyname << " [MStatusArray] not found." << endl; 353 return 0; 354 } 355 346 356 // Make sure newly read histograms are not added to the current directory 347 357 const Bool_t store = TH1::AddDirectoryStatus(); 348 358 TH1::AddDirectory(kFALSE); 349 const Int_t rc = TObjArray::Read( name?name:"MStatusDisplay");359 const Int_t rc = TObjArray::Read(keyname); 350 360 TH1::AddDirectory(store); 351 361 -
trunk/MagicSoft/Mars/mbase/MStatusDisplay.cc
r9038 r9039 2239 2239 list.Add(new TNamed(GetName(), GetTitle())); 2240 2240 2241 c->SetTitle(gFile->GetName()); 2241 2242 list.Add(c); 2242 2243 } … … 2246 2247 if (list.GetEntries()==0) 2247 2248 { 2248 *fLog << warn << "MStatusDisplay::Read: No objects read ."<< endl;2249 *fLog << warn << "MStatusDisplay::Read: No objects read from " << gFile->GetName() << endl; 2249 2250 return 0; 2250 2251 }
Note:
See TracChangeset
for help on using the changeset viewer.