Logo ROOT   6.18/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 * \ingroup HistFactory
14 */
15
17
18
20
21RooStats::HistFactory::PreprocessFunction::PreprocessFunction(std::string Name, std::string Expression, std::string Dependents) :
22 fName(Name), fExpression(Expression), fDependents(Dependents) {
23 fCommand = GetCommand(Name, Expression, Dependents);
24}
25
26std::string RooStats::HistFactory::PreprocessFunction::GetCommand(std::string Name, std::string Expression, std::string Dependents) {
27 std::string command = "expr::"+Name+"('"+Expression+"',{"+Dependents+"})";
28 return command;
29}
30
31
33
34 stream << "\t \t Name: " << fName
35 << "\t \t Expression: " << fExpression
36 << "\t \t Dependents: " << fDependents
37 << std::endl;
38
39}
40
42 xml << "<Function Name=\"" << GetName() << "\" "
43 << "Expression=\"" << GetExpression() << "\" "
44 << "Dependents=\"" << GetDependents() << "\" "
45 << "/>" << std::endl;
46}
std::string GetName(const std::string &scope_name)
Definition: Cppyy.cxx:146
const char * Name
Definition: TXMLSetup.cxx:66