38 :RWB(NULL),verboseLevel(1)
49 G4cout <<
"Warning: G4ParticleHPReactionWhiteBoard is tried doubly opening" <<
G4endl;
58 G4cout <<
"Warning: try to access G4ParticleHPReactionWhiteBoard before opening" <<
G4endl;
70 std::ifstream* in =
new std::ifstream ( compfilename , std::ios::binary | std::ios::ate );
74 G4int file_size = in->tellg();
75 in->seekg( 0 , std::ios::beg );
76 Bytef* compdata =
new Bytef[ file_size ];
79 in->read( (
char*)compdata , file_size );
82 uLongf complen = (uLongf) ( file_size*4 );
83 Bytef* uncompdata =
new Bytef[complen];
85 while ( Z_OK !=
uncompress ( uncompdata , &complen , compdata , file_size ) ) {
89 uncompdata =
new Bytef[complen];
98 std::ifstream thefData( filename , std::ios::in | std::ios::ate );
99 if ( thefData.good() ) {
100 G4int file_size = thefData.tellg();
101 thefData.seekg( 0 , std::ios::beg );
102 char* filedata =
new char[ file_size ];
104 thefData.read( filedata , file_size );
107 data =
new G4String ( filedata , file_size );
112 iss.setstate( std::ios::badbit );
115 if (data != NULL) iss.str(*data);
117 in->close();
delete in;
123 G4cout <<
"You are setting a new verbose level for neutron HP package." <<
G4endl;
124 G4cout <<
"the new value will be used in whole of the neutron HP package, i.e., models and cross sections for Capture, Elastic, Fission and Inelastic interaction." <<
G4endl;
void GetDataStream(G4String, std::istringstream &iss)
void SetVerboseLevel(G4int i)
G4GLOB_DLL std::ostream G4cout
void OpenReactionWhiteBoard()
int ZEXPORT uncompress(Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen)
static G4ThreadLocal G4ParticleHPManager * instance
G4ParticleHPReactionWhiteBoard * RWB
G4ParticleHPReactionWhiteBoard * GetReactionWhiteBoard()