72#if (__GNUC__==3&&__GNUC_MINOR__==2&&__GNUC_PATCHLEVEL__==3)
80#ifndef USEMEMPOOLFORARGSET
86RooArgSet::MemPool* RooArgSet::memPool() {
88 static auto * memPool =
new RooArgSet::MemPool();
97 auto pool = memPool();
98 memPool()->teardown();
113void* RooArgSet::operator
new (
size_t bytes)
117 return ::operator
new(
bytes);
120 return memPool()->allocate(
bytes);
129void* RooArgSet::operator
new (
size_t bytes,
void* ptr)
noexcept
131 return ::operator
new (
bytes, ptr);
138void RooArgSet::operator
delete (
void* ptr)
141 if (memPool()->deallocate(ptr))
145 ::operator
delete(ptr);
184 if (var1 && !collection.
contains(*var1)) {
187 add(collection,
true) ;
222 while((obj=iter->
Next())) {
225 <<
" is not a RooAbsArg, ignored" << endl ;
272 throw std::invalid_argument((
TString(
"No element named '") +
name +
"' in set " +
GetName()).Data());
290 coutE(
InputArguments) <<
"RooArgSet::checkForDup: ERROR argument with name " << var.
GetName() <<
" is already in this set" << endl;
311 ofstream ofs(fileName) ;
327 ifstream ifs(fileName) ;
353 if (section && section[0] !=
'\0')
354 os <<
'[' << section <<
']' <<
'\n';
357 for (
const auto next :
_list) {
358 next->writeToStream(os,
true);
363 for (
const auto next :
_list) {
364 os << next->GetName() <<
" = " ;
365 next->writeToStream(os,
false) ;
429 bool anyCondTrue[100] ;
430 bool condStack[100] ;
431 bool lastLineWasElse=false ;
432 Int_t condStackLevel=0 ;
437 if (section) sectionHdr.
Append(section) ;
439 bool inSection(section?
false:
true) ;
441 bool reprocessToken = false ;
444 if (is.eof() || is.fail() || parser.
atEOF()) {
449 if (!reprocessToken) {
452 reprocessToken = false ;
461 if (parser.
atEOL()) {
463 <<
"): no filename found after include statement" << endl ;
479 if (*token.
Data()==
'[') {
481 const char* last = token.
Data() + token.
Length() -1 ;
506 if (!form.
ok())
return true ;
509 bool status = form.
eval()?
true:false ;
510 if (lastLineWasElse) {
511 anyCondTrue[condStackLevel] |= status ;
512 lastLineWasElse=false ;
515 anyCondTrue[condStackLevel] = status ;
517 condStack[condStackLevel] = status ;
520 <<
"): conditional expression " << expr <<
" = "
521 << (condStack[condStackLevel]?
"true":
"false") << endl ;
527 if (condStackLevel==0) {
531 if (parser.
atEOL()) {
533 condStack[condStackLevel] = !anyCondTrue[condStackLevel] ;
543 if (anyCondTrue[condStackLevel]) {
545 condStack[condStackLevel] = false ;
550 reprocessToken = true ;
551 lastLineWasElse=true ;
560 if (condStackLevel==0) {
571 if (condStack[condStackLevel]) {
595 <<
"): missing '=' sign: " << arg << endl ;
599 if (!argRet && flagReadAtt) arg->
setAttribute(flagReadAtt,
true) ;
604 << token <<
" not in list, ignored" << endl ;
614 if (condStackLevel!=0) {
626 strlcpy(buf,rangeSpec,1024) ;
627 char* token = strtok(buf,
",") ;
651 token = strtok(0,
",") ;
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char filename
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t bytes
TString operator+(const TString &s1, const TString &s2)
Use the special concatenation constructor.
RooAbsArg is the common abstract base class for objects that represent a value and a "shape" in RooFi...
virtual bool readFromStream(std::istream &is, bool compact, bool verbose=false)=0
bool getAttribute(const Text_t *name) const
Check if a named attribute is set. By default, all attributes are unset.
void setAttribute(const Text_t *name, bool value=true)
Set (default) or clear a named boolean attribute of this object.
RooAbsCollection is an abstract container object that can hold multiple RooAbsArg objects.
bool contains(const RooAbsArg &var) const
Check if collection contains an argument with the same name as var.
const char * GetName() const override
Returns name of object.
virtual bool add(const RooAbsArg &var, bool silent=false)
Add the specified argument to list.
Storage_t _list
Actual object storage.
TIterator * createIterator(bool 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...
bool inRange(const char *name) const override
Check if current value is inside range with given name.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
bool isInRange(const char *rangeSpec)
bool checkForDup(const RooAbsArg &arg, bool silent) const
Check if element with var's name is already in set.
RooArgSet()
Default constructor.
~RooArgSet() override
Destructor.
virtual void writeToStream(std::ostream &os, bool compact, const char *section=0) const
Write the contents of the argset in ASCII form to given stream.
void writeToFile(const char *fileName) const
Write contents of the argset to specified file.
virtual bool readFromStream(std::istream &is, bool compact, bool verbose=false)
Shortcut for readFromStream(std::istream&, bool, const char*, const char*, bool), setting flagReadAtt...
void processArg(const RooAbsArg &arg)
bool readFromFile(const char *fileName, const char *flagReadAtt=0, const char *section=0, bool verbose=false)
Read contents of the argset from specified file.
RooAbsArg & operator[](const TString &str) const
Get reference to an element using its name.
static void activate()
Install atexit handler that calls CleanupRooFitAtExit() on program termination.
void setPunctuation(const TString &punct)
Change list of characters interpreted as punctuation.
bool expectToken(const TString &expected, bool zapOnError=false)
Read the next token and return true if it is identical to the given 'expected' token.
bool atEOL()
If true, parser is at end of line in stream.
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...
void zapToEnd(bool inclContLines=false)
Eat all characters up to and including then end of the current line.
Collection abstract base class.
virtual TIterator * MakeIterator(Bool_t dir=kIterForward) const =0
Iterator abstract base class.
virtual TObject * Next()=0
const char * GetName() const override
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)
RooConstVar & RooConst(double val)