Back to home page

EIC code displayed by LXR

 
 

    


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

0001 
0002 #include "OPTICKS_LOG.hh"
0003 #include "spath.h"
0004 #include "scuda.h"
0005 
0006 #include "NP.hh"
0007 #include "QBase.hh"
0008 #include "QCerenkov.hh"
0009 
0010 const char* BASE = "$TMP/QCerenkovTest" ; 
0011 
0012 void test_check(QCerenkov& ck)
0013 {
0014     ck.check(); 
0015 }
0016 
0017 void test_lookup(QCerenkov& ck)
0018 {
0019     NP* icdf_dst = ck.lookup(); 
0020     if( icdf_dst == nullptr ) return ; 
0021 
0022     const char* fold = spath::Resolve("$TMP/QCerenkovTest/test_lookup") ; 
0023     LOG(info) << " save to " << fold ; 
0024 
0025     icdf_dst->save(fold, "icdf_dst.npy"); 
0026     ck.icdf->save(fold,  "icdf_src.npy") ; 
0027 }
0028 
0029 
0030 int main(int argc, char** argv)
0031 {
0032     OPTICKS_LOG(argc, argv); 
0033     char d = 'L' ; 
0034     char t = argc > 1 ? argv[1][0] : d  ; 
0035     LOG(info) << " t " << t ; 
0036 
0037     LOG(info) << "[ QCerenkov " ; 
0038 
0039     QBase qb ;
0040     LOG(info) << " qb.desc " << qb.desc() ;  
0041 
0042 
0043     QCerenkov ck ;  
0044     LOG(info) << "] QCerenkov " ; 
0045 
0046     if( t == 'L' )
0047     {
0048         test_lookup(ck); 
0049     }
0050     else if( t == 'C' )
0051     {
0052         test_check(ck); 
0053     }
0054 
0055     return 0 ; 
0056 }
0057