Changeset 9292 for trunk/MagicSoft
- Timestamp:
- 02/03/09 13:28:09 (16 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mastro/MAstroCatalog.cc
r8999 r9292 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MAstroCatalog.cc,v 1.3 1 2008-07-14 19:59:08 tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: MAstroCatalog.cc,v 1.32 2009-02-03 13:27:58 tbretz Exp $ 3 3 ! -------------------------------------------------------------------------- 4 4 ! … … 169 169 using namespace std; 170 170 171 // Datacenter default path for catalogs 172 const TString MAstroCatalog::kDefaultPath="/magic/datacenter/setup"; 173 171 174 // -------------------------------------------------------------------------- 172 175 // … … 281 284 gLog << inf << "Reading Xephem catalog: " << catalog << endl; 282 285 286 gSystem->ExpandPathName(catalog); 287 if (gSystem->AccessPathName(catalog, kReadPermission)) 288 { 289 gLog << inf2 << "Searching Xephem catalog " << catalog << " in " << kDefaultPath << endl; 290 catalog.Prepend(kDefaultPath); 291 } 292 283 293 MZlib fin(catalog); 284 294 if (!fin) … … 362 372 gLog << inf << "Reading NGC2000 catalog: " << catalog << endl; 363 373 374 gSystem->ExpandPathName(catalog); 375 if (gSystem->AccessPathName(catalog, kReadPermission)) 376 { 377 gLog << inf2 << "Searching NGC2000 catalog " << catalog << " in " << kDefaultPath << endl; 378 catalog.Prepend(kDefaultPath); 379 } 380 364 381 MZlib fin(catalog); 365 382 if (!fin) … … 425 442 { 426 443 gLog << inf << "Reading Bright Star Catalog (BSC5) catalog: " << catalog << endl; 444 445 gSystem->ExpandPathName(catalog); 446 if (gSystem->AccessPathName(catalog, kReadPermission)) 447 { 448 gLog << inf2 << "Searching Bright Star catalog " << catalog << " in " << kDefaultPath << endl; 449 catalog.Prepend(kDefaultPath); 450 } 427 451 428 452 MZlib fin(catalog); … … 497 521 { 498 522 gLog << inf << "Reading Heasarc PPM catalog: " << catalog << endl; 523 524 gSystem->ExpandPathName(catalog); 525 if (gSystem->AccessPathName(catalog, kReadPermission)) 526 { 527 gLog << inf2 << "Searching Heasarc PPM catalog " << catalog << " in " << kDefaultPath << endl; 528 catalog.Prepend(kDefaultPath); 529 } 499 530 500 531 MZlib fin(catalog); … … 601 632 602 633 gLog << inf << "Reading MAstroCatalog compressed catalog: " << catalog << endl; 634 635 gSystem->ExpandPathName(catalog); 636 if (gSystem->AccessPathName(catalog, kReadPermission)) 637 { 638 gLog << inf2 << "Searching MAstroCatalog comressed catalog " << catalog << " in " << kDefaultPath << endl; 639 catalog.Prepend(kDefaultPath); 640 } 603 641 604 642 MZlib fin(catalog); -
trunk/MagicSoft/Mars/mastro/MAstroCatalog.h
r8907 r9292 34 34 { 35 35 private: 36 static const TString kDefaultPath; //! Datacenter default path for catalogs 37 36 38 Double_t fLimMag; // [1] Limiting Magnitude 37 39 Double_t fRadiusFOV; // [deg] Radius of Field of View -
trunk/MagicSoft/Mars/mbase/MStatusDisplay.cc
r9195 r9292 1105 1105 fBatch->Add(c); 1106 1106 1107 *fLog << inf3 << "Adding Canvas '" << name << "' (" << c->GetWw() << "x"; 1108 *fLog << c->GetWh() << ", TCanvas=" << c << ")" << endl; 1109 1107 1110 // Remove the canvas from the global list to make sure it is 1108 1111 // not found by gROOT->FindObject -
trunk/MagicSoft/Mars/mcorsika/MCorsikaEvtHeader.h
r9252 r9292 30 30 31 31 Float_t fZd; // [rad] Zenith distance 32 Float_t fAz; // [rad] Azimuth (north=0; west=90)32 Float_t fAz; // [rad] Azimuth (north=0; east=90) 33 33 34 34 Float_t fX; // [cm] Position of telescope on ground x / - impact parameter x -
trunk/MagicSoft/Mars/mfileio/MWriteRootFile.cc
r9230 r9292 106 106 // -------------------------------------------------------------------------- 107 107 // 108 // Try to get the file from gROOT->GetListOfFiles. 108 // Try to get the file from gROOT->GetListOfFiles. (In case the file name 109 // is /dev/null we look for a file with name /dev/null and the given title) 109 110 // If it is found fOut is set to it and returned. 110 111 // Otherwise a new file is opened and returned. … … 112 113 TFile *MWriteRootFile::OpenFile(const char *name, Option_t *option, const char *title, Int_t comp) 113 114 { 114 TFile *file = dynamic_cast<TFile*>(gROOT->GetListOfFiles()->FindObject(name)); 115 116 // If the file was not found with its name try its expanded name 115 TFile *file = 0; 116 117 if (TString(name)=="/dev/null") 118 { 119 TIter Next(gROOT->GetListOfFiles()); 120 TObject *obj = 0; 121 while ((obj=Next())) 122 if (TString(obj->GetName())=="/dev/null" && TString(obj->GetTitle())==title) 123 { 124 *fLog << inf3 << "Found file '/dev/null' <Title=" << title << ">" << endl; 125 file = dynamic_cast<TFile*>(obj); 126 break; 127 } 128 } 129 else 130 { 131 file = dynamic_cast<TFile*>(gROOT->GetListOfFiles()->FindObject(name)); 132 133 // If the file was not found with its name try its expanded name 134 if (!file) 135 { 136 TString fqp(name); 137 gSystem->ExpandPathName(fqp); 138 file = dynamic_cast<TFile*>(gROOT->GetListOfFiles()->FindObject(fqp)); 139 } 140 } 141 117 142 if (!file) 118 {119 TString fqp(name);120 gSystem->ExpandPathName(fqp);121 file = dynamic_cast<TFile*>(gROOT->GetListOfFiles()->FindObject(fqp));122 }123 124 if (!file || TString(name)=="/dev/null")125 143 { 126 144 file = new TFile(name, option, title, comp); … … 130 148 return NULL; 131 149 } 150 151 *fLog << inf3 << "New file '" << name << "' <Title=" << title << "> created." << endl; 132 152 133 153 file->SetOption(option); // IMPORTANT! … … 143 163 *fLog << inf; 144 164 *fLog << "File '" << name << "' already open... using." << endl; 165 *fLog << inf3; 145 166 *fLog << "Make sure that you do NOT write to trees which are" << endl; 146 167 *fLog << "scheduled already by a different MWriteRootFile..." << endl; … … 170 191 // ftitle: File title stored in the file (see TFile) 171 192 // name, title: Name and title of this object 193 // 194 // Until the first file is opened a dummy file with name /dev/null is 195 // opened to allow creation of trees and branches in the file. 196 // To distinguish between different /dev/null-files the given title is used. 172 197 // 173 198 MWriteRootFile::MWriteRootFile(const Int_t comp, -
trunk/MagicSoft/Mars/mhflux/MHEffectiveOnTime.cc
r9153 r9292 908 908 { 909 909 Double_t res[7]; 910 FitH(h, res, kTRUE);911 PaintText(res);910 if (FitH(h, res, kTRUE)) 911 PaintText(res); 912 912 } 913 913 return; -
trunk/MagicSoft/Mars/mjobs/MJStar.cc
r9288 r9292 301 301 // Muons needs its own to have a unique SetReadyToSave 302 302 const TString rule(Form("s/([0-9]+(_M[12])?_[0-9.]+)_Y_(.*[.]root)$/%s\\/$1_I_$3/", Esc(fPathOut).Data())); 303 MWriteRootFile write( 2, rule, fOverwrite?"RECREATE":"NEW" );304 MWriteRootFile writet(2, rule, fOverwrite?"RECREATE":"NEW" ); // EffectiveOnTime305 MWriteRootFile writem(2, rule, fOverwrite?"RECREATE":"NEW" ); // Muons303 MWriteRootFile write( 2, rule, fOverwrite?"RECREATE":"NEW", "Image parameters"); 304 MWriteRootFile writet(2, rule, fOverwrite?"RECREATE":"NEW", "Image parameters"); // EffectiveOnTime 305 MWriteRootFile writem(2, rule, fOverwrite?"RECREATE":"NEW", "Image parameters"); // Muons 306 306 writem.SetName("WriteMuons"); 307 307 -
trunk/MagicSoft/Mars/mreport/MReportCC.cc
r9289 r9292 153 153 str.Remove(0, pos2); 154 154 155 // Remove a leading minus. FIXME: What is its meaning? 155 // Remove a leading minus. The negative numbers are error codes introduced 156 // by Arehucas. It's only meant for the GRB monitor to change the priority 157 // of its alerts. 156 158 if (str2[0]=='-') 157 159 str2.Remove(0, 1); … … 159 161 if (!str2.IsDigit()) 160 162 { 161 *fLog << warn << "WARNING - Wrong type of second argument : " << str2 << endl;163 *fLog << warn << "WARNING - Wrong type of second argument (obs. category): " << str2 << endl; 162 164 return kFALSE; 163 165 }
Note:
See TracChangeset
for help on using the changeset viewer.