Back to home page

EIC code displayed by LXR

 
 

    


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

0001 #include "SFastSim_Debug.hh"
0002 #include "NP.hh"    
0003 #include "SLOG.hh"
0004 
0005 const plog::Severity SFastSim_Debug::LEVEL = SLOG::EnvLevel("SFastSim_Debug", "DEBUG" ); 
0006 std::vector<SFastSim_Debug> SFastSim_Debug::record = {} ;
0007 
0008 void SFastSim_Debug::Save(const char* dir)
0009 {
0010     LOG(LEVEL) << " dir " << dir << " num_record " << record.size() ;
0011     std::cout  
0012         << "SFastSim_Debug::Save"
0013         << " dir " << dir 
0014         << " num_record " << record.size() 
0015         << std::endl 
0016         ;
0017     if( record.size() > 0) NP::Write<double>(dir, NAME, (double*)record.data(), record.size(), NUM_QUAD, 4 );  
0018     record.clear(); 
0019 }
0020 
0021 void SFastSim_Debug::add()
0022 {
0023     LOG(LEVEL) << "num_record " << record.size() ;
0024     if(record.size() < LIMIT) record.push_back(*this); 
0025 }
0026 
0027 void SFastSim_Debug::fill(double value)
0028 {
0029     double* ptr = &posx ; 
0030     for(unsigned i=0 ; i < 4*NUM_QUAD ; i++)  *(ptr + i) = value ; 
0031 }
0032 
0033 
0034