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];
97 std::ifstream thefData( filename , std::ios::in | std::ios::ate );
98 if ( thefData.good() ) {
99 G4int file_size = thefData.tellg();
100 thefData.seekg( 0 , std::ios::beg );
101 char* filedata =
new char[ file_size ];
103 thefData.read( filedata , file_size );
106 data =
new G4String ( filedata , file_size );
111 iss.setstate( std::ios::badbit );
114 if ( data != NULL ) {
118 if (
id ==
"G4NDL" ) {
124 iss.seekg( 0 , std::ios::beg );
128 in->close();
delete in;
135 compfilename +=
".z";
136 std::ifstream* in =
new std::ifstream ( compfilename , std::ios::binary | std::ios::ate );
142 std::ifstream thefData( filename , std::ios::in | std::ios::ate );
143 if ( thefData.good() ) {
149 iss.setstate( std::ios::badbit );
157 G4cout <<
"You are setting a new verbose level for neutron HP package." <<
G4endl;
158 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;
164 mDataEvaluation.insert( std::pair < G4String , G4String > ( filename , source ) );
169 G4cout <<
"Data source of this NeutronHP calculation are " <<
G4endl;
170 for ( std::map< G4String , G4String >::iterator
void GetDataStream(G4String, std::istringstream &iss)
void SetVerboseLevel(G4int i)
G4GLOB_DLL std::ostream G4cout
void GetDataStream2(G4String, std::istringstream &iss)
void OpenReactionWhiteBoard()
int ZEXPORT uncompress(Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen)
void register_data_file(G4String, G4String)
static G4ThreadLocal G4ParticleHPManager * instance
G4ParticleHPReactionWhiteBoard * RWB
std::map< G4String, G4String > mDataEvaluation
G4ParticleHPReactionWhiteBoard * GetReactionWhiteBoard()