Ignore:
Timestamp:
Feb 7, 2009, 10:50:34 PM (17 years ago)
Author:
cmv
Message:

char* -> const char* pour regler les problemes de deprecated string const... + comparaison unsigned signed + suppression EVOL_PLANCK rz+cmv 07/02/2009

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaPI/PIext/nomhistadapter.cc

    r3432 r3572  
    1616#include "strutilxx.h"
    1717
    18 #ifndef SANS_EVOLPLANCK
    1918#include "objfitter.h"
    2019// Pour les DataTable ( Depuis Avril 2005 )
    2120#include "datatable.h"
    2221#include "swppfdtable.h"
    23 #endif
    2422
    2523//-----------------------------------------------------------------------------
     
    139137void NOMAdapter_Histo::SavePPF(POutPersist& pos, string const & nom)
    140138{
    141 #ifdef SANS_EVOLPLANCK
    142 // PEIDA-EROS L'histo est lui-meme PPersist
    143 string tag = nom;  // A cause de const
    144 mHis->Write(pos,0,tag);
    145 #else
    146139ObjFileIO<Histo> fio(mHis);
    147140fio.Write(pos, nom);
    148 #endif
    149141}
    150142
     
    204196{
    205197Histo* h = NULL;
    206 #ifdef SANS_EVOLPLANCK
    207 h = mHis->FitResidus(mfit);
    208 #else
    209198h = new Histo(ObjectFitter::FitResidus(*mHis,mfit));
    210 #endif
    211199return h;
    212200}
     
    215203{
    216204Histo* h = NULL;
    217 #ifdef SANS_EVOLPLANCK
    218 h = mHis->FitFunction(mfit);
    219 #else
    220205h = new Histo(ObjectFitter::FitFunction(*mHis,mfit));
    221 #endif
    222206return h;
    223207}
     
    316300void NOMAdapter_Histo2D::SavePPF(POutPersist& pos, string const & nom)
    317301{
    318 #ifdef SANS_EVOLPLANCK
    319 // PEIDA-EROS L'histo est lui-meme PPersist
    320 string tag = nom;  // A cause de const
    321 mHis->Write(pos,0,tag);
    322 #else
    323302ObjFileIO<Histo2D> fio(mHis);
    324303fio.Write(pos, nom);
    325 #endif
    326304}
    327305
     
    389367{
    390368Histo2D* h2 = NULL;
    391 #ifdef SANS_EVOLPLANCK
    392 h2 = mHis->FitFunction(mfit);
    393 #else
    394369h2 = new Histo2D(ObjectFitter::FitResidus(*mHis,mfit));
    395 #endif
    396370return h2;
    397371}
     
    400374{
    401375Histo2D* h2 = NULL;
    402 #ifdef SANS_EVOLPLANCK
    403 h2 = mHis->FitFunction(mfit);
    404 #else
    405376h2 = new Histo2D(ObjectFitter::FitFunction(*mHis,mfit));
    406 #endif
    407377return h2;
    408378}
     
    555525void NOMAdapter_NTuple::SavePPF(POutPersist& pos, string const & nom)
    556526{
    557 #ifdef SANS_EVOLPLANCK
    558 // PEIDA-EROS L'histo est lui-meme PPersist
    559 string tag = nom;  // A cause de const
    560 mNt->Write(pos,0,tag);
    561 #else
    562527ObjFileIO<NTuple> fio(mNt);
    563528fio.Write(pos, nom);
    564 #endif
    565529}
    566530
     
    571535char buff[128];
    572536if (opts[0] == "sizes") {
    573   sprintf(buff, "%ld %ld", mNt->NEntry(), mNt->NVar());
     537  sprintf(buff, "%ld %ld", (long)mNt->NEntry(), (long)mNt->NVar());
    574538  return string(buff);   
    575539}
    576540else if ((opts[0] == "nlines") || (opts[0] == "nentry") || (opts[0] == "nrows")) {
    577   sprintf(buff, "%ld", mNt->NEntry());
     541  sprintf(buff, "%ld", (long)mNt->NEntry());
    578542  return string(buff);   
    579543}
    580544else if ((opts[0] == "nvar") || (opts[0] == "ncols")) {
    581   sprintf(buff, "%ld", mNt->NVar());
     545  sprintf(buff, "%ld", (long)mNt->NVar());
    582546  return string(buff);   
    583547}
     
    610574return(mNt);
    611575// return( new NTupInt_NTuple(mNt) );
    612 }
    613 
    614 //-------------------------------------------------------------------------
    615 // Class Adaptateur d'objet (Pour NamedObjMgr) d'objet XNTuple
    616 //-------------------------------------------------------------------------
    617 
    618 /* --Methode-- */
    619 NOMAdapter_XNTuple::NOMAdapter_XNTuple(XNTuple* o)
    620   : NObjMgrAdapter(o)
    621 {
    622 mNt = o;
    623 }
    624 
    625 /* --Methode-- */
    626 NOMAdapter_XNTuple::~NOMAdapter_XNTuple()
    627 {
    628 }
    629 
    630 /* --Methode-- */
    631 NObjMgrAdapter* NOMAdapter_XNTuple::Clone(AnyDataObj* o)
    632 {
    633 XNTuple* nt = dynamic_cast<XNTuple *>(o);
    634 if (nt) return ( new NOMAdapter_XNTuple(nt) );
    635 return ( new NObjMgrAdapter(o) );
    636 }
    637 
    638 /* --Methode-- */
    639 string NOMAdapter_XNTuple::GetDataObjType()
    640 {
    641 return ("XNTuple ");
    642 }
    643 
    644 /* --Methode-- */
    645 AnyDataObj* NOMAdapter_XNTuple::CloneDataObj(bool /*share*/)
    646 {
    647 return ( new XNTuple(*mNt) );
    648 }
    649 
    650 /* --Methode-- */
    651 void NOMAdapter_XNTuple::SavePPF(POutPersist& pos, string const & nom)
    652 {
    653 #ifdef SANS_EVOLPLANCK
    654 // PEIDA-EROS L'histo est lui-meme PPersist
    655 string tag = nom;  // A cause de const
    656 mNt->Write(pos,0,tag);
    657 #else
    658 ObjFileIO<XNTuple> fio(mNt);
    659 fio.Write(pos, nom);
    660 #endif
    661 }
    662 
    663 /* --Methode-- */
    664 void NOMAdapter_XNTuple::Print(ostream& os, int lev)
    665 {
    666 // os << mNt->Info();
    667 mNt->Show(os);
    668 }
    669 
    670 
    671 /* --Methode-- */
    672 NTupleInterface* NOMAdapter_XNTuple::GetNTupleInterface(bool& adel)
    673 {
    674 adel = false;
    675 return(mNt);
    676576}
    677577
     
    751651char buff[128];
    752652if (opts[0] == "sizes") {
    753   sprintf(buff, "%ld %ld", mDT->NEntry(), mDT->NVar());
     653  sprintf(buff, "%ld %ld", (long)mDT->NEntry(), (long)mDT->NVar());
    754654  return string(buff);   
    755655}
    756656else if ((opts[0] == "nlines") || (opts[0] == "nentry") || (opts[0] == "nrows")) {
    757   sprintf(buff, "%ld", mDT->NEntry());
     657  sprintf(buff, "%ld", (long)mDT->NEntry());
    758658  return string(buff);   
    759659}
    760660else if ((opts[0] == "nvar") || (opts[0] == "ncols")) {
    761   sprintf(buff, "%ld", mDT->NVar());
     661  sprintf(buff, "%ld", (long)mDT->NVar());
    762662  return string(buff);   
    763663}
Note: See TracChangeset for help on using the changeset viewer.