Changeset 490 in Sophya for trunk/SophyaLib/NTools/hisprof.cc
- Timestamp:
- Oct 21, 1999, 5:25:53 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/NTools/hisprof.cc
r308 r490 303 303 /////////////////////////////////////////////////////////// 304 304 305 FIO_HProf::FIO_HProf() 306 { 307 dobj=new HProf; 308 ownobj=true; 309 } 310 311 FIO_HProf::FIO_HProf(string const & filename) 312 { 313 dobj=new HProf; 314 ownobj=true; 315 Read(filename); 316 } 317 318 FIO_HProf::FIO_HProf(const HProf & obj) 319 { 320 dobj = new HProf(obj); 321 ownobj=true; 322 } 323 324 FIO_HProf::FIO_HProf(HProf * obj) 325 { 326 dobj = obj; 327 ownobj=false; 328 } 329 330 FIO_HProf::~FIO_HProf() 331 { 332 if (ownobj && dobj) delete dobj; 333 } 334 335 AnyDataObj* FIO_HProf::DataObj() 336 { 337 return(dobj); 338 } 339 340 void FIO_HProf::ReadSelf(PInPersist& is) 305 306 void ObjFileIO<HProf>::ReadSelf(PInPersist& is) 341 307 { 342 308 char strg[256]; … … 365 331 366 332 // Ecriture de l'histogramme 367 FIO_Histo fio_h((Histo&)*dobj); 368 fio_h.Read(is); 369 333 is >> (Histo&)(*dobj); 370 334 return; 371 335 } 372 336 373 void FIO_HProf::WriteSelf(POutPersist& os) const337 void ObjFileIO<HProf>::WriteSelf(POutPersist& os) const 374 338 { 375 339 if (dobj == NULL) return; … … 396 360 397 361 // Ecriture de l'histogramme 398 FIO_Histo fio_h((Histo&)*dobj); 399 fio_h.Write(os); 362 // FIO_Histo fio_h((Histo&)*dobj); 363 // fio_h.Write(os); 364 os << (Histo&)(*dobj); 400 365 401 366 return; 402 367 } 368 369 #ifdef __CXX_PRAGMA_TEMPLATES__ 370 #pragma define_template ObjFileIO<HProf> 371 #endif 372 373 #if defined(ANSI_TEMPLATES) || defined(GNU_TEMPLATES) 374 template class ObjFileIO<HProf>; 375 #endif
Note:
See TracChangeset
for help on using the changeset viewer.