Changeset 1010 for sans/Dev


Ignore:
Timestamp:
Sep 8, 2016 10:14:58 AM (7 years ago)
Author:
srkline
Message:

adding conditional compile checks to be sure that the XOPs are present for the version of Igor that is running. If XOPs are not present, user is notified.

Location:
sans/Dev/trunk/NCNR_User_Procedures
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • sans/Dev/trunk/NCNR_User_Procedures/Analysis/Packages/ModelPicker/SANSModelPicker_v40.ipf

    r1001 r1010  
    4545                Procedure_List() 
    4646//              AutoPositionWindow/M=1/R=WrapperPanel Procedure_List            //keep it on-screen 
     47 
    4748        endif 
    4849End 
     
    575576Function FileList_InsertButtonProc(ctrlName) : ButtonControl 
    576577        String ctrlName 
     578 
     579// add a check here to warn users if the XOP functions are not present 
     580#if exists("SphereFormX") 
     581        // XOP present, all is OK 
     582#else 
     583        // XOP is not present, warn the user to re-run the installer 
     584        //check the 32-bit or 64-bit 
     585        String igorKindStr = StringByKey("IGORKIND", IgorInfo(0) ) 
     586        String alertStr 
     587        if(strsearch(igorKindStr, "64", 0 ) != -1) 
     588                alertStr = "The SANSAnalysis XOP is not installed for the 64-bit version of Igor. " 
     589                alertStr += "It is recommended that you re-run the NCNR Installer. Click YES to stop and " 
     590                alertStr += "do the installation, or NO to continue with the analysis." 
     591        else 
     592                alertStr = "The SANSAnalysis XOP is not installed for the 32-bit version of Igor. " 
     593                alertStr += "It is recommended that you re-run the NCNR Installer. Click YES to stop and " 
     594                alertStr += "do the installation, or NO to continue with the analysis." 
     595        endif 
     596        DoAlert 1,alertStr       
     597 
     598        if(V_flag == 1) 
     599                // get out gracefully 
     600                SetDataFolder root: 
     601                return(0) 
     602        endif 
     603 
     604#endif 
    577605         
    578606        //loop through the selected files in the list... 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/EventModeProcessing.ipf

    r1008 r1010  
    989989        LoadEvents_XOP() 
    990990#else 
     991        // XOP is not present, warn the user to re-run the installer 
     992        //check the 32-bit or 64-bit 
     993        String igorKindStr = StringByKey("IGORKIND", IgorInfo(0) ) 
     994        String alertStr 
     995        if(strsearch(igorKindStr, "64", 0 ) != -1) 
     996                alertStr = "The Event Loader XOP is not installed for the 64-bit version of Igor. Without it, event loading will " 
     997                alertStr += "be slow. It is recommended that you re-run the NCNR Installer. Click YES to stop and " 
     998                alertStr += "do the installation, or NO to continue with the file loading." 
     999        else 
     1000                alertStr = "The Event Loader XOP is not installed for the 32-bit version of Igor. Without it, event loading will " 
     1001                alertStr += "be slow. It is recommended that you re-run the NCNR Installer. Click YES to stop and " 
     1002                alertStr += "do the installation, or NO to continue with the file loading." 
     1003        endif 
     1004        DoAlert 1,alertStr 
     1005         
     1006        if(V_flag == 1) 
     1007                // get out gracefully 
     1008                SetDataFolder root: 
     1009                return(0) 
     1010        endif 
     1011         
    9911012        LoadEvents() 
    9921013#endif   
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/MultScatter_MonteCarlo_2D.ipf

    r911 r1010  
    144144 
    145145// make sure that the XOP exists if we are going to thread       
    146 #if exists("Monte_SANSX4") 
     146#if exists("Monte_SANSX4NNN") 
    147147        //OK 
    148148        if(nthreads>4)          //only support 4 processors until I can figure out how to properly thread the XOP and to loop it 
     
    151151        endif 
    152152#else 
     153 
    153154        nthreads = 1 
    154155#endif 
     
    13501351                case 2: // mouse up 
    13511352                        // click code here 
     1353#if (exists("Monte_SANSX"))      
     1354        // XOP exists, all is OK 
     1355#else            
     1356        // XOP is not present, warn the user to re-run the installer 
     1357        //check the 32-bit or 64-bit 
     1358        String igorKindStr = StringByKey("IGORKIND", IgorInfo(0) ) 
     1359        String alertStr 
     1360        if(strsearch(igorKindStr, "64", 0 ) != -1) 
     1361                alertStr = "The MonteCarlo XOP is not installed for the 64-bit version of Igor. Without it, simulation will " 
     1362                alertStr += "be slow. It is recommended that you re-run the NCNR Installer. Click YES to stop and " 
     1363                alertStr += "do the installation, or NO to continue with the simulation." 
     1364        else 
     1365                alertStr = "The MonteCarlo XOP is not installed for the 32-bit version of Igor. Without it, simulation will " 
     1366                alertStr += "be slow. It is recommended that you re-run the NCNR Installer. Click YES to stop and " 
     1367                alertStr += "do the installation, or NO to continue with the simulation." 
     1368        endif 
     1369        DoAlert 1,alertStr       
     1370 
     1371        if(V_flag == 1) 
     1372                // get out gracefully 
     1373                SetDataFolder root: 
     1374                return(0) 
     1375        endif 
     1376#endif                   
     1377                         
    13521378                        NVAR doMC = root:Packages:NIST:SAS:gDoMonteCarlo 
    13531379                        doMC = 1 
Note: See TracChangeset for help on using the changeset viewer.