Dear All,
I have a specific question, on how to get the pointer to a class member which is static, based on its name (class dictionary is built).
For members which are NOT static, the following code works:
TClass C = ev.IsA();
TDataMember dm = C->GetDataMember(NAME);
if(typeName==“UInt_t”) {
UInt_t pVar = (UInt_t)((Long_t)&ev + dm->GetOffset());
}
For static members the offset is zero. However, they are in the list of datamembers:
C->BuildRealData();
TIter next(C->GetListOfRealData());
TRealData rdm;
Int_t offset = 0;
while ((rdm = (TRealData)next())) { std::cout << rdm->GetName() << std::endl; }
Is there any other way how I can get to the pointer of the static members?
Thanks,
Oldrich