Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooNameSet.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Project: RooFit *
3 * Package: RooFitCore *
4 * File: $Id: RooNameSet.h,v 1.16 2007/05/11 09:11:30 verkerke Exp $
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#ifndef ROO_NAME_SET
17#define ROO_NAME_SET
18
19#include "TObject.h"
20#include "RooPrintable.h"
21
22#include <ROOT/RConfig.hxx>
23
24class RooArgSet;
25
26class RooNameSet : public TObject, public RooPrintable {
27public:
28
29 // Constructors, assignment etc.
30 RooNameSet();
31 RooNameSet(const RooArgSet& argSet);
32 RooNameSet(const RooNameSet& other) ;
33 virtual TObject* Clone(const char*) const { return new RooNameSet(*this) ; }
34 virtual ~RooNameSet() ;
35
36 void refill(const RooArgSet& argSet) ;
37 RooArgSet* select(const RooArgSet& list) const ;
38 Bool_t operator==(const RooNameSet& other) const;
40 Bool_t operator<(const RooNameSet& other) const ;
41
42 virtual void printName(std::ostream& os) const ;
43 virtual void printTitle(std::ostream& os) const ;
44 virtual void printClassName(std::ostream& os) const ;
45 virtual void printValue(std::ostream& os) const ;
46
47 inline virtual void Print(Option_t *options= 0) const {
49 }
50
51 void setNameList(const char* givenList) ;
52 const char* content() const { return _nameList ? _nameList : ""; }
53
54private:
56 char* _nameList ; //[_len]
57
58protected:
59
60 void extendBuffer(Int_t inc) ;
61 static void strdup(Int_t& dstlen, char* &dstbuf, const char* str);
62
63 ClassDef(RooNameSet,1) // A sterile version of RooArgSet, containing only the names of the contained RooAbsArgs
64} R__SUGGEST_ALTERNATIVE("Please use RooHelpers::getColonSeparatedNameString() and RooHelpers::selectFromArgSet().");
65
66#endif
#define R__SUGGEST_ALTERNATIVE(ALTERNATIVE)
Definition RConfig.hxx:524
const char Option_t
Definition RtypesCore.h:66
#define ClassDef(name, id)
Definition Rtypes.h:325
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition RooArgSet.h:35
RooNameSet is a utility class that stores the names the objects in a RooArget.
Definition RooNameSet.h:26
virtual void printValue(std::ostream &os) const
Print value of nameset, i.e the list of names.
RooArgSet * select(const RooArgSet &list) const
Construct a RooArgSet of objects in input 'list' whose names match to those in the internal name list...
static void strdup(Int_t &dstlen, char *&dstbuf, const char *str)
copy src to dst, keep dstlen up to date, make sure zero length strings do not take memory
virtual TObject * Clone(const char *) const
Make a clone of an object using the Streamer facility.
Definition RooNameSet.h:33
virtual void printTitle(std::ostream &os) const
Print title of nameset.
Bool_t operator<(const RooNameSet &other) const
void setNameList(const char *givenList)
void refill(const RooArgSet &argSet)
Refill internal contents from names in given argSet.
virtual void printName(std::ostream &os) const
Print name of nameset.
RooNameSet()
Default constructor.
const char * content() const
Definition RooNameSet.h:52
void extendBuffer(Int_t inc)
virtual void printClassName(std::ostream &os) const
Print class name of nameset.
Int_t _len
Definition RooNameSet.h:55
virtual void Print(Option_t *options=0) const
This method must be overridden when a class wants to print itself.
Definition RooNameSet.h:47
char * _nameList
Definition RooNameSet.h:56
RooNameSet & operator=(const RooNameSet &)
Assignment operator.
Bool_t operator==(const RooNameSet &other) const
Comparison operator.
virtual ~RooNameSet()
Destructor.
RooPlotable is a 'mix-in' base class that define the standard RooFit plotting and printing methods.
virtual StyleOption defaultPrintStyle(Option_t *opt) const
virtual Int_t defaultPrintContents(Option_t *opt) const
Default choice of contents to be printed (name and value)
static std::ostream & defaultPrintStream(std::ostream *os=0)
Return a reference to the current default stream to use in Print().
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,...
Mother of all ROOT objects.
Definition TObject.h:41