62#if (__GNUC__==3&&__GNUC_MINOR__==2&&__GNUC_PATCHLEVEL__==3)
70#ifndef USEMEMPOOLFORARGSET
103void* RooArgSet::operator
new (
size_t bytes)
108 return memPool()->allocate(bytes);
117void* RooArgSet::operator
new (
size_t bytes,
void* ptr)
noexcept
119 return ::operator
new (bytes, ptr);
126void RooArgSet::operator
delete (
void* ptr)
129 if (memPool()->deallocate(ptr))
132 std::cerr << __func__ <<
" " << ptr <<
" is not in any of the pools." << std::endl;
135 ::operator
delete(ptr);
174 if (var1 && !list.
contains(*var1)) {
350 while((obj=iter->
Next())) {
353 <<
" is not a RooAbsArg, ignored" << endl ;
457 coutE(
InputArguments) <<
"RooArgSet::checkForDup: ERROR argument with name " << var.
GetName() <<
" is already in this set" << endl;
478 ofstream ofs(fileName) ;
494 ifstream ifs(fileName) ;
520 if (section && section[0] !=
'\0')
521 os <<
'[' << section <<
']' <<
'\n';
524 for (
const auto next :
_list) {
525 next->writeToStream(os,
true);
530 for (
const auto next :
_list) {
531 os << next->GetName() <<
" = " ;
532 next->writeToStream(os,
kFALSE) ;
599 Int_t condStackLevel=0 ;
604 if (section) sectionHdr.
Append(section) ;
611 if (is.eof() || is.fail() || parser.
atEOF()) {
616 if (!reprocessToken) {
628 if (parser.
atEOL()) {
630 <<
"): no filename found after include statement" << endl ;
634 ifstream incfs(filename) ;
640 << filename << endl ;
646 if (*token.
Data()==
'[') {
648 const char* last = token.
Data() + token.
Length() -1 ;
677 if (lastLineWasElse) {
678 anyCondTrue[condStackLevel] |= status ;
682 anyCondTrue[condStackLevel] = status ;
684 condStack[condStackLevel] = status ;
687 <<
"): conditional expression " << expr <<
" = "
688 << (condStack[condStackLevel]?
"true":
"false") << endl ;
694 if (condStackLevel==0) {
698 if (parser.
atEOL()) {
700 condStack[condStackLevel] = !anyCondTrue[condStackLevel] ;
710 if (anyCondTrue[condStackLevel]) {
712 condStack[condStackLevel] =
kFALSE ;
717 reprocessToken =
kTRUE ;
718 lastLineWasElse=
kTRUE ;
727 if (condStackLevel==0) {
738 if (condStack[condStackLevel]) {
762 <<
"): missing '=' sign: " << arg << endl ;
771 << token <<
" not in list, ignored" << endl ;
781 if (condStackLevel!=0) {
793 strlcpy(buf,rangeSpec,1024) ;
794 char* token = strtok(buf,
",") ;
818 token = strtok(0,
",") ;
TString operator+(const TString &s1, const TString &s2)
Use the special concatenation constructor.
Memory pool for RooArgSet and RooDataSet.
void teardown()
Set pool to teardown mode (at program end).
RooAbsArg is the common abstract base class for objects that represent a value (of arbitrary type) an...
virtual Bool_t readFromStream(std::istream &is, Bool_t compact, Bool_t verbose=kFALSE)=0
void setAttribute(const Text_t *name, Bool_t value=kTRUE)
Set (default) or clear a named boolean attribute of this object.
Bool_t getAttribute(const Text_t *name) const
Check if a named attribute is set. By default, all attributes are unset.
RooAbsCollection is an abstract container object that can hold multiple RooAbsArg objects.
Bool_t contains(const RooAbsArg &var) const
Check if collection contains an argument with the same name as var.
virtual Bool_t addOwned(RooAbsArg &var, Bool_t silent=kFALSE)
Add the specified argument to list.
virtual RooAbsArg * addClone(const RooAbsArg &var, Bool_t silent=kFALSE)
Add a clone of the specified argument to list.
virtual Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE)
Add the specified argument to list.
const char * GetName() const
Returns name of object.
TIterator * createIterator(Bool_t dir=kIterForward) const
TIterator-style iteration over contained elements.
RooAbsArg * find(const char *name) const
Find object with given name in list.
RooAbsRealLValue is the common abstract base class for objects that represent a real value that may a...
virtual Bool_t inRange(const char *name) const
Check if current value is inside range with given name.
RooArgList is a container object that can hold multiple RooAbsArg objects.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
RooAbsArg & operator[](const char *name) const
Array operator.
RooArgSet()
Default constructor.
virtual Bool_t readFromStream(std::istream &is, Bool_t compact, Bool_t verbose=kFALSE)
Shortcut for readFromStream(std::istream&, Bool_t, const char*, const char*, Bool_t),...
virtual Bool_t addOwned(const RooAbsCollection &col, Bool_t silent=kFALSE)
Add a collection of arguments to this collection by calling addOwned() for each element in the source...
virtual ~RooArgSet()
Destructor.
Bool_t readFromFile(const char *fileName, const char *flagReadAtt=0, const char *section=0, Bool_t verbose=kFALSE)
Read contents of the argset from specified file.
Bool_t isInRange(const char *rangeSpec)
void writeToFile(const char *fileName) const
Write contents of the argset to specified file.
static MemPool * memPool()
virtual void writeToStream(std::ostream &os, Bool_t compact, const char *section=0) const
Write the contents of the argset in ASCII form to given stream.
MemPoolForRooSets< RooArgSet, 10 *600 > MemPool
virtual Bool_t add(const RooAbsCollection &col, Bool_t silent=kFALSE)
Add a collection of arguments to this collection by calling add() for each element in the source coll...
Bool_t checkForDup(const RooAbsArg &arg, Bool_t silent) const
Check if element with var's name is already in set.
virtual void addClone(const RooAbsCollection &col, Bool_t silent=kFALSE)
Add a collection of arguments to this collection by calling addOwned() for each element in the source...
static void activate()
Install atexit handler that calls CleanupRooFitAtExit() on program termination.
Bool_t atEOL()
If true, parser is at end of line in stream.
void setPunctuation(const TString &punct)
Change list of characters interpreted as punctuation.
void zapToEnd(Bool_t inclContLines=kFALSE)
Eat all characters up to and including then end of the current line.
Bool_t expectToken(const TString &expected, Bool_t zapOnError=kFALSE)
Read the next token and return kTRUE if it is identical to the given 'expected' token.
TString readLine()
Read an entire line from the stream and return as TString This method recognizes the use of '\' in th...
TString readToken()
Read one token separated by any of the know punctuation characters This function recognizes and handl...
Collection abstract base class.
virtual TIterator * MakeIterator(Bool_t dir=kIterForward) const =0
Iterator abstract base class.
virtual TObject * Next()=0
virtual const char * GetName() const
Returns name of object.
Mother of all ROOT objects.
virtual const char * GetName() const
Returns name of object.
int CompareTo(const char *cs, ECaseCompare cmp=kExact) const
Compare a string to char *cs2.
const char * Data() const
TString & Append(const char *cs)