Changeset 3572 in Sophya for trunk/SophyaLib/HiStats


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

Location:
trunk/SophyaLib/HiStats
Files:
2 deleted
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/HiStats/Makefile

    r3407 r3572  
    44 
    55clean:
    6          rm -f $(SOPHYAOBJP)basedtable.o $(SOPHYAOBJP)datatable.o $(SOPHYAOBJP)fio_dtable.o $(SOPHYAOBJP)hisprof.o $(SOPHYAOBJP)hist2err.o $(SOPHYAOBJP)histerr.o $(SOPHYAOBJP)histinit.o $(SOPHYAOBJP)histos.o $(SOPHYAOBJP)histos2.o $(SOPHYAOBJP)ntupintf.o $(SOPHYAOBJP)ntuple.o $(SOPHYAOBJP)proxtuple.o $(SOPHYAOBJP)swppfdtable.o $(SOPHYAOBJP)xntuple.o
     6         rm -f $(SOPHYAOBJP)basedtable.o $(SOPHYAOBJP)datatable.o $(SOPHYAOBJP)fio_dtable.o $(SOPHYAOBJP)hisprof.o $(SOPHYAOBJP)hist2err.o $(SOPHYAOBJP)histerr.o $(SOPHYAOBJP)histinit.o $(SOPHYAOBJP)histos.o $(SOPHYAOBJP)histos2.o $(SOPHYAOBJP)ntupintf.o $(SOPHYAOBJP)ntuple.o $(SOPHYAOBJP)proxtuple.o $(SOPHYAOBJP)swppfdtable.o
    77        rm -f $(SOPHYALIBP)libHiStats.a
    88 
    9 $(SOPHYALIBP)libHiStats.a : $(SOPHYAOBJP)basedtable.o $(SOPHYAOBJP)datatable.o $(SOPHYAOBJP)fio_dtable.o $(SOPHYAOBJP)hisprof.o $(SOPHYAOBJP)hist2err.o $(SOPHYAOBJP)histerr.o $(SOPHYAOBJP)histinit.o $(SOPHYAOBJP)histos2.o $(SOPHYAOBJP)histos.o $(SOPHYAOBJP)ntupintf.o $(SOPHYAOBJP)ntuple.o $(SOPHYAOBJP)proxtuple.o $(SOPHYAOBJP)swppfdtable.o $(SOPHYAOBJP)xntuple.o
     9$(SOPHYALIBP)libHiStats.a : $(SOPHYAOBJP)basedtable.o $(SOPHYAOBJP)datatable.o $(SOPHYAOBJP)fio_dtable.o $(SOPHYAOBJP)hisprof.o $(SOPHYAOBJP)hist2err.o $(SOPHYAOBJP)histerr.o $(SOPHYAOBJP)histinit.o $(SOPHYAOBJP)histos2.o $(SOPHYAOBJP)histos.o $(SOPHYAOBJP)ntupintf.o $(SOPHYAOBJP)ntuple.o $(SOPHYAOBJP)proxtuple.o $(SOPHYAOBJP)swppfdtable.o
    1010        $(AR) $(ARFLAGS) $@ $?
    1111        touch $(SOPHYAINCP)/SophyaConfInfo/libsophya.objlist
     
    228228  $(SOPHYAINCP)utils.h hisprof.h histerr.h \
    229229  hist2err.h $(SOPHYAINCP)tmatrix.h ntuple.h \
    230   ntupintf.h $(SOPHYAINCP)dvlist.h xntuple.h \
    231   datatable.h basedtable.h \
    232   $(SOPHYAINCP)segdatablock.h \
     230  ntupintf.h $(SOPHYAINCP)dvlist.h datatable.h \
     231  basedtable.h $(SOPHYAINCP)segdatablock.h \
    233232  $(SOPHYAINCP)thsafeop.h swppfdtable.h \
    234233  $(SOPHYAINCP)swsegdb.h \
     
    384383        $(CXXCOMPILE) $(CXXTEMPFLG) -o $@  swppfdtable.cc
    385384 
    386 $(SOPHYAOBJP)xntuple.o: xntuple.cc $(SOPHYAINCP)ppersist.h \
    387   $(SOPHYAINCP)machdefs.h \
    388   $(SOPHYAINCP)pexceptions.h \
    389   $(SOPHYAINCP)gnumd5.h \
    390   $(SOPHYAINCP)ppfbinstream.h \
    391   $(SOPHYAINCP)rawstream.h \
    392   $(SOPHYAINCP)ppfnametag.h \
    393   $(SOPHYAINCP)ppersist.h \
    394   $(SOPHYAINCP)perrors.h xntuple.h \
    395   $(SOPHYAINCP)machdefs.h ntupintf.h \
    396   $(SOPHYAINCP)dvlist.h \
    397   $(SOPHYAINCP)objfio.h \
    398   $(SOPHYAINCP)anydataobj.h \
    399   $(SOPHYAINCP)mutyv.h \
    400   $(SOPHYAINCP)timestamp.h \
    401   $(SOPHYAINCP)objfio.h
    402         $(CXXCOMPILE) $(CXXTEMPFLG) -o $@  xntuple.cc
    403  
  • trunk/SophyaLib/HiStats/histats.h

    r3140 r3572  
    99#include "hist2err.h"
    1010#include "ntuple.h"
    11 #include "xntuple.h"
    1211#include "datatable.h"
    1312#include "swppfdtable.h"
  • trunk/SophyaLib/HiStats/histinit.cc

    r3169 r3572  
    1212#include "hist2err.h"
    1313#include "ntuple.h"
    14 #include "xntuple.h"
    1514#include "datatable.h"
    1615#include "swppfdtable.h"
     
    3938  - Histo2DErr
    4039  - NTuple
    41   - XNTuple
    4240  - DataTable
    4341  - SwPPFDataTable
     
    7068  PPRegister(ObjFileIO<NTuple>);
    7169  DObjRegister(ObjFileIO<NTuple>, NTuple);
    72   PPRegister(ObjFileIO<XNTuple>);
    73   DObjRegister(ObjFileIO<XNTuple>, XNTuple);
    7470
    7571  PPRegister(ObjFileIO<BaseDataTable>);
  • trunk/SophyaLib/HiStats/histos.cc

    r3236 r3572  
    15501550
    15511551// Ecriture entete pour identifier facilement
    1552 sprintf(strg,"V_2 mBins=%6d  NEnt=%15d  errok=%1d",dobj->mBins,dobj->nEntries,errok);
     1552sprintf(strg,"V_2 mBins=%6d  NEnt=%15llu  errok=%1d",dobj->mBins,dobj->nEntries,errok);
    15531553os.PutLine(strg);
    15541554sprintf(strg,"binw=%g  mMin=%g mMax=%g",dobj->binWidth,dobj->mMin,dobj->mMax);
  • trunk/SophyaLib/HiStats/ntuple.cc

    r3392 r3572  
    2626   #include "ntuple.h"
    2727   // ...
    28    char * names[3] = {"XPos", "YPos", "Val"};
     28   const char * names[3] = {"XPos", "YPos", "Val"};
    2929   // NTuple (Table) creation with 3 columns (double precision)
    3030   NTuple  nt(3, names);
     
    7373
    7474
    75 //! Constructor with specification of number of columns and column name
     75//! Constructor with specification of number of columns and column names
    7676/*!
    7777  \param nvar : Number of columns in the table
    78   \param noms : Array of column names (length(name) < 8 characters)
     78  \param noms : Array of column names
    7979  \param blk : Optional argument specifying number of table lines
    8080  in a given data block
     
    9090//--
    9191{
    92 mNVar = mNEnt = mBlk = mNBlk = 0;
    93 mVar = NULL;
    94 mVarD = NULL;
    95 mInfo = NULL;
    96 mThS = NULL;
    97 if (nvar <= 0)  throw ParmError("NTuple::NTuple(nvar<=0) ");
    98 mNVar = nvar;
    99 mVar = new r_4[nvar];
    100 mVarD = new r_8[nvar];
    101 if (blk < 10) blk = 10;
    102 mBlk = blk;
    103 
    104 if (fgdouble) {
    105   r_8* pt = new r_8[nvar*blk];
    106   mNBlk = 1;
    107   mPtrD.push_back(pt);
    108   mFgDouble = true;
    109 }
    110 else {
    111   r_4* pt = new r_4[nvar*blk];
    112   mNBlk = 1;
    113   mPtr.push_back(pt);
    114   mFgDouble = false;
    115 }
     92if (nvar <= 0)  throw ParmError("NTuple::NTuple(nvar<=0) with char** noms");
     93Initialize(nvar,blk,fgdouble);
    11694for(int i=0; i<nvar; i++) mNames.push_back(noms[i]);
    11795return;
    11896}
    11997
    120 //! Constructor with specification of number of columns and column name
     98
     99//! Constructor with specification of number of columns and column names
     100/*!
     101  \param nvar : Number of columns in the table
     102  \param noms : Array of column names
     103  \param blk : Optional argument specifying number of table lines
     104  in a given data block
     105  \param fgdouble : if \b true: internal data kept as double precision values (r_8),
     106  simple precision (r_4) otherwise
     107 */
     108//++
     109NTuple::NTuple(int nvar, const char** noms, int blk, bool fgdouble)
     110//
     111//      Createur d'un ntuple de `nvar' variables dont les
     112//      noms sont dans le tableau de chaines de caracteres `noms'
     113//      avec `blk' d'evenements par blocks.
     114//--
     115{
     116if (nvar <= 0)  throw ParmError("NTuple::NTuple(nvar<=0) with const char** noms");
     117Initialize(nvar,blk,fgdouble);
     118for(int i=0; i<nvar; i++) mNames.push_back(noms[i]);
     119return;
     120}
     121
     122//! Constructor with specification of number of columns and column names as a string vector
    121123/*!
    122124  \param noms : Array of column names (length(name) < 8 characters)
     
    128130NTuple::NTuple(vector<string>& noms, int blk, bool fgdouble)
    129131{
     132int nvar = noms.size();
     133if (nvar <= 0)  throw ParmError("NTuple::NTuple(nvar<=0) with vector<string>& noms");
     134Initialize(nvar,blk,fgdouble);
     135for(int i=0; i<nvar; i++) mNames.push_back(noms[i]);
     136return;
     137}
     138
     139
     140/* --Methode-- */
     141/* Initialisation pour Createurs (fonction privee) */
     142void NTuple::Initialize(int nvar, int blk, bool fgdouble)
     143{
    130144mNVar = mNEnt = mBlk = mNBlk = 0;
    131145mVar = NULL;
     
    133147mInfo = NULL;
    134148mThS = NULL;
    135 int nvar = noms.size();
    136 if (nvar <= 0)  throw ParmError("NTuple::NTuple(nvar<=0) ");
    137149mNVar = nvar;
    138150mVar = new r_4[nvar];
     
    153165  mFgDouble = false;
    154166}
    155 for(int i=0; i<nvar; i++) mNames.push_back(noms[i]);
     167
    156168return;
    157169}
     
    206218Clean();
    207219}
     220
    208221/* --Methode-- */
    209222/*!
     
    494507//--
    495508{
    496 char * tt = "float";
     509const char * tt = "float";
    497510if (mFgDouble) tt = "double";
    498511os << "NTuple T=" << tt << " : NVar= " << mNVar << " NEnt=" << mNEnt 
  • trunk/SophyaLib/HiStats/ntuple.h

    r3392 r3572  
    3030  NTuple();
    3131  NTuple(int nvar, char** noms, int blk=512, bool fgdouble=true);
     32  NTuple(int nvar, const char** noms, int blk=512, bool fgdouble=true);
    3233  NTuple(vector<string>& noms, int blk=512, bool fgdouble=true);
    3334  NTuple(const NTuple& NT);
     
    9697
    9798private:
     99  void Initialize(int nvar, int blk, bool fgdouble);
    98100  void  Clean();
    99101
  • trunk/SophyaLib/HiStats/objlist.list

    r3121 r3572  
    1212proxtuple.o
    1313swppfdtable.o
    14 xntuple.o
  • trunk/SophyaLib/HiStats/proxtuple.cc

    r2615 r3572  
    4141  if (_tuple==0) {
    4242    char** names=new char* [N];
    43     for (int i=0;i<N;i++) names[i]=const_cast<char*>(_name[i].c_str());
     43    for (int i=0;i<N;i++) names[i]=const_cast<char *>(_name[i].c_str());
    4444    _tuple=new NTuple(N,names);
    4545    delete[] names;
     
    5252  _val.clear();
    5353
    54 
    5554}
  • trunk/SophyaLib/HiStats/smakefile

    r3407 r3572  
    44 
    55clean:
    6          rm -f $(SOPHYAOBJP)basedtable.o $(SOPHYAOBJP)datatable.o $(SOPHYAOBJP)fio_dtable.o $(SOPHYAOBJP)hisprof.o $(SOPHYAOBJP)hist2err.o $(SOPHYAOBJP)histerr.o $(SOPHYAOBJP)histinit.o $(SOPHYAOBJP)histos.o $(SOPHYAOBJP)histos2.o $(SOPHYAOBJP)ntupintf.o $(SOPHYAOBJP)ntuple.o $(SOPHYAOBJP)proxtuple.o $(SOPHYAOBJP)swppfdtable.o $(SOPHYAOBJP)xntuple.o
     6         rm -f $(SOPHYAOBJP)basedtable.o $(SOPHYAOBJP)datatable.o $(SOPHYAOBJP)fio_dtable.o $(SOPHYAOBJP)hisprof.o $(SOPHYAOBJP)hist2err.o $(SOPHYAOBJP)histerr.o $(SOPHYAOBJP)histinit.o $(SOPHYAOBJP)histos.o $(SOPHYAOBJP)histos2.o $(SOPHYAOBJP)ntupintf.o $(SOPHYAOBJP)ntuple.o $(SOPHYAOBJP)proxtuple.o $(SOPHYAOBJP)swppfdtable.o
    77        rm -f $(SOPHYALIBP)libHiStats.a
    88 
    9 $(SOPHYALIBP)libHiStats.a : $(SOPHYAOBJP)basedtable.o $(SOPHYAOBJP)datatable.o $(SOPHYAOBJP)fio_dtable.o $(SOPHYAOBJP)hisprof.o $(SOPHYAOBJP)hist2err.o $(SOPHYAOBJP)histerr.o $(SOPHYAOBJP)histinit.o $(SOPHYAOBJP)histos2.o $(SOPHYAOBJP)histos.o $(SOPHYAOBJP)ntupintf.o $(SOPHYAOBJP)ntuple.o $(SOPHYAOBJP)proxtuple.o $(SOPHYAOBJP)swppfdtable.o $(SOPHYAOBJP)xntuple.o
     9$(SOPHYALIBP)libHiStats.a : $(SOPHYAOBJP)basedtable.o $(SOPHYAOBJP)datatable.o $(SOPHYAOBJP)fio_dtable.o $(SOPHYAOBJP)hisprof.o $(SOPHYAOBJP)hist2err.o $(SOPHYAOBJP)histerr.o $(SOPHYAOBJP)histinit.o $(SOPHYAOBJP)histos2.o $(SOPHYAOBJP)histos.o $(SOPHYAOBJP)ntupintf.o $(SOPHYAOBJP)ntuple.o $(SOPHYAOBJP)proxtuple.o $(SOPHYAOBJP)swppfdtable.o
    1010        $(AR) $(ARFLAGS) $@ $?
    1111        touch $(SOPHYAINCP)/SophyaConfInfo/libsophya.objlist
     
    228228  $(SOPHYAINCP)utils.h hisprof.h histerr.h \
    229229  hist2err.h $(SOPHYAINCP)tmatrix.h ntuple.h \
    230   ntupintf.h $(SOPHYAINCP)dvlist.h xntuple.h \
    231   datatable.h basedtable.h \
    232   $(SOPHYAINCP)segdatablock.h \
     230  ntupintf.h $(SOPHYAINCP)dvlist.h datatable.h \
     231  basedtable.h $(SOPHYAINCP)segdatablock.h \
    233232  $(SOPHYAINCP)thsafeop.h swppfdtable.h \
    234233  $(SOPHYAINCP)swsegdb.h \
     
    384383        $(CXXCOMPILE) $(CXXTEMPFLG) -o $@  swppfdtable.cc
    385384 
    386 $(SOPHYAOBJP)xntuple.o: xntuple.cc $(SOPHYAINCP)ppersist.h \
    387   $(SOPHYAINCP)machdefs.h \
    388   $(SOPHYAINCP)pexceptions.h \
    389   $(SOPHYAINCP)gnumd5.h \
    390   $(SOPHYAINCP)ppfbinstream.h \
    391   $(SOPHYAINCP)rawstream.h \
    392   $(SOPHYAINCP)ppfnametag.h \
    393   $(SOPHYAINCP)ppersist.h \
    394   $(SOPHYAINCP)perrors.h xntuple.h \
    395   $(SOPHYAINCP)machdefs.h ntupintf.h \
    396   $(SOPHYAINCP)dvlist.h \
    397   $(SOPHYAINCP)objfio.h \
    398   $(SOPHYAINCP)anydataobj.h \
    399   $(SOPHYAINCP)mutyv.h \
    400   $(SOPHYAINCP)timestamp.h \
    401   $(SOPHYAINCP)objfio.h
    402         $(CXXCOMPILE) $(CXXTEMPFLG) -o $@  xntuple.cc
    403  
Note: See TracChangeset for help on using the changeset viewer.