Abstract array base class.
Used by TArrayC, TArrayS, TArrayI, TArrayL, TArrayF and TArrayD. Data member is public for historical reasons.
PyROOT
When used from Python, the subclasses of TArray (TArrayC, TArrayS, TArrayI, TArrayL, TArrayF and TArrayD) benefit from the following extra features:
- Their size can be obtained with
len
, which is equivalent to TArray::GetSize(): import ROOT
a = ROOT.TArrayD(2)
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t UChar_t len
- Their elements can be read and written with the
getitem
and setitem
operators, respectively: a[0] = 0.2
a[1] = 1.7
print(a[0])
- They are iterable:
for elem in a:
print(elem)
Definition at line 31 of file TArray.h.
virtual TClass * TArray::IsA |
( |
| ) |
const |
|
inlinevirtual |
- Returns
- TClass describing current object
Reimplemented in TArrayC, TArrayD, TArrayF, TArrayI, TArrayL, TArrayL64, TArrayS, TGLTH3Composition, TH1C, TH1S, TH1I, TH1F, TH1D, TH1K, TH2C, TH2S, TH2I, TH2F, TH2D, TH3C, TH3S, TH3I, TH3F, TH3D, TProfile, TProfile2D, and TProfile3D.
Definition at line 58 of file TArray.h.