44#include "XrdSys/XrdSysHeaders.hh"
46#define IDXVEC_MINCAPACITY 128
86 std::cerr <<
"XrdClientIdxVector::Init .... out of memory. sizeof_t=" <<
sizeof_t <<
87 " sizeof(myindex)=" <<
sizeof(
myindex) <<
" capacity=" <<
mincap << std::endl;
104 reinterpret_cast<T*
>(
rawdata+
el->offs)->~T();
108 void put(T& item,
long pos) {
113 std::cerr <<
"XrdClientIdxVector::put .... internal error." << std::endl;
120 if (
index[pos].notempty) {
121 offs =
index[pos].offs;
130 index[pos].offs = offs;
131 index[pos].notempty =
true;
134 std::cerr <<
"XrdClientIdxVector::put .... out of memory." << std::endl;
145 for (
long i = 0; i <
size; i++)
155 sizeof_t = (
sizeof(T) + 3) >> 2 << 2;
162 sizeof_t = (
sizeof(T) + 3) >> 2 << 2;
167 for (
int i = 0; i <
v.size; i++)
172 for (
long i = 0; i <
size; i++)
239 index[pos].notempty =
false;
304 inline T &
At(
int pos) {
305 if ((pos < 0) || (
static_cast<unsigned long>(pos) >=
306 static_cast<unsigned long>(
size))) abort();
308 return *(
reinterpret_cast<T*
>(
rawdata +
index[pos].offs));
325 if ((
size+holecount >= capacity-2) && (holecount > 4*
size))
326 while (
size+holecount >= capacity-2) {
343 for (
long i = 0; i <
size+holecount; i++)
345 index[i].offs -= sizeof_t;
351 while (
newsize+holecount > capacity*2/3) {
357 rawdata =
static_cast<char *
>(
realloc(rawdata, capacity*sizeof_t));
359 std::cerr <<
"XrdClientIdxVector::BufRealloc .... out of memory." << std::endl;
368 while ((
newsize+holecount < capacity/3) && (capacity > 2*mincap)) {
375 rawdata =
static_cast<char *
>(
realloc(rawdata, capacity*sizeof_t));
377 std::cerr <<
"XrdClientIdxVector::BufRealloc .... out of memory." << std::endl;
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
winID h TVirtualViewer3D TVirtualGLPainter p
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 r
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t index
#define IDXVEC_MINCAPACITY
XrdClientVector(XrdClientVector &v)
void Erase(unsigned int pos, bool dontrealloc=true)
void put(T &item, long pos)
XrdClientVector(int cap=-1)
struct XrdClientVector::myindex * index
void DestroyElem(myindex *el)
void Insert(T &item, int pos)
int BufRealloc(int newsize)