EPICS ARCHIVER V4
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups
Public Member Functions | Static Public Attributes | List of all members
IndexFile Class Reference

RTree-based index file. More...

#include <IndexFile.h>

Inheritance diagram for IndexFile:
Index

Public Member Functions

 IndexFile (int RTreeM=50)
 Constructor.
 
 ~IndexFile ()
 Destructor.
 
virtual void open (const stdString &filename, ReadWrite readwrite=ReadOnly)
 Open the index file.
 
virtual void close ()
 Close the index file.
 
virtual ResultaddChannel (const stdString &channel)
 Add channel.
 
virtual ResultfindChannel (const stdString &channel)
 Find channel.
 
virtual NameIteratoriterator ()
 Returns iterator.
 
void showStats (FILE *f)
 Prints statistics.
 
bool check (int level)
 Check level.
 
- Public Member Functions inherited from Index
 Index ()
 Constructor.
 
virtual ~Index ()
 Destructor.
 
const std::string & getFilename ()
 Get the basename. More...
 
const std::string & getDirectory ()
 Get the directory. More...
 
const stdString & getFullName ()
 

Static Public Attributes

static const uint32_t cookie = 0x43414932
 == 'CAI2', Chan. More...
 
static const uint32_t ht_size
 The hash table size used for new channel name tables. More...
 

Additional Inherited Members

- Public Types inherited from Index
enum  ReadWrite { ReadOnly, ReadAndWrite }
 Modes used for open.
 

Detailed Description

RTree-based index file.

The IndexFile combines the NameHash for channel name lookup with one RTree per channel into an index.

The file itself starts with the IndexFile cookie, followed by the NameHash anchor. Those two items constitute the 'reserved space' all the remaining space is handled by the FileAllocator. The ID of each NameHash entry points to an RTree anchor.

For a 'full' index, the RTree data blocks point to the actual data file and offset of the referenced data. For a 'shallow' index, the RTree points to further index files, offset 0. This distinction is made outside of the IndexFile class by the ArchiveIndexTool that builds the indices respectivly the DataReader classes that read data.

Member Data Documentation

const uint32_t IndexFile::cookie = 0x43414932
static

== 'CAI2', Chan.

Arch. Index 2

const uint32_t IndexFile::ht_size
static

The hash table size used for new channel name tables.


The documentation for this class was generated from the following file: