@@ -344,61 +344,6 @@ TLinearFitter::TLinearFitter(TFormula *function, Option_t *opt)
344
344
SetFormula (function);
345
345
}
346
346
347
- // //////////////////////////////////////////////////////////////////////////////
348
- // / Copy ctor
349
-
350
- TLinearFitter::TLinearFitter (const TLinearFitter& tlf) :
351
- TVirtualFitter(tlf),
352
- fParams(tlf.fParams ),
353
- fParCovar(tlf.fParCovar ),
354
- fTValues(tlf.fTValues ),
355
- fParSign(tlf.fParSign ),
356
- fDesign(tlf.fDesign ),
357
- fDesignTemp(tlf.fDesignTemp ),
358
- fDesignTemp2(tlf.fDesignTemp2 ),
359
- fDesignTemp3(tlf.fDesignTemp3 ),
360
- fAtb(tlf.fAtb ),
361
- fAtbTemp(tlf.fAtbTemp ),
362
- fAtbTemp2(tlf.fAtbTemp2 ),
363
- fAtbTemp3(tlf.fAtbTemp3 ),
364
- fFunctions( * (TObjArray *)tlf.fFunctions.Clone()),
365
- fY(tlf.fY ),
366
- fY2(tlf.fY2 ),
367
- fY2Temp(tlf.fY2Temp ),
368
- fX(tlf.fX ),
369
- fE(tlf.fE ),
370
- fInputFunction(tlf.fInputFunction ),
371
- fVal(),
372
- fNpoints(tlf.fNpoints ),
373
- fNfunctions(tlf.fNfunctions ),
374
- fFormulaSize(tlf.fFormulaSize ),
375
- fNdim(tlf.fNdim ),
376
- fNfixed(tlf.fNfixed ),
377
- fSpecial(tlf.fSpecial ),
378
- fFormula(nullptr ),
379
- fIsSet(tlf.fIsSet ),
380
- fStoreData(tlf.fStoreData ),
381
- fChisquare(tlf.fChisquare ),
382
- fH(tlf.fH ),
383
- fRobust(tlf.fRobust ),
384
- fFitsample(tlf.fFitsample ),
385
- fFixedParams(nullptr )
386
- {
387
- // make a deep copy of managed objects
388
- // fFormula, fFixedParams and fFunctions
389
-
390
- if ( tlf.fFixedParams && fNfixed > 0 ) {
391
- fFixedParams =new Bool_t[fNfixed ];
392
- for (Int_t i=0 ; i<fNfixed ; ++i)
393
- fFixedParams [i]=tlf.fFixedParams [i];
394
- }
395
- if (tlf.fFormula ) {
396
- fFormula = new char [fFormulaSize +1 ];
397
- strlcpy (fFormula ,tlf.fFormula ,fFormulaSize +1 );
398
- }
399
-
400
- }
401
-
402
347
403
348
// //////////////////////////////////////////////////////////////////////////////
404
349
// / Linear fitter cleanup.
@@ -420,75 +365,6 @@ TLinearFitter::~TLinearFitter()
420
365
421
366
}
422
367
423
- // //////////////////////////////////////////////////////////////////////////////
424
- // / Assignment operator
425
-
426
- TLinearFitter& TLinearFitter::operator =(const TLinearFitter& tlf)
427
- {
428
- if (this !=&tlf) {
429
-
430
- TVirtualFitter::operator =(tlf);
431
- fParams .ResizeTo (tlf.fParams ); fParams =tlf.fParams ;
432
- fParCovar .ResizeTo (tlf.fParCovar ); fParCovar =tlf.fParCovar ;
433
- fTValues .ResizeTo (tlf.fTValues ); fTValues =tlf.fTValues ;
434
- fParSign .ResizeTo (tlf.fParSign ); fParSign =tlf.fParSign ;
435
- fDesign .ResizeTo (tlf.fDesign ); fDesign =tlf.fDesign ;
436
- fDesignTemp .ResizeTo (tlf.fDesignTemp ); fDesignTemp =tlf.fDesignTemp ;
437
- fDesignTemp2 .ResizeTo (tlf.fDesignTemp2 ); fDesignTemp2 =tlf.fDesignTemp2 ;
438
- fDesignTemp3 .ResizeTo (tlf.fDesignTemp3 ); fDesignTemp3 =tlf.fDesignTemp3 ;
439
-
440
- fAtb .ResizeTo (tlf.fAtb ); fAtb =tlf.fAtb ;
441
- fAtbTemp .ResizeTo (tlf.fAtbTemp ); fAtbTemp =tlf.fAtbTemp ;
442
- fAtbTemp2 .ResizeTo (tlf.fAtbTemp2 ); fAtbTemp2 =tlf.fAtbTemp2 ;
443
- fAtbTemp3 .ResizeTo (tlf.fAtbTemp3 ); fAtbTemp3 =tlf.fAtbTemp3 ;
444
-
445
- // use clear instead of delete
446
- fFunctions .Clear ();
447
- fFunctions = *(TObjArray*) tlf.fFunctions .Clone ();
448
-
449
- fY .ResizeTo (tlf.fY ); fY = tlf.fY ;
450
- fX .ResizeTo (tlf.fX ); fX = tlf.fX ;
451
- fE .ResizeTo (tlf.fE ); fE = tlf.fE ;
452
-
453
- fY2 = tlf.fY2 ;
454
- fY2Temp = tlf.fY2Temp ;
455
- for (Int_t i = 0 ; i < 1000 ; i++) fVal [i] = tlf.fVal [i];
456
-
457
- if (fInputFunction ) { delete fInputFunction ; fInputFunction = nullptr ; }
458
- if (tlf.fInputFunction ) fInputFunction = new TFormula (*tlf.fInputFunction );
459
-
460
- fNpoints =tlf.fNpoints ;
461
- fNfunctions =tlf.fNfunctions ;
462
- fFormulaSize =tlf.fFormulaSize ;
463
- fNdim =tlf.fNdim ;
464
- fNfixed =tlf.fNfixed ;
465
- fSpecial =tlf.fSpecial ;
466
-
467
- if (fFormula ) { delete [] fFormula ; fFormula = nullptr ; }
468
- if (tlf.fFormula ) {
469
- fFormula = new char [fFormulaSize +1 ];
470
- strlcpy (fFormula ,tlf.fFormula ,fFormulaSize +1 );
471
- }
472
-
473
- fIsSet =tlf.fIsSet ;
474
- fStoreData =tlf.fStoreData ;
475
- fChisquare =tlf.fChisquare ;
476
-
477
- fH =tlf.fH ;
478
- fRobust =tlf.fRobust ;
479
- fFitsample =tlf.fFitsample ;
480
-
481
- if (fFixedParams ) { delete [] fFixedParams ; fFixedParams = nullptr ; }
482
- if ( tlf.fFixedParams && fNfixed > 0 ) {
483
- fFixedParams =new Bool_t[fNfixed ];
484
- for (Int_t i=0 ; i< fNfixed ; ++i)
485
- fFixedParams [i]=tlf.fFixedParams [i];
486
- }
487
-
488
- }
489
- return *this ;
490
- }
491
-
492
368
// //////////////////////////////////////////////////////////////////////////////
493
369
// /Add another linear fitter to this linear fitter. Points and Design matrices
494
370
// /are added, but the previous fitting results (if any) are deleted.
0 commit comments