Changeset 19550 for trunk/Mars
- Timestamp:
- 06/05/19 13:22:25 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mars/mcorsika/MCorsikaRead.cc
r19540 r19550 208 208 const UInt_t telid = atoi(res->At(3)->GetName()); 209 209 210 *fLog << inf2 << "Run " << runid << " detected to be for t he " << telid << "-th telescope."<< endl;211 212 if ( fNumTelescopes<telid)210 *fLog << inf2 << "Run " << runid << " detected to be for telescope #" << telid << endl; 211 212 if (telid>=fNumTelescopes) 213 213 { 214 214 *fLog << err << "Position of telescope " << telid << " not defined." << endl; … … 217 217 218 218 *fLog << inf << "Telescope #" << telid << " [X/Y/Z (R)]: "; 219 *fLog << fTelescopeX[telid -1] << "/";220 *fLog << fTelescopeY[telid -1] << "/";221 *fLog << fTelescopeZ[telid -1] << " (R=" << fTelescopeR[telid-1] << ")" << endl;222 223 fNumTelescope = telid ;219 *fLog << fTelescopeX[telid] << "/"; 220 *fLog << fTelescopeY[telid] << "/"; 221 *fLog << fTelescopeZ[telid] << " (R=" << fTelescopeR[telid] << ")" << endl; 222 223 fNumTelescope = telid+1; 224 224 } 225 225 delete res; … … 774 774 { 775 775 Bool_t rc = kFALSE; 776 if (IsEnvDefined(env, prefix, "Telescope Index", print))776 if (IsEnvDefined(env, prefix, "TelescopeX", print) || IsEnvDefined(env, prefix, "TelescopeY", print)) 777 777 { 778 778 rc = kTRUE; 779 fNumTelescope = GetEnvValue(env, prefix, "TelescopeIndex", 0);780 779 781 780 fTelescopeX.Set(1); … … 828 827 { 829 828 const UInt_t idx = atoi(res->At(9)->GetName()); 830 if (idx==0)831 {832 *fLog << warn << "Telescope with index 0 ignored." << endl;833 delete res;834 continue;835 }836 829 if (idx>=fNumTelescopes) 837 830 { 838 f TelescopeX.Set(idx);839 fTelescope Y.Set(idx);840 fTelescope Z.Set(idx);841 fTelescope R.Set(idx);842 f NumTelescopes = idx;831 fNumTelescopes = idx+1; 832 fTelescopeX.Set(fNumTelescopes); 833 fTelescopeY.Set(fNumTelescopes); 834 fTelescopeZ.Set(fNumTelescopes); 835 fTelescopeR.Set(fNumTelescopes); 843 836 } 844 837 845 fTelescopeX[idx -1] = atof(res->At(1)->GetName());846 fTelescopeY[idx -1] = atof(res->At(3)->GetName());847 fTelescopeZ[idx -1] = atof(res->At(5)->GetName());848 fTelescopeR[idx -1] = atof(res->At(7)->GetName());838 fTelescopeX[idx] = atof(res->At(1)->GetName()); 839 fTelescopeY[idx] = atof(res->At(3)->GetName()); 840 fTelescopeZ[idx] = atof(res->At(5)->GetName()); 841 fTelescopeR[idx] = atof(res->At(7)->GetName()); 849 842 } 850 843 delete res; 851 844 } 852 845 853 854 846 for (int i=0; i<fNumTelescopes; i++) 855 847 { 856 *fLog << all << "Telescope #" << setw(4) << i +1<< " [X/Y/Z (R)]: ";848 *fLog << all << "Telescope #" << setw(4) << i << " [X/Y/Z (R)]: "; 857 849 *fLog << setw(7) << fTelescopeX[i] << "/"; 858 850 *fLog << setw(7) << fTelescopeY[i] << "/";
Note:
See TracChangeset
for help on using the changeset viewer.