RooPrintable.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * Project: RooFit                                                           *
00003  * Package: RooFitCore                                                       *
00004  *    File: $Id: RooPrintable.h,v 1.12 2007/05/11 09:11:30 verkerke Exp $
00005  * Authors:                                                                  *
00006  *   WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu       *
00007  *   DK, David Kirkby,    UC Irvine,         dkirkby@uci.edu                 *
00008  *                                                                           *
00009  * Copyright (c) 2000-2005, Regents of the University of California          *
00010  *                          and Stanford University. All rights reserved.    *
00011  *                                                                           *
00012  * Redistribution and use in source and binary forms,                        *
00013  * with or without modification, are permitted according to the terms        *
00014  * listed in LICENSE (http://roofit.sourceforge.net/license.txt)             *
00015  *****************************************************************************/
00016 #ifndef ROO_PRINTABLE
00017 #define ROO_PRINTABLE
00018 
00019 
00020 class TNamed ;
00021 
00022 #include "Riosfwd.h"
00023 #include "Rtypes.h"
00024 #include "TString.h"
00025 
00026 class RooPrintable {
00027 public:
00028   inline RooPrintable() { }
00029   inline virtual ~RooPrintable() { }
00030 
00031   // New-style printing
00032 
00033   // Master print function
00034   enum ContentsOption { kName=1, kClassName=2, kValue=4, kArgs=8, kExtras=16, kAddress=32, kTitle=64,  kCollectionHeader=128} ; // Can be ORed
00035   enum StyleOption { kInline=1, kSingleLine=2, kStandard=3, kVerbose=4, kTreeStructure=5 } ; // Exclusive
00036   virtual void printStream(ostream& os, Int_t contents, StyleOption style, TString indent="") const ;
00037   
00038   // Virtual hook function for class-specific content implementation
00039   virtual void printAddress(ostream& os) const ;
00040   virtual void printName(ostream& os) const ;
00041   virtual void printTitle(ostream& os) const ;
00042   virtual void printClassName(ostream& os) const ;
00043   virtual void printValue(ostream& os) const ;
00044   virtual void printArgs(ostream& os) const ;
00045   virtual void printExtras(ostream& os) const ;
00046   virtual void printMultiline(ostream& os, Int_t contents, Bool_t verbose=kFALSE, TString indent="") const ;
00047   virtual void printTree(ostream& os, TString indent="") const ;
00048 
00049   static ostream& defaultPrintStream(ostream *os= 0);
00050   virtual Int_t defaultPrintContents(Option_t* opt) const ;
00051   virtual StyleOption defaultPrintStyle(Option_t* opt) const ;
00052    
00053   // Formatting control
00054   static void nameFieldLength(Int_t newLen) ;
00055 
00056 protected:
00057 
00058   static Int_t _nameLength ;
00059 
00060   ClassDef(RooPrintable,1) // Interface for printable objects
00061 
00062 
00063 };
00064 
00065 namespace RooFit {
00066 ostream& operator<<(ostream& os, const RooPrintable& rp) ; 
00067 }
00068 
00069 #ifndef __CINT__
00070 using RooFit::operator<< ;
00071 #endif
00072 
00073 #endif

Generated on Tue Jul 5 14:26:18 2011 for ROOT_528-00b_version by  doxygen 1.5.1