59#if (__GNUC__==3&&__GNUC_MINOR__==2&&__GNUC_PATCHLEVEL__==3)
80 template<
typename It_t>
86 for (
auto it =
first; it != last; ++it) {
132 _sizeThresholdForMapSearch(100)
147 _sizeThresholdForMapSearch(100)
165 _allRRV(other._allRRV),
166 _sizeThresholdForMapSearch(100)
173 for (
auto item : other.
_list) {
185 _list(std::move(other._list)),
186 _ownCont(other._ownCont),
187 _name(std::move(other._name)),
188 _allRRV(other._allRRV),
189 _sizeThresholdForMapSearch(other._sizeThresholdForMapSearch)
217 for (
auto item :
_list) {
246 snapName.
Append(
"Snapshot of ") ;
280 for (
auto orig :
_list) {
290 for (Storage_t::size_type i = 0; i <
output._list.size(); ++i) {
291 const auto var =
output._list[i];
292 error |=
output.addServerClonesToList(*var);
298 coutE(ObjectHandling) <<
"RooAbsCollection::snapshot(): Errors occurred in deep clone process, snapshot not created" << endl ;
307 var->redirectServers(
output,deepCopy);
330 for (
const auto server : var.
servers()) {
365 if (&other==
this) return ;
367 for (
auto elem :
_list) {
368 auto theirs = other.
find(*elem);
369 if(!theirs)
continue;
371 elem->copyCache(theirs) ;
372 elem->setAttribute(
"Constant",theirs->isConstant()) ;
387 if (&other==
this)
return *
this;
390 if (
size()==1 &&
size() == other.
size() && forceIfSizeOne) {
396 for (
auto elem :
_list) {
397 auto theirs = other.
find(*elem);
398 if(!theirs)
continue;
400 elem->copyCache(theirs,
kTRUE) ;
413 if (&other==
this) return ;
416 auto iter2 = other.
_list.begin();
417 for (
auto iter1 =
_list.begin();
418 iter1 !=
_list.end() && iter2 != other.
_list.end();
425 auto theirs =
static_cast<RooRealVar*
>(*iter2);
428 (*iter2)->syncCache() ;
429 (*iter1)->copyCache(*iter2,
kTRUE,setValDirty) ;
453 coutE(ObjectHandling) <<
ClassName() <<
"::" <<
GetName() <<
"::addOwned: can only add to an owned list" << endl;
477 bool result =
addOwned(*var.release(), silent);
479 throw std::runtime_error(std::string(
"RooAbsCollection::addOwned could not add the argument to the")
480 +
" collection! The ownership would not be well defined if we ignore this.");
500 coutE(ObjectHandling) <<
ClassName() <<
"::" <<
GetName() <<
"::addClone: can only add to an owned list" << endl;
527 coutE(ObjectHandling) <<
ClassName() <<
"::" <<
GetName() <<
"::add: cannot add to an owned list" << endl;
554 throw std::invalid_argument(
"Passing an owning RooAbsCollection by const& to"
555 " RooAbsCollection::addOwned is forbidden because the ownership"
556 " would be ambiguous! Please std::move() the RooAbsCollection in this case."
557 " Note that the passed RooAbsCollection is invalid afterwards.");
564 for (
auto item : list.
_list) {
581 if(list.isOwning()) {
582 list.releaseOwnership();
584 if(list.empty())
return false;
586 bool result =
addOwned(list, silent);
589 throw std::runtime_error(std::string(
"RooAbsCollection::addOwned could not add the argument to the")
590 +
" collection! The ownership would not be well defined if we ignore this.");
611 for (
auto item : list.
_list) {
626 coutE(ObjectHandling) <<
"RooAbsCollection: cannot replace variables in a copied list" << endl;
631 for (
const auto * arg : other.
_list) {
633 auto found =
find(*arg);
634 if (found)
replace(*found,*arg);
651 coutE(ObjectHandling) <<
"RooAbsCollection: cannot replace variables in a copied list" << endl;
657 auto var1It = std::find(
_list.begin(),
_list.end(), &var1);
659 if (var1It ==
_list.end()) {
660 coutE(ObjectHandling) <<
"RooAbsCollection: variable \"" <<
name <<
"\" is not in the list"
661 <<
" and cannot be replaced" << endl;
669 if(other != 0 && other != &var1) {
670 coutE(ObjectHandling) <<
"RooAbsCollection: cannot replace \"" <<
name
671 <<
"\" with already existing \"" << var2.
GetName() <<
"\"" << endl;
700 const auto sizeBefore =
_list.size();
702 if (matchByNameOnly) {
705 return elm->GetName() ==
name;
707 std::set<RooAbsArg*> toBeDeleted;
711 if (nameMatch(elm)) {
712 toBeDeleted.insert(elm);
719 for (
auto arg : toBeDeleted)
722 _list.erase(std::remove(_list.begin(), _list.end(), &var), _list.end());
725 if (_hashAssistedFind && sizeBefore != _list.size()) {
726 _hashAssistedFind->erase(&var);
729 return sizeBefore != _list.size();
744 auto oldSize =
_list.size();
745 std::vector<const RooAbsArg*> markedItems;
747 if (matchByNameOnly) {
751 auto nameMatchAndMark = [&list, &markedItems](
const RooAbsArg* elm) {
753 markedItems.push_back(elm);
761 std::set<const RooAbsArg*> toBeDeleted(markedItems.begin(), markedItems.end());
763 for (
auto arg : toBeDeleted) {
769 auto argMatchAndMark = [&list, &markedItems](
const RooAbsArg* elm) {
771 markedItems.push_back(elm);
781 for(
auto& var : markedItems ) {
786 return oldSize !=
_list.size();
817 for (
auto arg :
_list) {
818 arg->setAttribute(
name, value);
833 selName.
Append(
"_selection") ;
837 for (
auto arg :
_list) {
838 if (arg->getAttribute(
name)==value)
860 for (
auto arg :
_list) {
861 if (refColl.
find(*arg))
891 selName.
Append(
"_selection") ;
894 const size_t bufSize = strlen(nameList) + 1;
895 char* buf =
new char[bufSize] ;
896 strlcpy(buf,nameList,bufSize) ;
897 char* wcExpr = strtok(buf,
",") ;
901 cxcoutD(ObjectHandling) <<
"RooAbsCollection::selectByName(" <<
GetName() <<
") processing expression '" << wcExpr <<
"'" << endl ;
906 while((arg=iter.
next())) {
909 cxcoutD(ObjectHandling) <<
"RooAbsCollection::selectByName(" <<
GetName() <<
") selected element " << arg->
GetName() << endl ;
914 wcExpr = strtok(0,
",") ;
934 return left->
namePtr() == right->namePtr();
937 return std::is_permutation(
_list.begin(),
_list.end(),
938 otherColl.
_list.begin(),
946template<
class Collection_t>
947RooAbsArg* findUsingNamePointer(
const Collection_t& coll,
const TNamed* ptr) {
948 auto findByNamePtr = [ptr](
const RooAbsArg* elm) {
949 return ptr == elm->namePtr();
952 auto item = std::find_if(coll.begin(), coll.end(), findByNamePtr);
954 return item != coll.end() ? *item :
nullptr;
969 if (!nptr)
return nullptr;
979 return findUsingNamePointer(
_list, nptr);
989 const auto nptr = arg.
namePtr();
999 return findUsingNamePointer(
_list, nptr);
1006 const std::string theName(
name);
1008 return elm->GetName() == theName;
1010 return item !=
_list.end() ? item -
_list.begin() : -1;
1022 if (verbose)
coutE(InputArguments) <<
"RooAbsCollection::getRealValue(" <<
GetName() <<
") ERROR no object with name '" <<
name <<
"' found" << endl ;
1027 if (verbose)
coutE(InputArguments) <<
"RooAbsCollection::getRealValue(" <<
GetName() <<
") ERROR object '" <<
name <<
"' is not of type RooAbsReal" << endl ;
1043 if (verbose)
coutE(InputArguments) <<
"RooAbsCollection::setRealValue(" <<
GetName() <<
") ERROR no object with name '" <<
name <<
"' found" << endl ;
1048 if (verbose)
coutE(InputArguments) <<
"RooAbsCollection::setRealValue(" <<
GetName() <<
") ERROR object '" <<
name <<
"' is not of type RooAbsRealLValue" << endl ;
1065 if (verbose)
coutE(InputArguments) <<
"RooAbsCollection::getCatLabel(" <<
GetName() <<
") ERROR no object with name '" <<
name <<
"' found" << endl ;
1070 if (verbose)
coutE(InputArguments) <<
"RooAbsCollection::getCatLabel(" <<
GetName() <<
") ERROR object '" <<
name <<
"' is not of type RooAbsCategory" << endl ;
1086 if (verbose)
coutE(InputArguments) <<
"RooAbsCollection::setCatLabel(" <<
GetName() <<
") ERROR no object with name '" <<
name <<
"' found" << endl ;
1091 if (verbose)
coutE(InputArguments) <<
"RooAbsCollection::setCatLabel(" <<
GetName() <<
") ERROR object '" <<
name <<
"' is not of type RooAbsCategory" << endl ;
1108 if (verbose)
coutE(InputArguments) <<
"RooAbsCollection::getCatLabel(" <<
GetName() <<
") ERROR no object with name '" <<
name <<
"' found" << endl ;
1113 if (verbose)
coutE(InputArguments) <<
"RooAbsCollection::getCatLabel(" <<
GetName() <<
") ERROR object '" <<
name <<
"' is not of type RooAbsCategory" << endl ;
1129 if (verbose)
coutE(InputArguments) <<
"RooAbsCollection::setCatLabel(" <<
GetName() <<
") ERROR no object with name '" <<
name <<
"' found" << endl ;
1134 if (verbose)
coutE(InputArguments) <<
"RooAbsCollection::setCatLabel(" <<
GetName() <<
") ERROR object '" <<
name <<
"' is not of type RooAbsCategory" << endl ;
1151 if (verbose)
coutE(InputArguments) <<
"RooAbsCollection::getStringValue(" <<
GetName() <<
") ERROR no object with name '" <<
name <<
"' found" << endl ;
1156 if (verbose)
coutE(InputArguments) <<
"RooAbsCollection::getStringValue(" <<
GetName() <<
") ERROR object '" <<
name <<
"' is not of type RooStringVar" << endl ;
1173 if (verbose)
coutE(InputArguments) <<
"RooAbsCollection::setStringValue(" <<
GetName() <<
") ERROR no object with name '" <<
name <<
"' found" << endl ;
1178 if (verbose)
coutE(InputArguments) <<
"RooAbsCollection::setStringValue(" <<
GetName() <<
") ERROR object '" <<
name <<
"' is not of type RooStringVar" << endl ;
1191 for (
auto arg :
_list) {
1192 retVal += arg->GetName();
1196 retVal.erase(retVal.end()-1);
1228 os << IsA()->GetName() ;
1241 if (opt &&
TString(opt)==
"I") {
1244 if (opt &&
TString(opt).Contains(
"v")) {
1262 for (
auto arg :
_list) {
1268 if (arg->IsA()->InheritsFrom(RooStringVar::Class())) {
1271 os << arg->GetName();
1293 Int_t maxNameLen(1) ;
1295 if (nameFieldLengthSaved==0) {
1296 for (
auto next :
_list) {
1297 Int_t len = strlen(next->GetName()) ;
1298 if (len>maxNameLen) maxNameLen = len ;
1303 unsigned int idx = 0;
1304 for (
auto next :
_list) {
1305 os <<
indent << std::setw(3) << ++idx <<
") ";
1320 for (
auto arg :
_list) {
1321 cout << arg <<
" " << arg->IsA()->GetName() <<
"::" << arg->GetName() <<
" (" << arg->GetTitle() <<
")" << endl ;
1374 pc.
defineInt(
"dummy",
"FormatArgs",0,0) ;
1385 pc.
process(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8) ;
1390 const char* outFile = pc.
getString(
"outputFile") ;
1391 if (outFile && strlen(outFile)) {
1392 std::ofstream ofs(outFile) ;
1427 sibOption = option ;
1431 sibFormatCmd = *formatCmd ;
1435 static char buf[100] ;
1436 strlcpy(buf,tmp.
Data(),100) ;
1437 sibFormatCmd.
_s[0] = buf ;
1444 for(
auto * col : static_range_cast<RooAbsCollection*>(siblingList)) {
1452 for(
auto * col : static_range_cast<RooAbsCollection*>(listList)) {
1454 RooFIter iter = col->fwdIterator() ;
1456 while((arg=iter.
next())) {
1462 coutW(InputArguments) <<
"RooAbsCollection::printLatex: can only print RooRealVar in LateX, skipping non-RooRealVar object named "
1466 coutW(InputArguments) <<
"RooAbsCollection::printLatex: WARNING: naming and/or ordering of sibling list is different" << endl ;
1469 listListRRV.
Add(list) ;
1471 coutW(InputArguments) <<
"RooAbsCollection::printLatex: ERROR: sibling list(s) must have same length as self" << endl ;
1482 for (k=0 ; k<nlist ; k++) subheader +=
"c" ;
1484 TString header =
"\\begin{tabular}{" ;
1485 for (j=0 ; j<ncol ; j++) {
1486 if (j>0) header +=
"|" ;
1487 header += subheader ;
1490 ofs << header << endl ;
1494 for (i=0 ; i<nrow ; i++) {
1495 for (j=0 ; j<ncol ; j++) {
1496 for (k=0 ; k<nlist ; k++) {
1504 TString* tmp = par->
format((k==0)?*formatCmd:sibFormatCmd) ;
1509 if (!(j==ncol-1 && k==nlist-1)) {
1514 ofs <<
"\\\\" << endl ;
1517 ofs <<
"\\end{tabular}" << endl ;
1530 if (!rangeSpec)
return kTRUE ;
1533 vector<string> cutVec ;
1534 if (rangeSpec && strlen(rangeSpec)>0) {
1535 if (strchr(rangeSpec,
',')==0) {
1536 cutVec.push_back(rangeSpec) ;
1538 const size_t bufSize = strlen(rangeSpec)+1;
1539 char* buf =
new char[bufSize] ;
1540 strlcpy(buf,rangeSpec,bufSize) ;
1541 const char* oneRange = strtok(buf,
",") ;
1543 cutVec.push_back(oneRange) ;
1544 oneRange = strtok(0,
",") ;
1552 for (
auto arg :
_list) {
1555 for (icut=0 ; icut<cutVec.size() ; icut++) {
1556 if (arg->inRange(cutVec[icut].c_str())) {
1557 selectThisArg =
kTRUE ;
1561 if (!selectThisArg) {
1567 return selectByRange ;
1603 return strcmp(
l->GetName(),
r->
GetName()) > 0;
1606 std::sort(
_list.begin(),
_list.end(), cmpReverse);
1610 return strcmp(
l->GetName(),
r->
GetName()) < 0;
1623 std::unordered_set<TNamed const *> seenArgs;
1624 for (std::size_t iArg = 0; iArg <
_list.size(); ++iArg) {
1626 bool movedArg =
false;
1628 if (seenArgs.find(server->namePtr()) == seenArgs.end()) {
1629 auto found = std::find_if(
_list.begin(),
_list.end(),
1630 [server](
RooAbsArg *elem) { return elem->namePtr() == server->namePtr(); });
1631 if (found ==
_list.end()) {
1632 std::stringstream ss;
1633 ss <<
"RooAbsArg \"" << arg->
GetName() <<
"\" depends on \"" << server->GetName()
1634 <<
"\", but this arg is missing in the collection!";
1635 throw std::runtime_error(ss.str());
1647 seenArgs.insert(arg->
namePtr());
1656 ccoutE(DataHandling) <<
"The legacy RooFit collection iterators don't support reverse iterations, any more. "
1657 <<
"Use begin() and end()" << endl;
1658 return std::make_unique<LegacyIterator_t>(
_list);
1665 _list.push_back(item);
1688 for (
unsigned int i=0; i < std::min(
_list.size(), other.
size()); ++i) {
1689 if (
_list[i]->namePtr() != other.
_list[i]->namePtr())
static void indent(ostringstream &buf, int indent_level)
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...
const TNamed * namePtr() const
De-duplicated pointer to this object's name.
virtual TObject * Clone(const char *newname=0) const
Make a clone of an object using the Streamer facility.
virtual void copyCache(const RooAbsArg *source, Bool_t valueOnly=kFALSE, Bool_t setValDirty=kTRUE)=0
void setAttribute(const Text_t *name, Bool_t value=kTRUE)
Set (default) or clear a named boolean attribute of this object.
const RefCountList_t & servers() const
List of all servers of this object.
virtual void syncCache(const RooArgSet *nset=0)=0
RooAbsCategoryLValue is the common abstract base class for objects that represent a discrete value th...
virtual bool setIndex(value_type index, bool printError=true)=0
Change category state by specifying the index code of the desired state.
virtual bool setLabel(const char *label, Bool_t printError=kTRUE)=0
Change category state by specifying a state name.
RooAbsCategory is the base class for objects that represent a discrete value with a finite number of ...
virtual value_type getCurrentIndex() const
Return index number of current state.
virtual const char * getCurrentLabel() const
Return label string of current state.
RooAbsCollection is an abstract container object that can hold multiple RooAbsArg objects.
std::unique_ptr< HashAssistedFind > _hashAssistedFind
virtual void removeAll()
Remove all arguments from our set, deleting them if we own them.
void deleteList()
Delete contents of the list.
RooAbsCollection & assignValueOnly(const RooAbsCollection &other, bool forceIfSizeOne=false)
Sets the value of any argument in our set that also appears in the other set.
Bool_t setCatLabel(const char *name, const char *newVal="", Bool_t verbose=kFALSE)
Set state name of a RooAbsCategoryLValue stored in set with given name to newVal.
virtual TObject * create(const char *newname) const =0
void assignFast(const RooAbsCollection &other, bool setValDirty=true) const
Functional equivalent of assign() but assumes this and other collection have same layout.
Bool_t setCatIndex(const char *name, Int_t newVal=0, Bool_t verbose=kFALSE)
Set index value of a RooAbsCategoryLValue stored in set with given name to newVal.
Int_t getCatIndex(const char *name, Int_t defVal=0, Bool_t verbose=kFALSE) const
Get index value of a RooAbsCategory stored in set with given name.
void sortTopologically()
Sort collection topologically: the servers of any RooAbsArg will be before that RooAbsArg in the coll...
virtual bool canBeAdded(const RooAbsArg &arg, bool silent) const =0
Determine whether it's possible to add a given RooAbsArg to the collection or not.
RooAbsCollection()
Default constructor.
virtual Bool_t replace(const RooAbsArg &var1, const RooAbsArg &var2)
Replace var1 with var2 and return kTRUE for success.
const char * getCatLabel(const char *name, const char *defVal="", Bool_t verbose=kFALSE) const
Get state name of a RooAbsCategory stored in set with given name.
void sort(Bool_t reverse=false)
Sort collection using std::sort and name comparison.
Bool_t contains(const RooAbsArg &var) const
Check if collection contains an argument with the same name as var.
Bool_t addServerClonesToList(const RooAbsArg &var)
Add clones of servers of given argument to end of list.
virtual void printName(std::ostream &os) const
Return collection name.
void printLatex(const RooCmdArg &arg1=RooCmdArg(), const RooCmdArg &arg2=RooCmdArg(), const RooCmdArg &arg3=RooCmdArg(), const RooCmdArg &arg4=RooCmdArg(), const RooCmdArg &arg5=RooCmdArg(), const RooCmdArg &arg6=RooCmdArg(), const RooCmdArg &arg7=RooCmdArg(), const RooCmdArg &arg8=RooCmdArg()) const
Output content of collection as LaTex table.
RooAbsCollection * snapshot(Bool_t deepCopy=kTRUE) const
Take a snap shot of current collection contents.
virtual RooAbsArg * addClone(const RooAbsArg &var, Bool_t silent=kFALSE)
Add a clone of the specified argument to list.
Int_t index(const RooAbsArg *arg) const
Returns index of given arg, or -1 if arg is not in the collection.
RooFIter fwdIterator() const
One-time forward iterator.
virtual Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE)
Add the specified argument to list.
bool hasSameLayout(const RooAbsCollection &other) const
Check that all entries where the collections overlap have the same name.
Bool_t setStringValue(const char *name, const char *newVal="", Bool_t verbose=kFALSE)
Set string value of a RooStringVar stored in set with given name to newVal.
Double_t getRealValue(const char *name, Double_t defVal=0, Bool_t verbose=kFALSE) const
Get value of a RooAbsReal stored in set with given name.
void assign(const RooAbsCollection &other) const
Sets the value, cache and constant attribute of any argument in our set that also appears in the othe...
virtual Bool_t addOwned(RooAbsArg &var, Bool_t silent=kFALSE)
Add an argument and transfer the ownership to the collection.
virtual ~RooAbsCollection()
Destructor.
Storage_t::size_type size() const
Bool_t setRealValue(const char *name, Double_t newVal=0, Bool_t verbose=kFALSE)
Set value of a RooAbsRealLValye stored in set with given name to newVal No error messages are printed...
RooAbsArg * first() const
void reserve(Storage_t::size_type count)
RooAbsCollection * selectByName(const char *nameList, Bool_t verbose=kFALSE) const
Create a subset of the current collection, consisting only of those elements with names matching the ...
void clear()
Clear contents. If the collection is owning, it will also delete the contents.
virtual Bool_t containsInstance(const RooAbsArg &var) const
Check if this exact instance is in this collection.
Bool_t allInRange(const char *rangeSpec) const
Return true if all contained object report to have their value inside the specified range.
virtual void printMultiline(std::ostream &os, Int_t contents, Bool_t verbose=kFALSE, TString indent="") const
Implement multiline printing of collection, one line for each contained object showing the requested ...
std::unique_ptr< LegacyIterator_t > makeLegacyIterator(bool forward=true) const
Factory for legacy iterators.
std::size_t _sizeThresholdForMapSearch
void setAttribAll(const Text_t *name, Bool_t value=kTRUE)
Set given attribute in each element of the collection by calling each elements setAttribute() functio...
void dump() const
Base contents dumper for debugging purposes.
bool selectCommon(const RooAbsCollection &refColl, RooAbsCollection &outColl) const
Create a subset of the current collection, consisting only of those elements that are contained as we...
virtual void printTitle(std::ostream &os) const
Return collection title.
Bool_t equals(const RooAbsCollection &otherColl) const
Check if this and other collection have identically-named contents.
RooAbsCollection * selectByAttrib(const char *name, Bool_t value) const
Create a subset of the current collection, consisting only of those elements with the specified attri...
void useHashMapForFind(bool flag) const
const char * getStringValue(const char *name, const char *defVal="", Bool_t verbose=kFALSE) const
Get string value of a RooStringVar stored in set with given name.
const char * GetName() const
Returns name of object.
virtual void printClassName(std::ostream &os) const
Return collection class name.
std::string contentsString() const
Return comma separated list of contained object names as STL string.
void setName(const char *name)
RooAbsCollection & operator=(const RooAbsCollection &other)
Assign values from the elements in other to our elements.
virtual void RecursiveRemove(TObject *obj)
If one of the TObject we have a referenced to is deleted, remove the reference.
virtual Bool_t remove(const RooAbsArg &var, Bool_t silent=kFALSE, Bool_t matchByNameOnly=kFALSE)
Remove the specified argument from our list.
void makeTypedStructureTag()
void insert(RooAbsArg *)
Insert an element into the owned collections.
RooAbsArg * find(const char *name) const
Find object with given name in list.
virtual void printValue(std::ostream &os) const
Print value of collection, i.e.
virtual Int_t defaultPrintContents(Option_t *opt) const
Define default RooPrinable print options for given Print() flag string For inline printing only show ...
RooAbsRealLValue is the common abstract base class for objects that represent a real value that may a...
virtual void setVal(Double_t value)=0
Set the current value of the object. Needs to be overridden by implementations.
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
Double_t getVal(const RooArgSet *normalisationSet=nullptr) const
Evaluate object.
RooArgList is a container object that can hold multiple RooAbsArg objects.
RooAbsArg * at(Int_t idx) const
Return object at given index, or nullptr if index is out of range.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
RooCmdArg is a named container for two doubles, two integers two object points and three string point...
void addArg(const RooCmdArg &arg)
Utility function to add nested RooCmdArg to payload of this RooCmdArg.
Class RooCmdConfig is a configurable parser for RooCmdArg named arguments.
Bool_t defineInt(const char *name, const char *argName, Int_t intNum, Int_t defValue=0)
Define integer property name 'name' mapped to integer in slot 'intNum' in RooCmdArg with name argName...
void defineMutex(const char *argName1, const char *argName2)
Define arguments named argName1 and argName2 mutually exclusive.
Bool_t defineObject(const char *name, const char *argName, Int_t setNum, const TObject *obj=0, Bool_t isArray=kFALSE)
Define TObject property name 'name' mapped to object in slot 'setNum' in RooCmdArg with name argName ...
const char * getString(const char *name, const char *defaultValue="", Bool_t convEmptyToNull=kFALSE)
Return string property registered with name 'name'.
Int_t getInt(const char *name, Int_t defaultValue=0)
Return integer property registered with name 'name'.
const RooLinkedList & getObjectList(const char *name)
Return list of objects registered with name 'name'.
Bool_t defineString(const char *name, const char *argName, Int_t stringNum, const char *defValue="", Bool_t appendMode=kFALSE)
Define Double_t property name 'name' mapped to Double_t in slot 'stringNum' in RooCmdArg with name ar...
Bool_t ok(Bool_t verbose) const
Return true of parsing was successful.
Bool_t process(const RooCmdArg &arg)
Process given RooCmdArg.
Bool_t hasProcessed(const char *cmdName) const
Return true if RooCmdArg with name 'cmdName' has been processed.
A one-time forward iterator working on RooLinkedList or RooAbsCollection.
RooAbsArg * next()
Return next element or nullptr if at end.
RooLinkedList is an collection class for internal use, storing a collection of RooAbsArg pointers in ...
TObject * At(int index) const
Return object stored in sequential position given by index.
TObject * FindObject(const char *name) const
Return pointer to obejct with given name.
void Delete(Option_t *o=0)
Remove all elements in collection and delete all elements NB: Collection does not own elements,...
virtual void Add(TObject *arg)
RooNameReg is a registry for const char* names.
static const TNamed * known(const char *stringPtr)
If the name is already known, return its TNamed pointer. Otherwise return 0 (don't register the name)...
RooPlotable is a 'mix-in' base class that define the standard RooFit plotting and printing methods.
static void nameFieldLength(Int_t newLen)
Set length of field reserved from printing name of RooAbsArgs in multi-line collection printing to gi...
RooRealVar represents a variable that can be changed from the outside.
TString * format(const RooCmdArg &formatArg) const
Format contents of RooRealVar for pretty printing on RooPlot parameter boxes.
void copyCacheFast(const RooRealVar &other, Bool_t setValDirty=kTRUE)
std::size_t size() const
Number of contained objects (neglecting the ref count).
RooStringVar is a RooAbsArg implementing string values.
void setVal(const char *newVal)
const char * getVal() const
static void create(const TObject *obj)
Register creation of object 'obj'.
The TNamed class is the base class for all named ROOT classes.
virtual const char * GetName() const
Returns name of object.
Mother of all ROOT objects.
virtual const char * GetName() const
Returns name of object.
virtual const char * ClassName() const
Returns name of class to which the object belongs.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
virtual const char * GetTitle() const
Returns title of object.
Regular expression class.
int CompareTo(const char *cs, ECaseCompare cmp=kExact) const
Compare a string to char *cs2.
const char * Data() const
TString & ReplaceAll(const TString &s1, const TString &s2)
TString & Append(const char *cs)
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
RooCmdArg LatexTableStyle(Bool_t flag=kTRUE)
The namespace RooFit contains mostly switches that change the behaviour of functions of PDFs (or othe...
Helper for hash-map-assisted finding of elements by name.
RooAbsArg * find(const TNamed *nptr) const
std::unordered_map< const TNamed *, const RooAbsArg *const > nameToItemMap
const std::size_t & currentRooNameRegCounter
void erase(const RooAbsArg *elm)
std::size_t rooNameRegCounterWhereMapWasValid
void replace(const RooAbsArg *out, const RooAbsArg *in)
void insert(const RooAbsArg *elm)
HashAssistedFind(It_t first, It_t last)
Inititalise empty hash map for fast finding by name.
static void output(int code)