#ifndef ROOT_TTableMap
#define ROOT_TTableMap
#include "assert.h"
#include <vector>
#ifndef ROOT_TTable
#include "TTable.h"
#endif
class TTableMap : public TObject
#ifndef __CINT__
, public std::vector<Long_t>
#endif
{
protected:
TTable *fTable;
public:
TTableMap(const TTable *table=0);
TTableMap(const TTableMap &map) : TObject(map)
#ifndef __CINT__
, std::vector<Long_t>(map)
#endif
, fTable(map.fTable) {;}
virtual ~TTableMap(){;}
Bool_t IsValid() const;
Bool_t IsFolder() const;
void Push_back(Long_t next);
TTable *Table(){return fTable;}
TTable::iterator Begin();
TTable::iterator Begin() const;
TTable::iterator End();
TTable::iterator End() const;
ClassDef(TTableMap,1)
};
inline Bool_t TTableMap::IsValid() const
{
TTable::iterator i = Begin();
TTable::iterator finish = End();
Int_t totalSize = fTable->GetNRows();
for (; i != finish; i++) {
Long_t th = *i;
if ( th == -1 || (0 <= th && th < totalSize) ) continue;
return kFALSE;
}
return kTRUE;
}
inline TTable::iterator TTableMap::Begin() { std::vector<Long_t>::iterator bMap = this->begin(); return TTable::iterator(*fTable, bMap);}
inline TTable::iterator TTableMap::Begin() const { std::vector<Long_t>::const_iterator bMap = ((TTableMap*) this)->begin(); return TTable::iterator(*fTable, bMap);}
inline TTable::iterator TTableMap::End() { std::vector<Long_t>::iterator eMap = this->end(); return TTable::iterator(*fTable, eMap);}
inline TTable::iterator TTableMap::End() const { std::vector<Long_t>::const_iterator eMap = ((TTableMap*) this)->end(); return TTable::iterator(*fTable, eMap);}
inline Bool_t TTableMap::IsFolder() const { return kTRUE;}
inline void TTableMap::Push_back(Long_t next){ push_back(next); }
#endif
ROOT page - Class index - Class Hierarchy - Top of the page
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.