// Class RooSharedPropertiesList maintains the properties of RooRealVars
// and RooCategories that are clones of each other.
// END_HTML
#include "RooFit.h"
#include "RooSharedPropertiesList.h"
#include "RooSharedProperties.h"
#include "TIterator.h"
#include "RooMsgService.h"
#include "Riostream.h"
using std::cout ;
using std::endl ;
ClassImp(RooSharedPropertiesList)
;
RooSharedPropertiesList::RooSharedPropertiesList()
{
}
RooSharedPropertiesList::~RooSharedPropertiesList()
{
TIterator* iter = _propList.MakeIterator() ;
RooSharedProperties* prop ;
while((prop=(RooSharedProperties*)iter->Next())) {
delete prop ;
}
delete iter ;
}
RooSharedProperties* RooSharedPropertiesList::registerProperties(RooSharedProperties* prop, Bool_t canDeleteIncoming)
{
if (prop==0) {
oocoutE((TObject*)0,InputArguments) << "RooSharedPropertiesList::ERROR null pointer!:" << endl ;
return 0 ;
}
TIterator* iter = _propList.MakeIterator() ;
RooSharedProperties* tmp ;
while((tmp=(RooSharedProperties*)iter->Next())) {
if (*tmp==*prop && tmp != prop) {
if (_propList.FindObject(prop)) {
} else {
if (canDeleteIncoming) delete prop ;
}
_propList.Add(tmp) ;
delete iter ;
return tmp ;
}
}
delete iter ;
_propList.Add(prop) ;
return prop ;
}
void RooSharedPropertiesList::unregisterProperties(RooSharedProperties* prop)
{
_propList.Remove(prop) ;
if (_propList.refCount(prop)==0) {
delete prop ;
}
}
RooSharedPropertiesList.cxx:1 RooSharedPropertiesList.cxx:2 RooSharedPropertiesList.cxx:3 RooSharedPropertiesList.cxx:4 RooSharedPropertiesList.cxx:5 RooSharedPropertiesList.cxx:6 RooSharedPropertiesList.cxx:7 RooSharedPropertiesList.cxx:8 RooSharedPropertiesList.cxx:9 RooSharedPropertiesList.cxx:10 RooSharedPropertiesList.cxx:11 RooSharedPropertiesList.cxx:12 RooSharedPropertiesList.cxx:13 RooSharedPropertiesList.cxx:14 RooSharedPropertiesList.cxx:15 RooSharedPropertiesList.cxx:16 RooSharedPropertiesList.cxx:17 RooSharedPropertiesList.cxx:18 RooSharedPropertiesList.cxx:19 RooSharedPropertiesList.cxx:20 RooSharedPropertiesList.cxx:21 RooSharedPropertiesList.cxx:22 RooSharedPropertiesList.cxx:23 RooSharedPropertiesList.cxx:24 RooSharedPropertiesList.cxx:25 RooSharedPropertiesList.cxx:26 RooSharedPropertiesList.cxx:27 RooSharedPropertiesList.cxx:28 RooSharedPropertiesList.cxx:29 RooSharedPropertiesList.cxx:30 RooSharedPropertiesList.cxx:31 RooSharedPropertiesList.cxx:32 RooSharedPropertiesList.cxx:33 RooSharedPropertiesList.cxx:34 RooSharedPropertiesList.cxx:35 RooSharedPropertiesList.cxx:36 RooSharedPropertiesList.cxx:37 RooSharedPropertiesList.cxx:38 RooSharedPropertiesList.cxx:39 RooSharedPropertiesList.cxx:40 RooSharedPropertiesList.cxx:41 RooSharedPropertiesList.cxx:42 RooSharedPropertiesList.cxx:43 RooSharedPropertiesList.cxx:44 RooSharedPropertiesList.cxx:45 RooSharedPropertiesList.cxx:46 RooSharedPropertiesList.cxx:47 RooSharedPropertiesList.cxx:48 RooSharedPropertiesList.cxx:49 RooSharedPropertiesList.cxx:50 RooSharedPropertiesList.cxx:51 RooSharedPropertiesList.cxx:52 RooSharedPropertiesList.cxx:53 RooSharedPropertiesList.cxx:54 RooSharedPropertiesList.cxx:55 RooSharedPropertiesList.cxx:56 RooSharedPropertiesList.cxx:57 RooSharedPropertiesList.cxx:58 RooSharedPropertiesList.cxx:59 RooSharedPropertiesList.cxx:60 RooSharedPropertiesList.cxx:61 RooSharedPropertiesList.cxx:62 RooSharedPropertiesList.cxx:63 RooSharedPropertiesList.cxx:64 RooSharedPropertiesList.cxx:65 RooSharedPropertiesList.cxx:66 RooSharedPropertiesList.cxx:67 RooSharedPropertiesList.cxx:68 RooSharedPropertiesList.cxx:69 RooSharedPropertiesList.cxx:70 RooSharedPropertiesList.cxx:71 RooSharedPropertiesList.cxx:72 RooSharedPropertiesList.cxx:73 RooSharedPropertiesList.cxx:74 RooSharedPropertiesList.cxx:75 RooSharedPropertiesList.cxx:76 RooSharedPropertiesList.cxx:77 RooSharedPropertiesList.cxx:78 RooSharedPropertiesList.cxx:79 RooSharedPropertiesList.cxx:80 RooSharedPropertiesList.cxx:81 RooSharedPropertiesList.cxx:82 RooSharedPropertiesList.cxx:83 RooSharedPropertiesList.cxx:84 RooSharedPropertiesList.cxx:85 RooSharedPropertiesList.cxx:86 RooSharedPropertiesList.cxx:87 RooSharedPropertiesList.cxx:88 RooSharedPropertiesList.cxx:89 RooSharedPropertiesList.cxx:90 RooSharedPropertiesList.cxx:91 RooSharedPropertiesList.cxx:92 RooSharedPropertiesList.cxx:93 RooSharedPropertiesList.cxx:94 RooSharedPropertiesList.cxx:95 RooSharedPropertiesList.cxx:96 RooSharedPropertiesList.cxx:97 RooSharedPropertiesList.cxx:98 RooSharedPropertiesList.cxx:99 RooSharedPropertiesList.cxx:100 RooSharedPropertiesList.cxx:101 RooSharedPropertiesList.cxx:102 RooSharedPropertiesList.cxx:103 RooSharedPropertiesList.cxx:104 RooSharedPropertiesList.cxx:105 RooSharedPropertiesList.cxx:106 RooSharedPropertiesList.cxx:107 RooSharedPropertiesList.cxx:108 RooSharedPropertiesList.cxx:109 RooSharedPropertiesList.cxx:110 RooSharedPropertiesList.cxx:111 RooSharedPropertiesList.cxx:112 RooSharedPropertiesList.cxx:113 RooSharedPropertiesList.cxx:114 RooSharedPropertiesList.cxx:115 RooSharedPropertiesList.cxx:116 RooSharedPropertiesList.cxx:117 RooSharedPropertiesList.cxx:118 RooSharedPropertiesList.cxx:119 RooSharedPropertiesList.cxx:120 RooSharedPropertiesList.cxx:121 RooSharedPropertiesList.cxx:122 RooSharedPropertiesList.cxx:123 RooSharedPropertiesList.cxx:124 RooSharedPropertiesList.cxx:125 RooSharedPropertiesList.cxx:126 RooSharedPropertiesList.cxx:127 RooSharedPropertiesList.cxx:128 RooSharedPropertiesList.cxx:129 RooSharedPropertiesList.cxx:130 RooSharedPropertiesList.cxx:131 RooSharedPropertiesList.cxx:132