Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/root/RooPrintable.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 /*****************************************************************************
0002  * Project: RooFit                                                           *
0003  * Package: RooFitCore                                                       *
0004  *    File: $Id: RooPrintable.h,v 1.12 2007/05/11 09:11:30 verkerke Exp $
0005  * Authors:                                                                  *
0006  *   WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu       *
0007  *   DK, David Kirkby,    UC Irvine,         dkirkby@uci.edu                 *
0008  *                                                                           *
0009  * Copyright (c) 2000-2005, Regents of the University of California          *
0010  *                          and Stanford University. All rights reserved.    *
0011  *                                                                           *
0012  * Redistribution and use in source and binary forms,                        *
0013  * with or without modification, are permitted according to the terms        *
0014  * listed in LICENSE (http://roofit.sourceforge.net/license.txt)             *
0015  *****************************************************************************/
0016 #ifndef ROO_PRINTABLE
0017 #define ROO_PRINTABLE
0018 
0019 
0020 class TNamed ;
0021 
0022 #include "Rtypes.h"
0023 #include "TString.h"
0024 
0025 class RooPrintable {
0026 public:
0027   inline RooPrintable() { }
0028   inline virtual ~RooPrintable() { }
0029 
0030   // New-style printing
0031 
0032   // Master print function
0033   enum ContentsOption { kName=1, kClassName=2, kValue=4, kArgs=8, kExtras=16, kAddress=32, kTitle=64,  kCollectionHeader=128} ; // Can be ORed
0034   enum StyleOption { kInline=1, kSingleLine=2, kStandard=3, kVerbose=4, kTreeStructure=5 } ; // Exclusive
0035   virtual void printStream(std::ostream& os, Int_t contents, StyleOption style, TString indent="") const ;
0036 
0037   // Virtual hook function for class-specific content implementation
0038   virtual void printAddress(std::ostream& os) const ;
0039   virtual void printName(std::ostream& os) const ;
0040   virtual void printTitle(std::ostream& os) const ;
0041   virtual void printClassName(std::ostream& os) const ;
0042   virtual void printValue(std::ostream& os) const ;
0043   virtual void printArgs(std::ostream& os) const ;
0044   virtual void printExtras(std::ostream& os) const ;
0045   virtual void printMultiline(std::ostream& os, Int_t contents, bool verbose=false, TString indent="") const ;
0046   virtual void printTree(std::ostream& os, TString indent="") const ;
0047 
0048   static std::ostream& defaultPrintStream(std::ostream *os= nullptr);
0049   virtual Int_t defaultPrintContents(Option_t* opt) const ;
0050   virtual StyleOption defaultPrintStyle(Option_t* opt) const ;
0051 
0052   // Formatting control
0053   static void nameFieldLength(Int_t newLen) ;
0054 
0055 protected:
0056 
0057   static Int_t _nameLength ;
0058 
0059   ClassDef(RooPrintable,1) // Interface for printable objects
0060 
0061 
0062 };
0063 
0064 namespace RooFit {
0065 std::ostream& operator<<(std::ostream& os, const RooPrintable& rp) ;
0066 }
0067 
0068 using RooFit::operator<< ;
0069 
0070 #endif