37    std::cout << 
"Error: Given empty name for ConstraintType" << std::endl;
 
   41  else if ( 
Name == 
"Gaussian" || 
Name == 
"Gauss" ) {
 
   45  else if ( 
Name == 
"Poisson" || 
Name == 
"Pois" ) {
 
   50    std::cout << 
"Error: Unknown name given for Constraint Type: " << 
Name << std::endl;
 
   58                    fLow(1.0), fHigh(1.0), 
 
   62  stream << 
"\t \t Name: " << fName
 
   65    << 
"\t High: " << fHigh
 
   66    << 
"\t Const: " << fConst
 
   71  xml << 
"      <NormFactor Name=\"" << 
GetName() << 
"\" " 
   72      << 
" Val=\""   << GetVal()   << 
"\" " 
   73      << 
" High=\""  << GetHigh()  << 
"\" " 
   74      << 
" Low=\""   << GetLow()   << 
"\" " 
   75      << 
" Const=\"" << (GetConst() ? std::string(
"True") : std::string(
"False")) << 
"\" " 
   76      << 
"  /> " << std::endl;
 
   81  stream << 
"\t \t Name: " << fName
 
   83    << 
"\t High: " << fHigh
 
   88  xml << 
"      <OverallSys Name=\"" << 
GetName() << 
"\" " 
   89      << 
" High=\"" << GetHigh() << 
"\" " 
   90      << 
" Low=\""  << GetLow()  << 
"\" " 
   91      << 
"  /> " << std::endl;
 
   96  TH1* histo_low = (
TH1*) fhLow.GetObject();
 
  101  TH1* histo_high = (
TH1*) fhHigh.GetObject();
 
  106  stream << 
"\t \t Name: " << fName
 
  107    << 
"\t HistoFileLow: " << fInputFileLow
 
  108    << 
"\t HistoNameLow: " << fHistoNameLow
 
  109    << 
"\t HistoPathLow: " << fHistoPathLow
 
  110    << 
"\t HistoFileHigh: " << fInputFileHigh
 
  111    << 
"\t HistoNameHigh: " << fHistoNameHigh
 
  112    << 
"\t HistoPathHigh: " << fHistoPathHigh
 
  117  xml << 
"      <HistoSys Name=\"" << 
GetName() << 
"\" " 
  118      << 
" HistoFileLow=\""  << GetInputFileLow()  << 
"\" " 
  119      << 
" HistoNameLow=\""  << GetHistoNameLow()  << 
"\" " 
  120      << 
" HistoPathLow=\""  << GetHistoPathLow()  << 
"\" " 
  122      << 
" HistoFileHigh=\""  << GetInputFileHigh()  << 
"\" " 
  123      << 
" HistoNameHigh=\""  << GetHistoNameHigh()  << 
"\" " 
  124      << 
" HistoPathHigh=\""  << GetHistoPathHigh()  << 
"\" " 
  125      << 
"  /> " << std::endl;
 
  129                     const std::string& DirName ) {
 
  134  TH1* histLow = GetHistoLow();
 
  135  if( histLow==NULL ) {
 
  136    std::cout << 
"Error: Cannot write " << 
GetName()
 
  137         << 
" to file: " << FileName
 
  138         << 
" HistoLow is NULL"  
  143  fInputFileLow = FileName;
 
  144  fHistoPathLow = DirName;
 
  145  fHistoNameLow = histLow->
GetName(); 
 
  147  TH1* histHigh = GetHistoHigh();
 
  148  if( histHigh==NULL ) {
 
  149    std::cout << 
"Error: Cannot write " << 
GetName()
 
  150         << 
" to file: " << FileName
 
  151         << 
" HistoHigh is NULL"  
  156  fInputFileHigh = FileName;
 
  157  fHistoPathHigh = DirName;
 
  158  fHistoNameHigh = histHigh->
GetName();
 
  168  TH1* error_hist = (
TH1*) fhError.GetObject();
 
  174  stream << 
"\t \t Name: " << fName
 
  175    << 
"\t InputFile: " << fInputFile
 
  176    << 
"\t HistoName: " << fHistoName
 
  177    << 
"\t HistoPath: " << fHistoPath
 
  183  xml << 
"      <ShapeSys Name=\"" << 
GetName() << 
"\" " 
  184      << 
" InputFile=\""  << GetInputFile()  << 
"\" " 
  185      << 
" HistoName=\""  << GetHistoName()  << 
"\" " 
  186      << 
" HistoPath=\""  << GetHistoPath()  << 
"\" " 
  187      << 
" ConstraintType=\"" << std::string(
Constraint::Name(GetConstraintType())) << 
"\" " 
  188      << 
"  /> " << std::endl;
 
  193                     const std::string& DirName ) {
 
  195  TH1* histError = GetErrorHist();
 
  196  if( histError==NULL ) {
 
  197    std::cout << 
"Error: Cannot write " << 
GetName()
 
  198         << 
" to file: " << FileName
 
  199         << 
" ErrorHist is NULL"  
  204  fInputFile = FileName;
 
  205  fHistoPath = DirName;
 
  206  fHistoName = histError->
GetName(); 
 
  218  stream << 
"\t \t Name: " << fName
 
  219    << 
"\t InputFileLow: " << fInputFileLow
 
  220    << 
"\t HistoNameLow: " << fHistoNameLow
 
  221    << 
"\t HistoPathLow: " << fHistoPathLow
 
  222    << 
"\t InputFileHigh: " << fInputFileHigh
 
  223    << 
"\t HistoNameHigh: " << fHistoNameHigh
 
  224    << 
"\t HistoPathHigh: " << fHistoPathHigh
 
  230  TH1* histo_low = (
TH1*) fhLow.GetObject();
 
  235  TH1* histo_high = (
TH1*) fhHigh.GetObject();
 
  241                        const std::string& DirName ) {
 
  247  TH1* histLow = GetHistoLow();
 
  248  if( histLow==NULL ) {
 
  249    std::cout << 
"Error: Cannot write " << 
GetName()
 
  250         << 
" to file: " << FileName
 
  251         << 
" HistoLow is NULL"  
  256  fInputFileLow = FileName;
 
  257  fHistoPathLow = DirName;
 
  258  fHistoNameLow = histLow->
GetName(); 
 
  260  TH1* histHigh = GetHistoHigh();
 
  261  if( histHigh==NULL ) {
 
  262    std::cout << 
"Error: Cannot write " << 
GetName()
 
  263         << 
" to file: " << FileName
 
  264         << 
" HistoHigh is NULL"  
  269  fInputFileHigh = FileName;
 
  270  fHistoPathHigh = DirName;
 
  271  fHistoNameHigh = histHigh->
GetName();
 
  278  xml << 
"      <HistoFactor Name=\"" << 
GetName() << 
"\" " 
  280      << 
" InputFileLow=\""  << GetInputFileLow()  << 
"\" " 
  281      << 
" HistoNameLow=\""  << GetHistoNameLow()  << 
"\" " 
  282      << 
" HistoPathLow=\""  << GetHistoPathLow()  << 
"\" " 
  284      << 
" InputFileHigh=\""  << GetInputFileHigh()  << 
"\" " 
  285      << 
" HistoNameHigh=\""  << GetHistoNameHigh()  << 
"\" " 
  286      << 
" HistoPathHigh=\""  << GetHistoPathHigh()  << 
"\" " 
  287      << 
"  /> " << std::endl;
 
  293                      fHasInitialShape(false),
 
  294                      fhInitialShape(NULL) {;}
 
  298  stream << 
"\t \t Name: " << fName << std::endl;
 
  300  if( fHistoName != 
"" ) {
 
  302      << 
" Shape Hist Name: " << fHistoName
 
  303      << 
" Shape Hist Path Name: " << fHistoPath
 
  304      << 
" Shape Hist FileName: " << fInputFile
 
  308  if( fConstant ) { stream << 
"\t \t ( Constant ): " << std::endl; }
 
  314                        const std::string& DirName ) {
 
  316  if( HasInitialShape() ) {
 
  317    TH1* histInitialShape = GetInitialShape();
 
  318    if( histInitialShape==NULL ) {
 
  319      std::cout << 
"Error: Cannot write " << 
GetName()
 
  320      << 
" to file: " << FileName
 
  321      << 
" InitialShape is NULL"  
  325    histInitialShape->
Write();
 
  326    fInputFile = FileName;
 
  327    fHistoPath = DirName;
 
  328    fHistoName = histInitialShape->
GetName(); 
 
  337  xml << 
"      <ShapeFactor Name=\"" << 
GetName() << 
"\" ";
 
  338  if( fHasInitialShape ) {
 
  339    xml << 
" InputFile=\""  << GetInputFile()  << 
"\" " 
  340   << 
" HistoName=\""  << GetHistoName()  << 
"\" " 
  341   << 
" HistoPath=\""  << GetHistoPath()  << 
"\" ";
 
  343  xml << 
"  /> " << std::endl;
 
  349  stream << 
"\t \t RelErrorThreshold: " << fRelErrorThreshold
 
  355  xml << 
"    <StatErrorConfig RelErrorThreshold=\"" << GetRelErrorThreshold() 
 
  359      << 
"/> " << std::endl << std::endl;
 
  366  return (
TH1*) fhError.GetObject();
 
  371  stream << 
"\t \t Activate: " << fActivate
 
  372    << 
"\t InputFile: " << fInputFile
 
  373    << 
"\t HistoName: " << fHistoName
 
  374    << 
"\t histoPath: " << fHistoPath
 
  380  if( GetActivate() ) {
 
  381    xml << 
"      <StatError Activate=\""  
  382   << (GetActivate() ? std::string(
"True") : std::string(
"False"))  
 
  384   << 
" InputFile=\"" << GetInputFile() << 
"\" " 
  385   << 
" HistoName=\"" << GetHistoName() << 
"\" " 
  386   << 
" HistoPath=\"" << GetHistoPath() << 
"\" " 
  387   << 
" /> " << std::endl;
 
  394                      const std::string& DirName ) {
 
  398    std::string statErrorHistName = 
"statisticalErrors";
 
  400    TH1* hStatError = GetErrorHist();
 
  401    if( hStatError == NULL ) {
 
  402      std::cout << 
"Error: Stat Error error hist is NULL" << std::endl;
 
  405    hStatError->
Write(statErrorHistName.c_str());
 
  407    fInputFile = OutputFileName;
 
  408    fHistoName = statErrorHistName;
 
  409    fHistoPath = DirName;
 
void PrintXML(std::ostream &)
void writeToFile(const std::string &FileName, const std::string &DirName)
void Print(std::ostream &=std::cout)
void writeToFile(const std::string &FileName, const std::string &DirName)
void PrintXML(std::ostream &)
void Print(std::ostream &=std::cout)
void Print(std::ostream &=std::cout)
void PrintXML(std::ostream &)
void PrintXML(std::ostream &)
void Print(std::ostream &=std::cout)
void writeToFile(const std::string &FileName, const std::string &DirName)
void Print(std::ostream &=std::cout)
void PrintXML(std::ostream &)
void PrintXML(std::ostream &)
void Print(std::ostream &=std::cout)
void writeToFile(const std::string &FileName, const std::string &DirName)
void Print(std::ostream &=std::cout)
void PrintXML(std::ostream &)
void PrintXML(std::ostream &)
void writeToFile(const std::string &FileName, const std::string &DirName)
void Print(std::ostream &=std::cout)
virtual const char * GetName() const
Returns name of object.
virtual Int_t Write(const char *name=0, Int_t option=0, Int_t bufsize=0)
Write this object to the current directory.
std::string GetName(const std::string &scope_name)
Type GetType(const std::string &Name)
std::string Name(Type type)