Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-04-10 07:50:27

0001 /**
0002 G4ThreeVectorTest.cc
0003 ======================
0004 
0005 ::
0006 
0007     g4-cls ThreeVector
0008 
0009 **/
0010 
0011 
0012 #include <iostream>
0013 #include "G4ThreeVector.hh"
0014 
0015 int main(int argc, char** argv)
0016 {
0017     G4ThreeVector a(1., 2., 3.); 
0018     a.set(10.,20.,30.); 
0019 
0020     std::cout << " sizeof(a) " << sizeof(a) << std::endl ; 
0021     std::cout << " sizeof(double)*3 " << sizeof(double)*3  << std::endl; 
0022 
0023     const double* aa = (const double*)&a ; 
0024     for(int i=0 ; i < 3 ; i++ ) std::cout << aa[i] << std::endl ;   
0025 
0026     return 0 ; 
0027 }