29  if( 
type == Constraint::Gaussian ) 
return "Gaussian";
 
   30  if( 
type == Constraint::Poisson )  
return "Poisson";
 
   37    std::cout << 
"Error: Given empty name for ConstraintType" << std::endl;
 
   41  else if ( Name == 
"Gaussian" || Name == 
"Gauss" ) {
 
   42    return Constraint::Gaussian;
 
   45  else if ( Name == 
"Poisson" || Name == 
"Pois" ) {
 
   46    return Constraint::Poisson;
 
   50    std::cout << 
"Error: Unknown name given for Constraint Type: " << Name << std::endl;
 
   58                    fLow(1.0), fHigh(1.0) {}
 
   61  stream << 
"\t \t Name: " << fName
 
   64    << 
"\t High: " << fHigh
 
   69  xml << 
"      <NormFactor Name=\"" << GetName() << 
"\" " 
   70      << 
" Val=\""   << GetVal()   << 
"\" " 
   71      << 
" High=\""  << GetHigh()  << 
"\" " 
   72      << 
" Low=\""   << GetLow()   << 
"\" " 
   73      << 
"  /> " << std::endl;
 
   78  stream << 
"\t \t Name: " << fName
 
   80    << 
"\t High: " << fHigh
 
   85  xml << 
"      <OverallSys Name=\"" << GetName() << 
"\" " 
   86      << 
" High=\"" << GetHigh() << 
"\" " 
   87      << 
" Low=\""  << GetLow()  << 
"\" " 
   88      << 
"  /> " << std::endl;
 
   93  stream << 
"\t \t Name: " << fName
 
   94    << 
"\t HistoFileLow: " << fInputFileLow
 
   95    << 
"\t HistoNameLow: " << fHistoNameLow
 
   96    << 
"\t HistoPathLow: " << fHistoPathLow
 
   97    << 
"\t HistoFileHigh: " << fInputFileHigh
 
   98    << 
"\t HistoNameHigh: " << fHistoNameHigh
 
   99    << 
"\t HistoPathHigh: " << fHistoPathHigh
 
  104                     const std::string& DirName ) {
 
  109  auto histLow = GetHistoLow();
 
  110  if( histLow==
nullptr ) {
 
  111    std::cout << 
"Error: Cannot write " << GetName()
 
  112         << 
" to file: " << FileName
 
  113         << 
" HistoLow is nullptr" 
  118  fInputFileLow = FileName;
 
  119  fHistoPathLow = DirName;
 
  120  fHistoNameLow = histLow->GetName();
 
  122  auto histHigh = GetHistoHigh();
 
  123  if( histHigh==
nullptr ) {
 
  124    std::cout << 
"Error: Cannot write " << GetName()
 
  125         << 
" to file: " << FileName
 
  126         << 
" HistoHigh is nullptr" 
  131  fInputFileHigh = FileName;
 
  132  fHistoPathHigh = DirName;
 
  133  fHistoNameHigh = histHigh->GetName();
 
  141  xml << 
"      <HistoSys Name=\"" << GetName() << 
"\" " 
  142      << 
" HistoFileLow=\""  << GetInputFileLow()  << 
"\" " 
  143      << 
" HistoNameLow=\""  << GetHistoNameLow()  << 
"\" " 
  144      << 
" HistoPathLow=\""  << GetHistoPathLow()  << 
"\" " 
  146      << 
" HistoFileHigh=\""  << GetInputFileHigh()  << 
"\" " 
  147      << 
" HistoNameHigh=\""  << GetHistoNameHigh()  << 
"\" " 
  148      << 
" HistoPathHigh=\""  << GetHistoPathHigh()  << 
"\" " 
  149      << 
"  /> " << std::endl;
 
  155  stream << 
"\t \t Name: " << fName
 
  156    << 
"\t InputFile: " << fInputFileHigh
 
  157    << 
"\t HistoName: " << fHistoNameHigh
 
  158    << 
"\t HistoPath: " << fHistoPathHigh
 
  164  xml << 
"      <ShapeSys Name=\"" << GetName() << 
"\" " 
  165      << 
" InputFile=\""  << GetInputFile()  << 
"\" " 
  166      << 
" HistoName=\""  << GetHistoName()  << 
"\" " 
  167      << 
" HistoPath=\""  << GetHistoPath()  << 
"\" " 
  168      << 
" ConstraintType=\"" << std::string(
Constraint::Name(GetConstraintType())) << 
"\" " 
  169      << 
"  /> " << std::endl;
 
  174                     const std::string& DirName ) {
 
  176  auto histError = GetErrorHist();
 
  177  if( histError==
nullptr ) {
 
  178    std::cout << 
"Error: Cannot write " << GetName()
 
  179         << 
" to file: " << FileName
 
  180         << 
" ErrorHist is nullptr" 
  185  fInputFileHigh = FileName;
 
  186  fHistoPathHigh = DirName;
 
  187  fHistoNameHigh = histError->GetName();
 
  199  xml << 
"      <HistoFactor Name=\"" << GetName() << 
"\" " 
  201      << 
" InputFileLow=\""  << GetInputFileLow()  << 
"\" " 
  202      << 
" HistoNameLow=\""  << GetHistoNameLow()  << 
"\" " 
  203      << 
" HistoPathLow=\""  << GetHistoPathLow()  << 
"\" " 
  205      << 
" InputFileHigh=\""  << GetInputFileHigh()  << 
"\" " 
  206      << 
" HistoNameHigh=\""  << GetHistoNameHigh()  << 
"\" " 
  207      << 
" HistoPathHigh=\""  << GetHistoPathHigh()  << 
"\" " 
  208      << 
"  /> " << std::endl;
 
  215  stream << 
"\t \t Name: " << fName << std::endl;
 
  217  if( !fHistoNameHigh.empty() ) {
 
  219      << 
" Shape Hist Name: " << fHistoNameHigh
 
  220      << 
" Shape Hist Path Name: " << fHistoPathHigh
 
  221      << 
" Shape Hist FileName: " << fInputFileHigh
 
  225  if( fConstant ) { stream << 
"\t \t ( Constant ): " << std::endl; }
 
  231                        const std::string& DirName ) {
 
  233  if( HasInitialShape() ) {
 
  234    auto histInitialShape = GetInitialShape();
 
  235    if( histInitialShape==
nullptr ) {
 
  236      std::cout << 
"Error: Cannot write " << GetName()
 
  237      << 
" to file: " << FileName
 
  238      << 
" InitialShape is nullptr" 
  242    histInitialShape->Write();
 
  243    fInputFileHigh = FileName;
 
  244    fHistoPathHigh = DirName;
 
  245    fHistoNameHigh = histInitialShape->GetName();
 
  254  xml << 
"      <ShapeFactor Name=\"" << GetName() << 
"\" ";
 
  255  if( fHasInitialShape ) {
 
  256    xml << 
" InputFile=\""  << GetInputFile()  << 
"\" " 
  257   << 
" HistoName=\""  << GetHistoName()  << 
"\" " 
  258   << 
" HistoPath=\""  << GetHistoPath()  << 
"\" ";
 
  260  xml << 
"  /> " << std::endl;
 
  266  stream << 
"\t \t RelErrorThreshold: " << fRelErrorThreshold
 
  272  xml << 
"    <StatErrorConfig RelErrorThreshold=\"" << GetRelErrorThreshold()
 
  276      << 
"/> " << std::endl << std::endl;
 
  283  stream << 
"\t \t Activate: " << fActivate
 
  284    << 
"\t InputFile: " << fInputFileHigh
 
  285    << 
"\t HistoName: " << fHistoNameHigh
 
  286    << 
"\t histoPath: " << fHistoPathHigh
 
  292  if( GetActivate() ) {
 
  293    xml << 
"      <StatError Activate=\"" 
  294   << (GetActivate() ? std::string(
"True") : std::string(
"False"))
 
  296   << 
" InputFile=\"" << GetInputFile() << 
"\" " 
  297   << 
" HistoName=\"" << GetHistoName() << 
"\" " 
  298   << 
" HistoPath=\"" << GetHistoPath() << 
"\" " 
  299   << 
" /> " << std::endl;
 
  306                      const std::string& DirName ) {
 
  310    std::string statErrorHistName = 
"statisticalErrors";
 
  312    auto hStatError = GetErrorHist();
 
  313    if( hStatError == 
nullptr ) {
 
  314      std::cout << 
"Error: Stat Error error hist is nullptr" << std::endl;
 
  317    hStatError->Write(statErrorHistName.c_str());
 
  319    fInputFileHigh = OutputFileName;
 
  320    fHistoNameHigh = statErrorHistName;
 
  321    fHistoPathHigh = DirName;
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
void PrintXML(std::ostream &) const override
void PrintXML(std::ostream &) const override
virtual void writeToFile(const std::string &FileName, const std::string &DirName)
virtual void Print(std::ostream &=std::cout) const
void Print(std::ostream &=std::cout) const
void PrintXML(std::ostream &) const
void PrintXML(std::ostream &) const
void Print(std::ostream &=std::cout) const
void PrintXML(std::ostream &) const override
void writeToFile(const std::string &FileName, const std::string &DirName) override
void Print(std::ostream &=std::cout) const override
void PrintXML(std::ostream &) const override
void writeToFile(const std::string &FileName, const std::string &DirName) override
void Print(std::ostream &=std::cout) const override
void PrintXML(std::ostream &) const
void Print(std::ostream &=std::cout) const
void Print(std::ostream &=std::cout) const override
void PrintXML(std::ostream &) const override
void writeToFile(const std::string &FileName, const std::string &DirName) override
Type GetType(const std::string &Name)
std::string Name(Type type)