Logo ROOT  
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 
21 RooStats::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 
26 std::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 }
RooStats::HistFactory::PreprocessFunction::PrintXML
void PrintXML(std::ostream &)
Definition: PreprocessFunction.cxx:41
RooStats::HistFactory::PreprocessFunction::Print
void Print(std::ostream &=std::cout)
Definition: PreprocessFunction.cxx:32
RooStats::HistFactory::PreprocessFunction::GetCommand
std::string GetCommand() const
Definition: PreprocessFunction.h:34
PreprocessFunction.h
xmlio::Name
const char * Name
Definition: TXMLSetup.cxx:67
RooStats::HistFactory::PreprocessFunction::PreprocessFunction
PreprocessFunction()
Definition: PreprocessFunction.cxx:19
RooStats::HistFactory::PreprocessFunction::fCommand
std::string fCommand
Definition: PreprocessFunction.h:43