ROOT logo
/*****************************************************************************
 * Project: RooFit                                                           *
 * Package: RooFitCore                                                       *
 *    File: $Id: RooNameSet.h,v 1.16 2007/05/11 09:11:30 verkerke Exp $
 * 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)             *
 *****************************************************************************/
#ifndef ROO_NAME_SET
#define ROO_NAME_SET

#include "TString.h"
#include "TObject.h"
#include "RooPrintable.h"
class RooArgSet ;

class RooNameSet : public TObject, public RooPrintable {
public:

  // Constructors, assignment etc.
  RooNameSet();
  RooNameSet(const RooArgSet& argSet);
  RooNameSet(const RooNameSet& other) ;
  virtual TObject* Clone(const char*) const { return new RooNameSet(*this) ; }
  virtual ~RooNameSet() ;

  void refill(const RooArgSet& argSet) ;
  RooArgSet* select(const RooArgSet& list) const ;
  Bool_t operator==(const RooNameSet& other) const;  
  RooNameSet& operator=(const RooNameSet&) ;
  Bool_t operator<(const RooNameSet& other) const ;

  virtual void printName(std::ostream& os) const ;
  virtual void printTitle(std::ostream& os) const ;
  virtual void printClassName(std::ostream& os) const ;
  virtual void printValue(std::ostream& os) const ;

  inline virtual void Print(Option_t *options= 0) const {
    printStream(defaultPrintStream(),defaultPrintContents(options),defaultPrintStyle(options));
  }

  void setNameList(const char* givenList) ;
  const char* content() const { return _nameList ? _nameList : ""; }

private:
  Int_t _len ;
  char* _nameList ; //[_len]

protected:

  void extendBuffer(Int_t inc) ;
  static void strdup(Int_t& dstlen, char* &dstbuf, const char* str);

  ClassDef(RooNameSet,1) // A sterile version of RooArgSet, containing only the names of the contained RooAbsArgs
};

#endif
 RooNameSet.h:1
 RooNameSet.h:2
 RooNameSet.h:3
 RooNameSet.h:4
 RooNameSet.h:5
 RooNameSet.h:6
 RooNameSet.h:7
 RooNameSet.h:8
 RooNameSet.h:9
 RooNameSet.h:10
 RooNameSet.h:11
 RooNameSet.h:12
 RooNameSet.h:13
 RooNameSet.h:14
 RooNameSet.h:15
 RooNameSet.h:16
 RooNameSet.h:17
 RooNameSet.h:18
 RooNameSet.h:19
 RooNameSet.h:20
 RooNameSet.h:21
 RooNameSet.h:22
 RooNameSet.h:23
 RooNameSet.h:24
 RooNameSet.h:25
 RooNameSet.h:26
 RooNameSet.h:27
 RooNameSet.h:28
 RooNameSet.h:29
 RooNameSet.h:30
 RooNameSet.h:31
 RooNameSet.h:32
 RooNameSet.h:33
 RooNameSet.h:34
 RooNameSet.h:35
 RooNameSet.h:36
 RooNameSet.h:37
 RooNameSet.h:38
 RooNameSet.h:39
 RooNameSet.h:40
 RooNameSet.h:41
 RooNameSet.h:42
 RooNameSet.h:43
 RooNameSet.h:44
 RooNameSet.h:45
 RooNameSet.h:46
 RooNameSet.h:47
 RooNameSet.h:48
 RooNameSet.h:49
 RooNameSet.h:50
 RooNameSet.h:51
 RooNameSet.h:52
 RooNameSet.h:53
 RooNameSet.h:54
 RooNameSet.h:55
 RooNameSet.h:56
 RooNameSet.h:57
 RooNameSet.h:58
 RooNameSet.h:59
 RooNameSet.h:60
 RooNameSet.h:61
 RooNameSet.h:62
 RooNameSet.h:63
 RooNameSet.h:64