-
- Downloads
The array elements can be retrieved with:
TObject *obj = array.At(i); By default the TRefArray 'points' to the current process and can only receive object that have been created in this process. To point the TRefArray to a different process do: TRefArray array( processId ); For example, if 'obj' is an instance that was created in the different process and you do: TRefArray array( TProcessID::GetProcessWithUID( obj ) ); Then array.Add(obj); is correct (obj comes from the process the array is pointed to while TObject *nobj = new TObject; array.Add(nobj); is incorrect since 'nobj' was created in a different process than the one the array is pointed to. In thi case you will see error message: Error in <TRefArray::AddAtAndExpand>: The object at 0x... is not registered in the process the TRefArray point to (pid = ProcessID../....) git-svn-id: http://root.cern.ch/svn/root/trunk@23059 27541ba8-7e3a-0410-8455-c3a389f83636
Loading
Please register or sign in to comment