Logo ROOT   6.14/05
Reference Guide
PreprocessFunction.cxx
Go to the documentation of this file.
1 // @(#)root/roostats:$Id$
2 // Author: Kyle Cranmer, George Lewis
3 /*************************************************************************
4  * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. *
5  * All rights reserved. *
6  * *
7  * For the licensing terms see $ROOTSYS/LICENSE. *
8  * For the list of contributors see $ROOTSYS/README/CREDITS. *
9  *************************************************************************/
10 
11 ////////////////////////////////////////////////////////////////////////////////
12 
13 /*
14 BEGIN_HTML
15 <p>
16 </p>
17 END_HTML
18 */
19 //
20 
22 
23 
25 
26 RooStats::HistFactory::PreprocessFunction::PreprocessFunction(std::string Name, std::string Expression, std::string Dependents) :
27  fName(Name), fExpression(Expression), fDependents(Dependents) {
28  fCommand = GetCommand(Name, Expression, Dependents);
29 }
30 
31 std::string RooStats::HistFactory::PreprocessFunction::GetCommand(std::string Name, std::string Expression, std::string Dependents) {
32  std::string command = "expr::"+Name+"('"+Expression+"',{"+Dependents+"})";
33  return command;
34 }
35 
36 
38 
39  stream << "\t \t Name: " << fName
40  << "\t \t Expression: " << fExpression
41  << "\t \t Dependents: " << fDependents
42  << std::endl;
43 
44 }
45 
47  xml << "<Function Name=\"" << GetName() << "\" "
48  << "Expression=\"" << GetExpression() << "\" "
49  << "Dependents=\"" << GetDependents() << "\" "
50  << "/>" << std::endl;
51 }
const char * Name
Definition: TXMLSetup.cxx:66