File indexing completed on 2026-04-10 07:50:28
0001 #include <csignal>
0002 #include "spho.h"
0003 #include "U4Track.h"
0004 #include "STrackInfo.h"
0005
0006
0007 int main(int argc, char** argv)
0008 {
0009 G4Track* track = U4Track::MakePhoton();
0010 spho p0 = {1, 2, 3, {10,20,30,40}} ;
0011
0012 STrackInfo::Set(track, p0 );
0013 const G4Track* ctrack = track ;
0014
0015 std::cout << U4Track::Desc(ctrack) << std::endl ;
0016
0017 spho p1 = STrackInfo::Get(ctrack);
0018
0019 bool p1_expect = p1.isIdentical(p0) ;
0020 assert( p1_expect );
0021 if(!p1_expect) std::raise(SIGINT);
0022
0023 spho* p2 = STrackInfo::GetRef(ctrack);
0024
0025 bool p2_expect = p2->isIdentical(p0) ;
0026 assert( p2_expect );
0027 if(!p2_expect) std::raise(SIGINT);
0028
0029 p2->uc4.w = 'Z' ;
0030
0031 std::cout << U4Track::Desc(ctrack) << std::endl ;
0032
0033
0034 return 0 ;
0035 }
0036