ROOT logo
/*****************************************************************************
 * Project: RooFit                                                           *
 * Package: RooFitCore                                                       *
 * @(#)root/roofitcore:$Id$
 * Authors:                                                                  *
 *   WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu       *
 *   DK, David Kirkby,    UC Irvine,         dkirkby@uci.edu                 *
 *                                                                           *
 * Copyright (c) 2000-2005, Regents of the University of California          *
 *                          and Stanford University. All rights reserved.    *
 *                                                                           *
 * Redistribution and use in source and binary forms,                        *
 * with or without modification, are permitted according to the terms        *
 * listed in LICENSE (http://roofit.sourceforge.net/license.txt)             *
 *****************************************************************************/

//////////////////////////////////////////////////////////////////////////////
// 
// BEGIN_HTML
// RooAbsBinning is the abstract base class for RooRealVar binning definitions
// This class defines the interface to retrieve bin boundaries, ranges etc.
// END_HTML
//
//

#include "RooFit.h"

#include "RooAbsBinning.h"
#include "RooAbsReal.h"
#include "TClass.h"

#include "Riostream.h"

using namespace std;

ClassImp(RooAbsBinning)
;


//_____________________________________________________________________________
RooAbsBinning::RooAbsBinning(const char* name) : TNamed(name,name)
{
  // Constructor
}



//_____________________________________________________________________________
RooAbsBinning::~RooAbsBinning() 
{
  // Destructor
}



//_____________________________________________________________________________
void RooAbsBinning::printName(ostream& os) const 
{
  // Print binning name

  os << GetName() ;
}



//_____________________________________________________________________________
void RooAbsBinning::printTitle(ostream& os) const 
{
  // Print binning title

  os << GetTitle() ;
}



//_____________________________________________________________________________
void RooAbsBinning::printClassName(ostream& os) const 
{
  // Print binning class name

  os << IsA()->GetName() ;
}



//_____________________________________________________________________________
void RooAbsBinning::printArgs(ostream& os) const 
{
  // Print binning arguments (the RooAbsReal objects represening
  // the variable bin boundaries for parameterized binning implementations

  os << "[ " ;    
  if (lowBoundFunc()) {
    os << "lowerBound=" << lowBoundFunc()->GetName() ;
  }
  if (highBoundFunc()) {
    if (lowBoundFunc()) {
      os << " " ;
    }
    os << "upperBound=" << highBoundFunc()->GetName() ;
  }
  os << " ]" ;  
}



//_____________________________________________________________________________
void RooAbsBinning::printValue(ostream &os) const
{
  // Print binning value, i.e the bin boundary positions
  Int_t n = numBins() ;
  os << "B(" ;
  
  Int_t i ;
  for (i=0 ; i<n ; i++) {
    if (i>0) {
      os << " : " ;
    }
    os << binLow(i) ;
  }
  os << " : " << binHigh(n-1) ;
  os << ")" ;

}



