Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
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 "TString.h"
20 #include "TObject.h"
21 #include "RooPrintable.h"
22 class RooArgSet ;
23 
24 class RooNameSet : public TObject, public RooPrintable {
25 public:
26 
27  // Constructors, assignment etc.
28  RooNameSet();
29  RooNameSet(const RooArgSet& argSet);
30  RooNameSet(const RooNameSet& other) ;
31  virtual TObject* Clone(const char*) const { return new RooNameSet(*this) ; }
32  virtual ~RooNameSet() ;
33 
34  void refill(const RooArgSet& argSet) ;
35  RooArgSet* select(const RooArgSet& list) const ;
36  Bool_t operator==(const RooNameSet& other) const;
37  RooNameSet& operator=(const RooNameSet&) ;
38  Bool_t operator<(const RooNameSet& other) const ;
39 
40  virtual void printName(std::ostream& os) const ;
41  virtual void printTitle(std::ostream& os) const ;
42  virtual void printClassName(std::ostream& os) const ;
43  virtual void printValue(std::ostream& os) const ;
44 
45  inline virtual void Print(Option_t *options= 0) const {
46  printStream(defaultPrintStream(),defaultPrintContents(options),defaultPrintStyle(options));
47  }
48 
49  void setNameList(const char* givenList) ;
50  const char* content() const { return _nameList ? _nameList : ""; }
51 
52 private:
53  Int_t _len ;
54  char* _nameList ; //[_len]
55 
56 protected:
57 
58  void extendBuffer(Int_t inc) ;
59  static void strdup(Int_t& dstlen, char* &dstbuf, const char* str);
60 
61  ClassDef(RooNameSet,1) // A sterile version of RooArgSet, containing only the names of the contained RooAbsArgs
62 };
63 
64 #endif