Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-04-09 07:49:19

0001 /**
0002 SOpticksResourceTest.cc : THIS IS GOING THE WAY OF THE DODO 
0003 ==============================================================
0004 
0005 **/
0006 
0007 #include "OPTICKS_LOG.hh"
0008 #include "SOpticksResource.hh"
0009 #include "SPath.hh"
0010 
0011 
0012 
0013 int main(int argc, char** argv)
0014 {
0015     OPTICKS_LOG(argc, argv); 
0016 
0017     const char* arg = argc > 1 ? argv[1] : nullptr ; 
0018 
0019     if( arg == nullptr )
0020     {
0021         LOG(info) << SOpticksResource::Dump() ; 
0022         std::cout << SOpticksResource::Desc() << std::endl ; 
0023     }
0024     else if( strcmp(arg, "--cfbase") == 0 )
0025     {
0026         std::cout << SOpticksResource::CFBase() << std::endl ; 
0027     }
0028     else if( strcmp(arg, "--resolve") == 0 )
0029     {
0030         const char* path = SPath::Resolve("$PrecookedDir", NOOP) ; 
0031         std::cout << "SPath::Resolve(\"$PrecookedDir\", NOOP) " << path  << std::endl ; 
0032     }
0033     else if( strcmp(arg, "--dod") == 0 )
0034     {
0035         const char* path = SPath::Resolve("$DefaultOutputDir", NOOP) ; 
0036         std::cout << "SPath::Resolve(\"$DefaultOutputDir\", NOOP) " << path  << std::endl ; 
0037     }
0038     else if( strcmp(arg, "--ddod") == 0 )
0039     {
0040         std::string desc = SOpticksResource::Desc_DefaultOutputDir() ; 
0041         std::cout << "SOpticksResource::Desc_DefaultOutputDir() " << std::endl << desc  << std::endl ; 
0042     }
0043     else if( strcmp(arg, "--exe") == 0 )
0044     {
0045         const char* exe = SOpticksResource::ExecutableName() ; 
0046         std::cout << "SOpticksResource::ExecutableName() " << exe  << std::endl ; 
0047     }
0048     else
0049     {
0050         LOG(error) << " arg [" << arg << "] is not handled " ; 
0051     }
0052 
0053  
0054     return 0 ; 
0055 }
0056 // om- ; TEST=SOpticksResourceTest om-t
0057 
0058