60 fLastIndexReturned = -1;
61 fLastIndexQueried = -1;
72 for (
Int_t i=0; i<fN; i++)
81 fLastIndexReturned = -1;
82 fLastIndexQueried = -1;
99 if (
this != &eblock) {
129 Error(
"Enter",
"illegal entry value!");
141 Int_t j = entry & 15;
167 Error(
"Remove",
"Illegal entry value!\n");
172 Int_t j = entry & 15;
195 Error(
"Contains",
"Illegal entry value!\n");
203 Int_t j = entry & 15;
261 if (block->
fType == 0){
279 for (j=0; j<block->
fIndices[0]; j++)
281 for (i=0; i<block->
fNPassed-1; i++){
299 if (block->
fType==1){
309 while (elpos < en &&
fIndices[i] > elst[elpos]) {
310 newlist[newpos] = elst[elpos];
314 if (
fIndices[i] == elst[elpos]) elpos++;
319 newlist[newpos] = elst[elpos];
334 newpos = current = 0;
342 if (
fIndices[current]==i) current++;
390 while (entries_found<entry+1){
391 if (j==15){i++; j=0;}
414 if (entries_found==entry+1){
420 for (j=fIndices[i]+1; j<fIndices[i+1]; j++){
422 if (entries_found==entry+1){
428 for (j=fIndices[fNPassed-1]+1; j<
kBlockSize*16; j++){
430 if (entries_found==entry+1){
462 if (j==15) {j=0; i++;}
511 result = (
fIndices[ibite] & (1<<ibit))!=0;
530 for (
Int_t j=fIndices[i]+1; j<fIndices[i+1]; j++){
547 if (
fType!=0)
return;
599 indexnew[ibite] |= 1<<ibit;
607 indexnew[ibite] ^= 1<<ibit;
Int_t fLastIndexQueried
to fasten Contains() in list mode
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.
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.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
void PrintWithShift(Int_t shift) const
Print the indices of this block + shift (used from TEntryList::Print()) to print the corrent values...
~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.
ClassImp(TEntryListBlock) TEntryListBlock
Default c-tor.
ClassImp(TMCParticle) void TMCParticle printf(": p=(%7.3f,%7.3f,%9.3f) ;", fPx, fPy, fPz)
virtual void Print(const Option_t *option="") const
Print the entries in this block.
Mother of all ROOT objects.
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 n...
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
void Transform(Bool_t dir, UShort_t *indexnew)
to optimize GetEntry() in a loop
Used by TEntryList to store the entry numbers.
TEntryListBlock & operator=(const TEntryListBlock &rhs)