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

Index based on list of sub-archives. More...

#include <ListIndex.h>

Inheritance diagram for ListIndex:
Index

Public Member Functions

 ~ListIndex ()
 Destructor.
 
virtual void open (const std::string &filename, ReadWrite readwrite=ReadOnly)
 Open the index. More...
 
virtual void close ()
 Closes the index.
 
virtual ResultaddChannel (const std::string &channel)
 Adds channel.
 
virtual ResultfindChannel (const std::string &channel)
 Returns result of the specified channel.
 
virtual NameIteratoriterator ()
 Returns iterator.
 
- Public Member Functions inherited from Index
 Index ()
 Constructor.
 
virtual ~Index ()
 Destructor.
 
virtual void open (const stdString &filename, ReadWrite readwrite=ReadOnly)=0
 Open an index. More...
 
const std::string & getFilename ()
 Get the basename. More...
 
const std::string & getDirectory ()
 Get the directory. More...
 
const stdString & getFullName ()
 
virtual ResultaddChannel (const stdString &channel)=0
 Add a channel to the index. More...
 
virtual ResultfindChannel (const stdString &channel)=0
 Obtain the RTree for a channel. More...
 

Additional Inherited Members

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

Detailed Description

Index based on list of sub-archives.

Ideally, an index configuration conforming to indexfile.dtd is used to create a master index via the ArchiveIndexTool. Alternatively, that list of sub-archives can be used with a ListIndex, which then acts like a master index by simply querying the sub-archives one by one:

It is important to remember that the samples are not "merged" in any way. When data for a channel is requested, the very first sub-archive which includes that channel is used. Assume the following sub-archive: 1) Channels A, B, X 2) Channels C, D, X (but different time range for X)

We can now request data for channels A, B, C and D as if they were all in one combined archive. For channel X, however, will will mostly get data from sub-archive 1, EXCEPT(!!) when we were just looking at channels C or D from archive 2, because for efficiency reasons, any channel lookup will first try the currently open sub-archive.

Conclusion: You will often not able to predict what sub-archive you are using when channels are in more than one sub-archive. You should only use the ListIndex for non-overlapping sub-archives. This makes some sense, because why would you want to archive channels in more than one sub-archive in the first place?

Member Function Documentation

virtual void ListIndex::open ( const std::string &  filename,
ReadWrite  readwrite = ReadOnly 
)
virtual

Open the index.

Parameters
filename,:Name of a file that lists sub-archives.
readwrite,:Must be 'true', because ListIndex doesn't support writing.
Exceptions
GenericExceptionOn error, including readonly==false.

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