101 if (
this != &eblock) {
131 Error(
"Enter",
"illegal entry value!");
143 Int_t j = entry & 15;
169 Error(
"Remove",
"Illegal entry value!\n");
174 Int_t j = entry & 15;
197 Error(
"Contains",
"Illegal entry value!\n");
205 Int_t j = entry & 15;
263 if (block->
fType == 0){
281 for (j=0; j<block->
fIndices[0]; j++)
283 for (i=0; i<block->
fNPassed-1; i++){
301 if (block->
fType==1){
311 while (elpos < en &&
fIndices[i] > elst[elpos]) {
312 newlist[newpos] = elst[elpos];
316 if (
fIndices[i] == elst[elpos]) elpos++;
321 newlist[newpos] = elst[elpos];
335 Int_t newpos, current;
336 newpos = current = 0;
340 newlist[newpos] =
fIndices[current];
344 if (
fIndices[current]==i) current++;
349 newlist[newpos] =
fIndices[current];
392 while (entries_found<entry+1){
393 if (j==15){i++; j=0;}
416 if (entries_found==entry+1){
422 for (j=fIndices[i]+1; j<fIndices[i+1]; j++){
424 if (entries_found==entry+1){
430 for (j=fIndices[fNPassed-1]+1; j<
kBlockSize*16; j++){
432 if (entries_found==entry+1){
464 if (j==15) {j=0; i++;}
513 result = (
fIndices[ibite] & (1<<ibit))!=0;
515 printf(
"%d\n", i+shift);
525 printf(
"%d\n", i+shift);
529 printf(
"%d\n", i+shift);
532 for (
Int_t j=fIndices[i]+1; j<fIndices[i+1]; j++){
533 printf(
"%d\n", j+shift);
537 printf(
"%d\n", j+shift);
549 if (
fType!=0)
return;
601 indexnew[ibite] |= 1<<ibit;
609 indexnew[ibite] ^= 1<<ibit;
Int_t fLastIndexQueried
! to optimize GetEntry() in a loop
void OptimizeStorage()
If there are < kBlockSize or >kBlockSize*15 entries, change to an array representation.
void ToUpper()
Change string to upper case.
Int_t fLastIndexReturned
! to optimize GetEntry() in a loop
Int_t Merge(TEntryListBlock *block)
Merge with the other block Returns the resulting number of entries in the block.
Int_t fType
0 - bits, 1 - list
Bool_t Enter(Int_t entry)
If the block has already been optimized and the entries are stored as a list and not as bits...
Int_t GetEntry(Int_t entry)
Return entry #entry.
void PrintWithShift(Int_t shift) const
Print the indices of this block + shift (used from TEntryList::Print()) to print the corrent values...
TObject()
TObject constructor.
TEntryListBlock()
Default c-tor.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Bool_t fPassing
1 - stores entries that belong to the list 0 - stores entries that don't belong to the list ...
~TEntryListBlock()
Destructor.
Int_t Contains(Int_t entry)
True if the block contains entry #entry.
Int_t GetNPassed()
Returns the number of entries, passing the selection.
Int_t Next()
Return the next non-zero entry Faster than GetEntry() function.
Int_t fNPassed
number of entries in the entry list (if fPassing=0 - number of entries not in the entry list ...
virtual void Print(const Option_t *option="") const
Print the entries in this block.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
UShort_t fCurrent
! to fasten Contains() in list mode
Bool_t Remove(Int_t entry)
Remove entry #entry If the block has already been optimized and the entries are stored as a list and ...
void Transform(Bool_t dir, UShort_t *indexnew)
Transform the existing fIndices.
Used by TEntryList to store the entry numbers.
Int_t fN
size of fIndices for I/O =fNPassed for list, fBlockSize for bits
TEntryListBlock & operator=(const TEntryListBlock &rhs)