laura is hosted by Hepforge, IPPP Durham
Laura++  v1r1p1
A maximum likelihood fitting package for performing Dalitz-plot analysis.
LauAbsCoeffSet.cc
Go to the documentation of this file.
1 
2 // Copyright University of Warwick 2006 - 2013.
3 // Distributed under the Boost Software License, Version 1.0.
4 // (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5 
6 // Authors:
7 // Thomas Latham
8 // John Back
9 // Paul Harrison
10 
15 #include "TString.h"
16 
17 #include "LauAbsCoeffSet.hh"
18 #include "LauParameter.hh"
19 
20 ClassImp(LauAbsCoeffSet)
21 
22 
23 LauAbsCoeffSet::LauAbsCoeffSet(const TString& theName) :
24  name_(theName),
25  basename_("A"),
26  index_(0)
27 {
28 }
29 
30 void LauAbsCoeffSet::index(UInt_t newIndex)
31 {
32  index_ = newIndex;
33  TString basename("A");
34  basename += newIndex;
35  basename += "_";
36  this->baseName(basename);
37 
38  std::vector<LauParameter*> pars = this->getParameters();
39  for ( std::vector<LauParameter*>::iterator iter = pars.begin(); iter != pars.end(); ++iter ) {
40  this->adjustName( *iter );
41  }
42 }
43 
45 {
46  TString theName(par.name());
47  theName.Remove(0,theName.Index("_")+1);
48  theName.Prepend(this->baseName());
49  par.name(theName);
50 }
51 
53 {
54  TString theName(par->name());
55  theName.Remove(0,theName.Index("_")+1);
56  theName.Prepend(this->baseName());
57  par->name(theName);
58 }
59 
virtual void adjustName(LauParameter &par)
Prepend the base name and index to the name of a parameter.
virtual TString baseName() const
Retrieve the base name of the coefficient set.
const TString & name() const
The parameter name.
File containing declaration of LauAbsCoeffSet class.
UInt_t index_
The index number of the coefficient set.
virtual UInt_t index() const
Retrieve the index number of the coefficient set.
File containing declaration of LauParameter class.
Class for defining the abstract interface for complex coefficient classes.
Class for defining the fit parameter objects.
Definition: LauParameter.hh:31
TString name_
The parameter name.
virtual std::vector< LauParameter * > getParameters()=0
Retrieve the parameters of the coefficient so that they can be loaded into a fit. ...