60#define INSTANTIATE_READVAL(CLASS) \
61 template Double_t CLASS::ReadValueImpl<Double_t>(char*, Int_t); \
62 template Long64_t CLASS::ReadValueImpl<Long64_t>(char*, Int_t); \
63 template LongDouble_t CLASS::ReadValueImpl<LongDouble_t>(char*, Int_t)
66#define INSTANTIATE_GETVAL(CLASS) \
67 template Double_t CLASS::GetValueImpl<Double_t>(TLeaf*, Int_t); \
68 template Long64_t CLASS::GetValueImpl<Long64_t>(TLeaf*, Int_t); \
69 template LongDouble_t CLASS::GetValueImpl<LongDouble_t>(TLeaf*, Int_t)
201 offset = info->TStreamerInfo::GetElementOffset(
id);
203 char* address =
nullptr;
211 char* thisobj =
nullptr;
219 type = info->TStreamerInfo::GetElement(
id)->
GetNewType();
227 Error(
"GetValuePointer",
"Type (%d) not yet supported\n", type);
245 thisobj = address + offset + (index *
fClass->Size());
258 thisobj = address + offset;
295 thisobj = address + offset;
300 thisobj = *((
char**) (address + offset));
527 char * work =
new char[nchname+2];
528 for (i=0, current = &(work[0]),
fOffset=0; i<nchname+1;i++ ) {
559 current = &(work[0]);
579 return fNext->ReadCounterValue(where);
593 return fNext->ReadCounterValue(next);
605 char *thisobj =
nullptr;
607 thisobj = (
char*)((
TLeafObject*)leaf)->GetObject();
611 if (!thisobj)
return nullptr;
643 if (
fElement==
nullptr || thisobj==
nullptr)
return thisobj;
698#define GET_ARRAY(TYPE_t) \
700 Int_t len, sub_instance, index; \
701 if (fNext) len = fNext->GetArrayLength(); \
704 index = instance / len; \
705 sub_instance = instance % len; \
710 TYPE_t **val = (TYPE_t**)(thisobj+fOffset); \
711 return &((val[sub_instance])[index]); \
732 {
char **stringp = (
char**)(thisobj+
fOffset);
return *stringp;}
768 loc += index*
fElement->GetClassPointer()->Size();
782 default:
return nullptr;
793 char *thisobj =
nullptr;
795 thisobj = (
char*)((
TLeafObject*)leaf)->GetObject();
799 if (thisobj==
nullptr)
return 0;
813 Error(
"ReadValue",
"Invalid data address: result will be wrong");
817 char *nextobj = thisobj+
fOffset;
832 nextobj += index*
fElement->GetClassPointer()->Size();
834 return fNext->ReadTypedValue<T>(nextobj,sub_instance);
886#if defined(_MSC_VER) && (_MSC_VER <= 1200)
894#define READ_ARRAY(TYPE_t) \
896 Int_t len, sub_instance, index; \
897 len = GetArrayLength(); \
899 index = instance / len; \
900 sub_instance = instance % len; \
905 TYPE_t **val =(TYPE_t**)(thisobj+fOffset); \
906 return T((val[sub_instance])[index]); \
924#if defined(_MSC_VER) && (_MSC_VER <= 1200)
945 from->GetInfo()->GetElement(from->GetID()))
962 Error(
"ReadValue",
"Should not be used in a TFormLeafInfoDirect");
1105 return &gFakeClonesElem;
1200template <
typename T>
1203 if (
fNext==
nullptr)
return 0;
1204 Int_t len,index,sub_instance;
1205 len =
fNext->GetArrayLength();
1214 if (!clones)
return 0;
1218 return fNext->ReadTypedValue<T>(obj,sub_instance);
1254template <
typename T>
1257 if (
fNext==
nullptr)
return 0;
1258 Int_t len,index,sub_instance;
1259 len = (
fNext->fElement==
nullptr)? 0 :
fNext->GetArrayLength();
1264 }
else if (primary>=0) {
1272 if (clones==
nullptr)
return 0;
1277 return fNext->ReadTypedValue<T>(obj,sub_instance);
1286 if (
fNext && clones) {
1288 Int_t len,index,sub_instance;
1289 len = (
fNext->fElement==
nullptr)? 0 :
fNext->GetArrayLength();
1311 Int_t len,index,sub_instance;
1312 len = (
fNext->fElement==
nullptr)? 0 :
fNext->GetArrayLength();
1414template <
typename T>
1419 if (
fNext==
nullptr)
return 0;
1468 }
else if (classptr) {
1475 fCollProxy = fCollClass->GetCollectionProxy()->Generate();
1476 fCollClassName = fCollClass->GetName();
1502 if (elementclassptr) {
1504 }
else if (motherclassptr) {
1511 fCollProxy = fCollClass->GetCollectionProxy()->Generate();
1512 fCollClassName = fCollClass->GetName();
1588 bool changed =
false;
1619 if (ptr==
nullptr)
return 0;
1631 if (where==
nullptr)
return 0;
1647 if (ptr==
nullptr)
return 0;
1656template <
typename T>
1659 if (
fNext==
nullptr)
return 0;
1660 UInt_t len,index,sub_instance;
1661 len = (
fNext->fElement==
nullptr)? 0 :
fNext->GetArrayLength();
1666 }
else if (primary>=0) {
1682 if (
fCollProxy->HasPointers()) obj = *(
char**)obj;
1683 return fNext->ReadTypedValue<T>(obj,sub_instance);
1719template <
typename T>
1722 if (
fNext==
nullptr)
return 0;
1723 Int_t len,index,sub_instance;
1724 len = (
fNext->fElement==
nullptr)? 0 :
fNext->GetArrayLength();
1729 }
else if (primary>=0) {
1744 if (obj==
nullptr)
return 0;
1745 if (
fCollProxy->HasPointers()) obj = *(
char**)obj;
1746 if (obj==
nullptr)
return 0;
1747 return fNext->ReadTypedValue<T>(obj,sub_instance);
1761 Int_t len,index,sub_instance;
1762 if (
fNext->fElement &&
1764 len =
fNext->GetArrayLength();
1777 if (
fCollProxy->HasPointers()) obj = *(
char**)obj;
1778 return fNext->GetValuePointer(obj,sub_instance);
1790 void *collection = where;
1794 Int_t len,index,sub_instance;
1795 len = (
fNext->fElement==
nullptr)? 0 :
fNext->GetArrayLength();
1805 if (
fCollProxy->HasPointers()) obj = *(
char**)obj;
1806 return fNext->GetValuePointer(obj,sub_instance);
1825 fCollProxy = fCollClass->GetCollectionProxy()->Generate();
1826 fCollClassName = fCollClass->GetName();
1841 fCollProxy = fCollClass->GetCollectionProxy()->Generate();
1842 fCollClassName = fCollClass->GetName();
1909 bool changed =
false;
1927 Error(
"GetValuePointer",
"This should never be called");
1936 Error(
"GetValuePointer",
"This should never be called");
1945 Error(
"GetLocalValuePointer",
"This should never be called");
1954 Error(
"GetLocalValuePointer",
"This should never be called");
1964 if (where==
nullptr)
return 0;
1996template <
typename T>
1999 if (!
fNext)
return 0;
2000 char * whereoffset = where+
fOffset;
2009 return obj && *obj ?
fNext->ReadTypedValue<T>((
char*)*obj,
instance) : 0; }
2027 Int_t len, index, sub_instance;
2039 whereoffset += index*
fElement->GetClassPointer()->Size();
2042 return fNext->ReadTypedValue<T>((
char*)obj,sub_instance);
2064template <
typename T>
2067 if (!
fNext)
return 0;
2069 if (where==
nullptr)
return 0;
2094 const char* rtype =
fMethod->GetMethod()->GetReturnTypeName();
2096 if (rtype[strlen(rtype)-1]!=
'*' &&
2097 rtype[strlen(rtype)-1]!=
'&' &&
2125 fMethod = new TMethodCall();
2126 fMethod->Init(orig.fMethod->GetMethod());
2192 std::string return_type;
2208 return_type =
gInterpreter->TypeName(return_type.c_str());
2210 if (return_type ==
"void")
2236 }
else return false;
2279 void *thisobj = from;
2280 if (!thisobj)
return nullptr;
2302 char *returntext =
nullptr;
2303 fMethod->Execute(thisobj,&returntext);
2308 char * char_result =
nullptr;
2315 fMethod->Execute(thisobj, &char_result);
2330template <
typename T>
2333 void *thisobj = where;
2334 if (!thisobj)
return 0;
2350 char *returntext =
nullptr;
2351 fMethod->Execute(thisobj,&returntext);
2355 char * char_result =
nullptr;
2356 fMethod->Execute(thisobj, &char_result);
2359 }
else fMethod->Execute(thisobj);
2386 TStreamerBasicPointer * elem = (TStreamerBasicPointer*)element;
2388 Int_t counterOffset = 0;
2389 TStreamerElement* counter = ((TStreamerInfo*)classptr->GetStreamerInfo())->GetStreamerElement(elem->GetCountName(),counterOffset);
2390 if (!parent) return;
2391 fCounter2 = parent->DeepCopy();
2392 TFormLeafInfo ** next = &(fCounter2->fNext);
2393 while(*next != nullptr) next = &( (*next)->fNext);
2394 *next = new TFormLeafInfo(classptr,counterOffset,counter);
2396 }
else Error(
"Constructor",
"Called without a proper TStreamerElement");
2513 if (index >=
fSizes.GetSize()) {
2559 Error(
"GetValue",
"This should never be called");
2604 if (global==0 || local<global) global = local;
2605 garr->
AddAt(global,i);
2626template <
typename T>
2639 Error(
"ReadValue",
"This should never be called");
2673 while(*next !=
nullptr) next = &( (*next)->fNext);
2691 while(*next !=
nullptr) next = &( (*next)->fNext);
2709 Error(
"GetValue",
"This should never be called");
2736template <
typename T>
2783 while(*next !=
nullptr) next = &( (*next)->fNext);
2801 while(*next !=
nullptr) next = &( (*next)->fNext);
2819 Error(
"GetValue",
"This should never be called");
2849template <
typename T>
2943template <
typename T>
2946 if (!
fNext)
return 0;
3025template <
typename T>
3034template <
typename T>
static Roo_reg_AGKInteg1D instance
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
unsigned short UShort_t
Unsigned Short integer 2 bytes (unsigned short).
int Int_t
Signed integer 4 bytes (int).
long Longptr_t
Integer large enough to hold a pointer (platform-dependent).
unsigned char UChar_t
Unsigned Character 1 byte (unsigned char).
char Char_t
Character 1 byte (char).
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int).
unsigned long ULong_t
Unsigned long integer 4 bytes (unsigned long). Size depends on architecture.
long Long_t
Signed long integer 4 bytes (long). Size depends on architecture.
short Short_t
Signed Short integer 2 bytes (short).
double Double_t
Double 8 bytes.
long long Long64_t
Portable signed long integer 8 bytes.
unsigned long long ULong64_t
Portable unsigned long integer 8 bytes.
float Float_t
Float 4 bytes (float).
#define R__ASSERT(e)
Checks condition e and reports a fatal error if it's false.
#define READ_ARRAY(TYPE_t)
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
#define R__WRITE_LOCKGUARD(mutex)
Array of integers (32 bits per element).
void Set(Int_t n) override
Set size of this array to n ints.
void AddAt(Int_t c, Int_t i)
Add Int_t c at position i. Check for out of bounds.
void Copy(TArrayI &array) const
A Branch for the case of an object.
TBranchElement * GetBranchCount() const
TStreamerInfo * GetInfo() const
Get streamer info for the branch class.
TBranchElement * GetBranchCount2() const
char * GetAddress() const override
Get the branch address.
char * GetObject() const
Return a pointer to our object.
A TTree is a list of TBranches.
TObjArray * GetListOfLeaves()
TClass instances represent classes, structs and namespaces in the ROOT type system.
TVirtualStreamerInfo * GetStreamerInfo(Int_t version=0, Bool_t isTransient=kFALSE) const
returns a pointer to the TVirtualStreamerInfo object for version If the object does not exist,...
static TClass * GetClass(const char *name, Bool_t load=kTRUE, Bool_t silent=kFALSE)
Static method returning pointer to TClass of the specified class name.
const char * GetReturnTypeName() const
Get full type description of function return type, e,g.: "class TDirectory*".
A TLeaf for the general case when using the branches created via a TStreamerInfo (i....
A TLeaf for a general object derived from TObject.
A TLeaf describes individual elements of a TBranch See TBranch structure in TTree.
virtual void * GetValuePointer() const
T GetTypedValue(Int_t i=0) const
TClass * IsA() const override
TBranch * GetBranch() const
Method or function calling interface.
static const EReturnType kLong
const char * GetMethodName() const
static const EReturnType kString
static const EReturnType kOther
const char * GetParams() const
TFunction * GetMethod()
Returns the TMethod describing the method to be executed.
TInterpreter::EReturnType EReturnType
static const EReturnType kDouble
const char * GetName() const override
Returns name of object.
Int_t GetEntries() const override
Return the number of objects in array (i.e.
TObject * At(Int_t idx) const override
TObject * UncheckedAt(Int_t i) const
friend class TClonesArray
virtual const char * GetName() const
Returns name of object.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
TObject()
TObject constructor.
Describe one element (data member) to be Streamed.
virtual TClass * GetClassPointer() const
Returns a pointer to the TClass of this element and updates fClassObject.
TClass * GetClass() const
Describes a persistent version of a class.
Int_t GetNewType(Int_t id) const
A TTree represents a columnar dataset.
Int_t GetMakeClass() const
RAII helper class that ensures that PushProxy() / PopProxy() are called when entering / leaving a C++...
Defines a common interface to inspect/change the contents of an object that represents a collection.
virtual EDataType GetType() const =0
If the value type is a fundamental data type, return its type (see enumeration EDataType).
virtual TClass * GetCollectionClass() const
Return a pointer to the TClass representing the proxied container class.
@ kUChar
Equal to TDataType's kchar.
externTVirtualRWMutex * gCoreMutex
void GetNormalizedName(std::string &norm_name, std::string_view name)
Return the normalized name.