Changeset 3572 in Sophya for trunk/SophyaLib/HiStats
- Timestamp:
- Feb 7, 2009, 10:50:34 PM (17 years ago)
- Location:
- trunk/SophyaLib/HiStats
- Files:
-
- 2 deleted
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/HiStats/Makefile
r3407 r3572 4 4 5 5 clean: 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.o6 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 7 7 rm -f $(SOPHYALIBP)libHiStats.a 8 8 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.o9 $(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 10 10 $(AR) $(ARFLAGS) $@ $? 11 11 touch $(SOPHYAINCP)/SophyaConfInfo/libsophya.objlist … … 228 228 $(SOPHYAINCP)utils.h hisprof.h histerr.h \ 229 229 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 \ 233 232 $(SOPHYAINCP)thsafeop.h swppfdtable.h \ 234 233 $(SOPHYAINCP)swsegdb.h \ … … 384 383 $(CXXCOMPILE) $(CXXTEMPFLG) -o $@ swppfdtable.cc 385 384 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.h402 $(CXXCOMPILE) $(CXXTEMPFLG) -o $@ xntuple.cc403 -
trunk/SophyaLib/HiStats/histats.h
r3140 r3572 9 9 #include "hist2err.h" 10 10 #include "ntuple.h" 11 #include "xntuple.h"12 11 #include "datatable.h" 13 12 #include "swppfdtable.h" -
trunk/SophyaLib/HiStats/histinit.cc
r3169 r3572 12 12 #include "hist2err.h" 13 13 #include "ntuple.h" 14 #include "xntuple.h"15 14 #include "datatable.h" 16 15 #include "swppfdtable.h" … … 39 38 - Histo2DErr 40 39 - NTuple 41 - XNTuple42 40 - DataTable 43 41 - SwPPFDataTable … … 70 68 PPRegister(ObjFileIO<NTuple>); 71 69 DObjRegister(ObjFileIO<NTuple>, NTuple); 72 PPRegister(ObjFileIO<XNTuple>);73 DObjRegister(ObjFileIO<XNTuple>, XNTuple);74 70 75 71 PPRegister(ObjFileIO<BaseDataTable>); -
trunk/SophyaLib/HiStats/histos.cc
r3236 r3572 1550 1550 1551 1551 // Ecriture entete pour identifier facilement 1552 sprintf(strg,"V_2 mBins=%6d NEnt=%15 derrok=%1d",dobj->mBins,dobj->nEntries,errok);1552 sprintf(strg,"V_2 mBins=%6d NEnt=%15llu errok=%1d",dobj->mBins,dobj->nEntries,errok); 1553 1553 os.PutLine(strg); 1554 1554 sprintf(strg,"binw=%g mMin=%g mMax=%g",dobj->binWidth,dobj->mMin,dobj->mMax); -
trunk/SophyaLib/HiStats/ntuple.cc
r3392 r3572 26 26 #include "ntuple.h" 27 27 // ... 28 c har * names[3] = {"XPos", "YPos", "Val"};28 const char * names[3] = {"XPos", "YPos", "Val"}; 29 29 // NTuple (Table) creation with 3 columns (double precision) 30 30 NTuple nt(3, names); … … 73 73 74 74 75 //! Constructor with specification of number of columns and column name 75 //! Constructor with specification of number of columns and column names 76 76 /*! 77 77 \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 79 79 \param blk : Optional argument specifying number of table lines 80 80 in a given data block … … 90 90 //-- 91 91 { 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 } 92 if (nvar <= 0) throw ParmError("NTuple::NTuple(nvar<=0) with char** noms"); 93 Initialize(nvar,blk,fgdouble); 116 94 for(int i=0; i<nvar; i++) mNames.push_back(noms[i]); 117 95 return; 118 96 } 119 97 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 //++ 109 NTuple::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 { 116 if (nvar <= 0) throw ParmError("NTuple::NTuple(nvar<=0) with const char** noms"); 117 Initialize(nvar,blk,fgdouble); 118 for(int i=0; i<nvar; i++) mNames.push_back(noms[i]); 119 return; 120 } 121 122 //! Constructor with specification of number of columns and column names as a string vector 121 123 /*! 122 124 \param noms : Array of column names (length(name) < 8 characters) … … 128 130 NTuple::NTuple(vector<string>& noms, int blk, bool fgdouble) 129 131 { 132 int nvar = noms.size(); 133 if (nvar <= 0) throw ParmError("NTuple::NTuple(nvar<=0) with vector<string>& noms"); 134 Initialize(nvar,blk,fgdouble); 135 for(int i=0; i<nvar; i++) mNames.push_back(noms[i]); 136 return; 137 } 138 139 140 /* --Methode-- */ 141 /* Initialisation pour Createurs (fonction privee) */ 142 void NTuple::Initialize(int nvar, int blk, bool fgdouble) 143 { 130 144 mNVar = mNEnt = mBlk = mNBlk = 0; 131 145 mVar = NULL; … … 133 147 mInfo = NULL; 134 148 mThS = NULL; 135 int nvar = noms.size();136 if (nvar <= 0) throw ParmError("NTuple::NTuple(nvar<=0) ");137 149 mNVar = nvar; 138 150 mVar = new r_4[nvar]; … … 153 165 mFgDouble = false; 154 166 } 155 for(int i=0; i<nvar; i++) mNames.push_back(noms[i]); 167 156 168 return; 157 169 } … … 206 218 Clean(); 207 219 } 220 208 221 /* --Methode-- */ 209 222 /*! … … 494 507 //-- 495 508 { 496 c har * tt = "float";509 const char * tt = "float"; 497 510 if (mFgDouble) tt = "double"; 498 511 os << "NTuple T=" << tt << " : NVar= " << mNVar << " NEnt=" << mNEnt -
trunk/SophyaLib/HiStats/ntuple.h
r3392 r3572 30 30 NTuple(); 31 31 NTuple(int nvar, char** noms, int blk=512, bool fgdouble=true); 32 NTuple(int nvar, const char** noms, int blk=512, bool fgdouble=true); 32 33 NTuple(vector<string>& noms, int blk=512, bool fgdouble=true); 33 34 NTuple(const NTuple& NT); … … 96 97 97 98 private: 99 void Initialize(int nvar, int blk, bool fgdouble); 98 100 void Clean(); 99 101 -
trunk/SophyaLib/HiStats/objlist.list
r3121 r3572 12 12 proxtuple.o 13 13 swppfdtable.o 14 xntuple.o -
trunk/SophyaLib/HiStats/proxtuple.cc
r2615 r3572 41 41 if (_tuple==0) { 42 42 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()); 44 44 _tuple=new NTuple(N,names); 45 45 delete[] names; … … 52 52 _val.clear(); 53 53 54 55 54 } -
trunk/SophyaLib/HiStats/smakefile
r3407 r3572 4 4 5 5 clean: 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.o6 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 7 7 rm -f $(SOPHYALIBP)libHiStats.a 8 8 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.o9 $(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 10 10 $(AR) $(ARFLAGS) $@ $? 11 11 touch $(SOPHYAINCP)/SophyaConfInfo/libsophya.objlist … … 228 228 $(SOPHYAINCP)utils.h hisprof.h histerr.h \ 229 229 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 \ 233 232 $(SOPHYAINCP)thsafeop.h swppfdtable.h \ 234 233 $(SOPHYAINCP)swsegdb.h \ … … 384 383 $(CXXCOMPILE) $(CXXTEMPFLG) -o $@ swppfdtable.cc 385 384 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.h402 $(CXXCOMPILE) $(CXXTEMPFLG) -o $@ xntuple.cc403
Note:
See TracChangeset
for help on using the changeset viewer.