83 static Int_t
GetEndian() {
return gAgent->GetEndian() ; }
90 static Char_t *
New(Char_t *p, Int_t nb = 32*
KBYTE);
91 static Short_t *
New(Short_t *p, Int_t nb = 32*
KBYTE);
92 static Int_t *
New(Int_t *p, Int_t nb = 32*
KBYTE);
93 static UChar_t *
New(UChar_t *p, Int_t nb = 32*
KBYTE);
94 static UShort_t *
New(UShort_t *p, Int_t nb = 32*
KBYTE);
95 static UInt_t *
New(UInt_t *p, Int_t nb = 32*
KBYTE);
96 static Float_t *
New(Float_t *p, Int_t nb = 32*
KBYTE);
97 static Double_t *
New(Double_t *p, Int_t nb = 32*
KBYTE);
101 static Char_t *
New(Char_t *p, UInt_t nb = 32*
KBYTE);
102 static Short_t *
New(Short_t *p, UInt_t nb = 32*
KBYTE);
103 static Int_t *
New(Int_t *p, UInt_t nb = 32*
KBYTE);
104 static Long_t *
New(Long_t *p, UInt_t nb = 32*
KBYTE);
105 static UChar_t *
New(UChar_t *p, UInt_t nb = 32*
KBYTE);
106 static UShort_t *
New(UShort_t *p, UInt_t nb = 32*
KBYTE);
107 static UInt_t *
New(UInt_t *p, UInt_t nb = 32*
KBYTE);
108 static Float_t *
New(Float_t *p, UInt_t nb = 32*
KBYTE);
109 static Double_t *
New(Double_t *p, UInt_t nb = 32*
KBYTE);
114 static void Delete(Char_t *p) { ::delete [] p; p = NULL; }
115 static void Delete(Short_t *p) { ::delete [] p; p = NULL; }
116 static void Delete(Int_t *p) { ::delete [] p; p = NULL; }
117 static void Delete(UChar_t *p) { ::delete [] p; p = NULL; }
118 static void Delete(UShort_t *p) { ::delete [] p; p = NULL; }
119 static void Delete(UInt_t *p) { ::delete [] p; p = NULL; }
120 static void Delete(Float_t *p) { ::delete [] p; p = NULL; }
121 static void Delete(Double_t *p) { ::delete [] p; p = NULL; }
130 static void Zero(Char_t *p, Int_t nb) {
if ( nb < 1 )
return; ::memset(p,0,nb); }
131 static void Zero(Short_t *p, Int_t nb) {
if ( nb < 1 )
return; ::memset(p,0,
sizeof(Short_t)*nb); }
132 static void Zero(Int_t *p, Int_t nb) {
if ( nb < 1 )
return; ::memset(p,0,
sizeof(Int_t)*nb); }
133 static void Zero(UChar_t *p, Int_t nb) {
if ( nb < 1 )
return; ::memset(p,0,nb); }
134 static void Zero(UShort_t *p, Int_t nb) {
if ( nb < 1 )
return; ::memset(p,0,
sizeof(UShort_t)*nb); }
135 static void Zero(UInt_t *p, Int_t nb) {
if ( nb < 1 )
return; ::memset(p,0,
sizeof(UInt_t)*nb); }
136 static void Zero(Float_t *p, Int_t nb) {
if ( nb < 1 )
return; ::memset(p,0,
sizeof(Float_t)*nb); }
137 static void Zero(Double_t *p, Int_t nb) {
if ( nb < 1 )
return; ::memset(p,0,
sizeof(Double_t)*nb); }
142 static void Zero(Char_t *p, UInt_t nb) {
if ( nb < 1 )
return; ::memset(p,0,nb); }
143 static void Zero(Short_t *p, UInt_t nb) {
if ( nb < 1 )
return; ::memset(p,0,
sizeof(Short_t)*nb); }
144 static void Zero(Int_t *p, UInt_t nb) {
if ( nb < 1 )
return; ::memset(p,0,
sizeof(Int_t)*nb); }
145 static void Zero(UChar_t *p, UInt_t nb) {
if ( nb < 1 )
return; ::memset(p,0,nb); }
146 static void Zero(UShort_t *p, UInt_t nb) {
if ( nb < 1 )
return; ::memset(p,0,
sizeof(UShort_t)*nb); }
147 static void Zero(UInt_t *p, UInt_t nb) {
if ( nb < 1 )
return; ::memset(p,0,
sizeof(UInt_t)*nb); }
148 static void Zero(Float_t *p, UInt_t nb) {
if ( nb < 1 )
return; ::memset(p,0,
sizeof(Float_t)*nb); }
149 static void Zero(Double_t *p, UInt_t nb) {
if ( nb < 1 )
return; ::memset(p,0,
sizeof(Double_t)*nb); }
158 static void Copy(
const Char_t *from, Char_t *to, Int_t
size) { ::memcpy(to,from,size); }
166 static void Swap(Short_t, Char_t *);
167 static void Swap(UShort_t, Char_t *);
168 static void Swap(Int_t, Char_t *);
169 static void Swap(UInt_t, Char_t *);
170 static void Swap(Float_t, Char_t *);
171 static void Swap(Double_t, Char_t *);
175 static void Swap(Char_t *,Short_t &);
176 static void Swap(Char_t *,UShort_t &);
177 static void Swap(Char_t *,Int_t &);
178 static void Swap(Char_t *,UInt_t &);
179 static void Swap(Char_t *,Float_t &);
180 static void Swap(Char_t *,Double_t &);
186 inline Char_t *
Memory::New(Char_t *p,Int_t nb) {
if ( nb < 1 )
return NULL; p = ::new Char_t[nb];
if ( p )
Zero(p,nb);
return p; }
187 inline Short_t *
Memory::New(Short_t *p,Int_t nb) {
if ( nb < 1 )
return NULL; p = ::new Short_t[nb];
if ( p )
Zero(p,nb);
return p; }
188 inline Int_t *
Memory::New(Int_t *p,Int_t nb) {
if ( nb < 1 )
return NULL; p = ::new Int_t[nb];
if ( p )
Zero(p,nb);
return p; }
189 inline UChar_t *
Memory::New(UChar_t *p,Int_t nb) {
if ( nb < 1 )
return NULL; p = ::new UChar_t[nb];
if ( p )
Zero(p,nb);
return p; }
190 inline UShort_t *
Memory::New(UShort_t *p,Int_t nb) {
if ( nb < 1 )
return NULL; p = ::new UShort_t[nb];
if ( p )
Zero(p,nb);
return p; }
191 inline UInt_t *
Memory::New(UInt_t *p,Int_t nb) {
if ( nb < 1 )
return NULL; p = ::new UInt_t[nb];
if ( p )
Zero(p,nb);
return p; }
192 inline Float_t *
Memory::New(Float_t *p,Int_t nb) {
if ( nb < 1 )
return NULL; p = ::new Float_t[nb];
if ( p )
Zero(p,nb);
return p; }
193 inline Double_t *
Memory::New (Double_t * p,Int_t nb) {
if ( nb < 1 )
return NULL; p = ::new Double_t[nb];
if ( p )
Zero(p,nb);
return p; }
197 inline Char_t *
Memory::New(Char_t *p,UInt_t nb) {
if ( nb < 1 )
return NULL; p = ::new Char_t[nb];
if ( p )
Zero(p,nb);
return p; }
198 inline Short_t *
Memory::New(Short_t *p,UInt_t nb) {
if ( nb < 1 )
return NULL; p = ::new Short_t[nb];
if ( p )
Zero(p,nb);
return p; }
199 inline Int_t *
Memory::New(Int_t *p,UInt_t nb) {
if ( nb < 1 )
return NULL; p = ::new Int_t[nb];
if ( p )
Zero(p,nb);
return p; }
200 inline UChar_t *
Memory::New(UChar_t *p,UInt_t nb) {
if ( nb < 1 )
return NULL; p = ::new UChar_t[nb];
if ( p )
Zero(p,nb);
return p; }
201 inline UShort_t *
Memory::New(UShort_t *p,UInt_t nb) {
if ( nb < 1 )
return NULL; p = ::new UShort_t[nb];
if ( p )
Zero(p,nb);
return p; }
202 inline UInt_t *
Memory::New(UInt_t *p,UInt_t nb) {
if ( nb < 1 )
return NULL; p = ::new UInt_t[nb];
if ( p )
Zero(p,nb);
return p; }
203 inline Float_t *
Memory::New(Float_t *p,UInt_t nb) {
if ( nb < 1 )
return NULL; p = ::new Float_t[nb];
if ( p )
Zero(p,nb);
return p; }
204 inline Double_t *
Memory::New (Double_t * p,UInt_t nb) {
if ( nb < 1 )
return NULL; p = ::new Double_t[nb];
if ( p )
Zero(p,nb);
return p; }
211 # if defined(__linux) && defined(__i386__)
212 *((UShort_t *)buf) = Rbswap_16(x);
215 const UShort_t *intermediary = &x;
216 char *sw = (
char *) intermediary;
225 # if defined(__linux) && defined(__i386__)
226 *((UInt_t *)buf) = Rbswap_32(x);
229 const UInt_t *intermediary = &x;
230 char *sw = (
char *)intermediary;
241 # if defined(__linux) && defined(__i386__) && \
242 defined(__GNUC__) && __GNUC__ >= 2
243 *((UInt_t *)buf) = Rbswap_32(*((UInt_t *)&x));
244 # elif defined(R__KCC)
258 char *sw = (
char *)&x;
268 # if defined(__EXTENSIONS__) && defined(__linux) && defined(__i386__) && \
269 defined(__GNUC__) && __GNUC__ >= 2
270 *((ULong64_t *)buf) = Rbswap_64(*((ULong64_t *)&x));
271 # elif defined(R__KCC)
289 char *sw = (
char *)&x;
303 # if defined(__linux) && defined(__i386__)
304 x = Rbswap_16(*((UShort_t *)buf));
306 char *sw = (
char *)&x;
313 # if defined(__linux) && defined(__i386__)
314 x = Rbswap_16(*((Short_t *)buf));
316 char *sw = (
char *)&x;
324 # if defined(__linux) && defined(__i386__)
325 x = Rbswap_32(*((UInt_t *)buf));
327 char *sw = (
char *)&x;
337 # if defined(__linux) && defined(__i386__)
338 x = Rbswap_32(*((Int_t *)buf));
340 char *sw = (
char *)&x;
349 # if defined(__linux) && defined(__i386__) && \
350 defined(__GNUC__) && __GNUC__ >= 2
356 u.i = Rbswap_32(*((UInt_t *)buf));
358 # elif defined(R__KCC)
372 char *sw = (
char *)&x;
382 # if defined(__EXTENSIONS__) && defined(__linux) && defined(__i386__) && \
383 defined(__GNUC__) && __GNUC__ >= 2
386 volatile ULong64_t l;
389 u.l = Rbswap_64(*((ULong64_t *)buf));
391 # elif defined(R__KCC)
409 char *sw = (
char *)&x;
EEndian
The adjectives big-endian and little-endian refer to which bytes are most significant in multi-byte d...
static void Delete(UChar_t *p)
static void Delete(UInt_t *p)
static void Zero(Int_t *p, Int_t nb)
static void Zero(Double_t *p, Int_t nb)
static void Zero(Float_t *p, Int_t nb)
static void Delete(Double_t *p)
static void Delete(Float_t *p)
static void Zero(Char_t *p, UInt_t nb)
static bool IsBytes(Memory::EEndian e)
check out the endian type of the running system
static void Zero(UInt_t *p, UInt_t nb)
static void Swap(Short_t, Char_t *)
the Swap members
static void Zero(Double_t *p, UInt_t nb)
static void Zero(Char_t *p, Int_t nb)
fast initialization of the buffer at 0
static void Zero(Short_t *p, Int_t nb)
static void Delete(Int_t *p)
static void Zero(UChar_t *p, UInt_t nb)
static Char_t * New(Char_t *p, Int_t nb=32 *KBYTE)
To allocate a buffer that is set to 0 (some compilers don't do it)
static void Zero(UShort_t *p, UInt_t nb)
static void Delete(UShort_t *p)
static void Delete(Short_t *p)
static void Zero(Float_t *p, UInt_t nb)
static void Zero(UInt_t *p, Int_t nb)
interface to the operating system
static void Copy(const Char_t *from, Char_t *to, Int_t size)
copy the content from -> to
static void Zero(UChar_t *p, Int_t nb)
Interface to the operating system.
static void Delete(Char_t *p)
static void Zero(UShort_t *p, Int_t nb)
static void Zero(Short_t *p, UInt_t nb)
static void Zero(Int_t *p, UInt_t nb)