Logo ROOT  
Reference Guide
RooAbsDataStore.cxx
Go to the documentation of this file.
1/*****************************************************************************
2 * Project: RooFit *
3 * Package: RooFitCore *
4 * @(#)root/roofitcore:$Id$
5 * Authors: *
6 * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu *
7 * DK, David Kirkby, UC Irvine, dkirkby@uci.edu *
8 * *
9 * Copyright (c) 2000-2005, Regents of the University of California *
10 * and Stanford University. All rights reserved. *
11 * *
12 * Redistribution and use in source and binary forms, *
13 * with or without modification, are permitted according to the terms *
14 * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
15 *****************************************************************************/
16
17/**
18\file RooAbsDataStore.cxx
19\class RooAbsDataStore
20\ingroup Roofitcore
21
22RooAbsDataStore is the abstract base class for data collection that
23use a TTree as internal storage mechanism
24**/
25
26#include "RooAbsDataStore.h"
27
28#include "TClass.h"
29
30
31////////////////////////////////////////////////////////////////////////////////
32/// Print class name of dataset
33void RooAbsDataStore::printClassName(std::ostream& os) const { os << IsA()->GetName() ; }
34
35
36////////////////////////////////////////////////////////////////////////////////
37/// Print argument of dataset, i.e. the observable names
38void RooAbsDataStore::printArgs(std::ostream& os) const { _vars.printValue(os); }
39
40
41////////////////////////////////////////////////////////////////////////////////
42/// Detailed printing interface
43void RooAbsDataStore::printMultiline(std::ostream& os, Int_t /*content*/, Bool_t verbose, TString indent) const
44{
45 os << indent << "DataStore " << GetName() << " (" << GetTitle() << ")" << std::endl ;
46 os << indent << " Contains " << numEntries() << " entries" << std::endl;
47
48 if (!verbose) {
49 os << indent << " Observables " << _vars << std::endl ;
50 } else {
51 os << indent << " Observables: " << std::endl ;
53 }
54
55 if(verbose && !_cachedVars.empty()) {
56 os << indent << " Caches " << _cachedVars << std::endl ;
57 }
58}
int Int_t
Definition: CPyCppyy.h:43
bool Bool_t
Definition: RtypesCore.h:63
static void indent(ostringstream &buf, int indent_level)
bool empty() const
virtual void printValue(std::ostream &os) const
Print value of collection, i.e.
void printArgs(std::ostream &os) const override
Print argument of dataset, i.e. the observable names.
RooArgSet _cachedVars
void printMultiline(std::ostream &os, Int_t content, Bool_t verbose, TString indent) const override
Detailed printing interface.
virtual Int_t numEntries() const =0
void printClassName(std::ostream &os) const override
Print class name of dataset.
virtual void printStream(std::ostream &os, Int_t contents, StyleOption style, TString indent="") const
Print description of object on ostream, printing contents set by contents integer,...
virtual const char * GetName() const
Returns name of object.
Definition: TNamed.h:47
virtual const char * GetTitle() const
Returns title of object.
Definition: TNamed.h:48
Basic string class.
Definition: TString.h:136