//_____________________________________________________________________________
void RooAbsBinning::Streamer(TBuffer &R__b)
{
  // Custom streamer implementing schema evolution between V1 and V2 persistent binnings

   UInt_t R__s, R__c;
   if (R__b.IsReading()) {
      Version_t R__v = R__b.ReadVersion(&R__s, &R__c); if (R__v) { }
      if (R__v==1) {
	TObject::Streamer(R__b);
      } else {
	TNamed::Streamer(R__b);
      }
      RooPrintable::Streamer(R__b);
      R__b.CheckByteCount(R__s, R__c, RooAbsBinning::IsA());
   } else {
      R__c = R__b.WriteVersion(RooAbsBinning::IsA(), kTRUE);
      TNamed::Streamer(R__b);
      RooPrintable::Streamer(R__b);
      R__b.SetByteCount(R__c, kTRUE);
   }
}

 RooAbsBinning.cxx:1
 RooAbsBinning.cxx:2
 RooAbsBinning.cxx:3
 RooAbsBinning.cxx:4
 RooAbsBinning.cxx:5
 RooAbsBinning.cxx:6
 RooAbsBinning.cxx:7
 RooAbsBinning.cxx:8
 RooAbsBinning.cxx:9
 RooAbsBinning.cxx:10
 RooAbsBinning.cxx:11
 RooAbsBinning.cxx:12
 RooAbsBinning.cxx:13
 RooAbsBinning.cxx:14
 RooAbsBinning.cxx:15
 RooAbsBinning.cxx:16
 RooAbsBinning.cxx:17
 RooAbsBinning.cxx:18
 RooAbsBinning.cxx:19
 RooAbsBinning.cxx:20
 RooAbsBinning.cxx:21
 RooAbsBinning.cxx:22
 RooAbsBinning.cxx:23
 RooAbsBinning.cxx:24
 RooAbsBinning.cxx:25
 RooAbsBinning.cxx:26
 RooAbsBinning.cxx:27
 RooAbsBinning.cxx:28
 RooAbsBinning.cxx:29
 RooAbsBinning.cxx:30
 RooAbsBinning.cxx:31
 RooAbsBinning.cxx:32
 RooAbsBinning.cxx:33
 RooAbsBinning.cxx:34
 RooAbsBinning.cxx:35
 RooAbsBinning.cxx:36
 RooAbsBinning.cxx:37
 RooAbsBinning.cxx:38
 RooAbsBinning.cxx:39
 RooAbsBinning.cxx:40
 RooAbsBinning.cxx:41
 RooAbsBinning.cxx:42
 RooAbsBinning.cxx:43
 RooAbsBinning.cxx:44
 RooAbsBinning.cxx:45
 RooAbsBinning.cxx:46
 RooAbsBinning.cxx:47
 RooAbsBinning.cxx:48
 RooAbsBinning.cxx:49
 RooAbsBinning.cxx:50
 RooAbsBinning.cxx:51
 RooAbsBinning.cxx:52
 RooAbsBinning.cxx:53
 RooAbsBinning.cxx:54
 RooAbsBinning.cxx:55
 RooAbsBinning.cxx:56
 RooAbsBinning.cxx:57
 RooAbsBinning.cxx:58
 RooAbsBinning.cxx:59
 RooAbsBinning.cxx:60
 RooAbsBinning.cxx:61
 RooAbsBinning.cxx:62
 RooAbsBinning.cxx:63
 RooAbsBinning.cxx:64
 RooAbsBinning.cxx:65
 RooAbsBinning.cxx:66
 RooAbsBinning.cxx:67
 RooAbsBinning.cxx:68
 RooAbsBinning.cxx:69
 RooAbsBinning.cxx:70
 RooAbsBinning.cxx:71
 RooAbsBinning.cxx:72
 RooAbsBinning.cxx:73
 RooAbsBinning.cxx:74
 RooAbsBinning.cxx:75
 RooAbsBinning.cxx:76
 RooAbsBinning.cxx:77
 RooAbsBinning.cxx:78
 RooAbsBinning.cxx:79
 RooAbsBinning.cxx:80
 RooAbsBinning.cxx:81
 RooAbsBinning.cxx:82
 RooAbsBinning.cxx:83
 RooAbsBinning.cxx:84
 RooAbsBinning.cxx:85
 RooAbsBinning.cxx:86
 RooAbsBinning.cxx:87
 RooAbsBinning.cxx:88
 RooAbsBinning.cxx:89
 RooAbsBinning.cxx:90
 RooAbsBinning.cxx:91
 RooAbsBinning.cxx:92
 RooAbsBinning.cxx:93
 RooAbsBinning.cxx:94
 RooAbsBinning.cxx:95
 RooAbsBinning.cxx:96
 RooAbsBinning.cxx:97
 RooAbsBinning.cxx:98
 RooAbsBinning.cxx:99
 RooAbsBinning.cxx:100
 RooAbsBinning.cxx:101
 RooAbsBinning.cxx:102
 RooAbsBinning.cxx:103
 RooAbsBinning.cxx:104
 RooAbsBinning.cxx:105
 RooAbsBinning.cxx:106
 RooAbsBinning.cxx:107
 RooAbsBinning.cxx:108
 RooAbsBinning.cxx:109
 RooAbsBinning.cxx:110
 RooAbsBinning.cxx:111
 RooAbsBinning.cxx:112
 RooAbsBinning.cxx:113
 RooAbsBinning.cxx:114
 RooAbsBinning.cxx:115
 RooAbsBinning.cxx:116
 RooAbsBinning.cxx:117
 RooAbsBinning.cxx:118
 RooAbsBinning.cxx:119
 RooAbsBinning.cxx:120
 RooAbsBinning.cxx:121
 RooAbsBinning.cxx:122
 RooAbsBinning.cxx:123
 RooAbsBinning.cxx:124
 RooAbsBinning.cxx:125
 RooAbsBinning.cxx:126
 RooAbsBinning.cxx:127
 RooAbsBinning.cxx:128
 RooAbsBinning.cxx:129
 RooAbsBinning.cxx:130
 RooAbsBinning.cxx:131
 RooAbsBinning.cxx:132
 RooAbsBinning.cxx:133
 RooAbsBinning.cxx:134
 RooAbsBinning.cxx:135
 RooAbsBinning.cxx:136
 RooAbsBinning.cxx:137
 RooAbsBinning.cxx:138
 RooAbsBinning.cxx:139
 RooAbsBinning.cxx:140
 RooAbsBinning.cxx:141
 RooAbsBinning.cxx:142
 RooAbsBinning.cxx:143
 RooAbsBinning.cxx:144
 RooAbsBinning.cxx:145
 RooAbsBinning.cxx:146
 RooAbsBinning.cxx:147
 RooAbsBinning.cxx:148
 RooAbsBinning.cxx:149
 RooAbsBinning.cxx:150