Generic hardware access library
HAL::ASCIIFileAddressTableContainer Class Reference

Retrieves AddressTables for a given SerialNumber. More...

#include <ASCIIFileAddressTableContainer.hh>

Inheritance diagram for HAL::ASCIIFileAddressTableContainer:

List of all members.

Public Member Functions

 ASCIIFileAddressTableContainer (ASCIIFileModuleMapper &moduleMapper, std::string addressTableMapFile, std::string addressTablePrefix="") throw ( NoSuchFileException, IllegalValueException, XMLProcessingException )
 The constructor of the ASCIIFileAddressTableContainer.
virtual ~ASCIIFileAddressTableContainer ()
VMEAddressTablegetVMETableFromSerialNumber (std::string serialNumber) throw ( IllegalValueException )
 Retrieves the AddressTable of a module with a given seralNumber.

Private Attributes

std::string mappingTable_
std::map< std::string,
VMEAddressTable * > 
std::map< std::string,
PCIAddressTable * > 

Detailed Description

Retrieves AddressTables for a given SerialNumber.

The class reads an ASCII file which maps typeIds to pathnames of AddressTable files. It then uses the ModuleMapper in order to retrieve the AddressTables for a given SerialNumber. AddressTables are constructed the first time they are requested. They are then stored in a map with the typeId as a key. Therefore they can be shared by all modules with the same typeId (but different serialNumbers).

Addresstables can be either in xml format or in ASCII format. If the file extension of the AddressTable is ".xml" or ".XML" the file is interpreted as an XML AddressTable. In all other cases the file is interpreted as an ASCII AddressTable.

The format of the ASCII File is as follows:

            *  typeId       technology      addressTableFileName
            ECAL-DCC         vme            /home/data/dccAddressTable.xml
            TTCvi            vme            /home/data/ttcviAddressTable.xml
            gIIIFed          pci            /home/data/gIIIFedAddressTable.xml

The technology column might have the values 'vme' or 'pci'.

See also:
Christoph Schwick
2007/03/05 18:02:09

Definition at line 62 of file ASCIIFileAddressTableContainer.hh.

Constructor & Destructor Documentation

HAL::ASCIIFileAddressTableContainer::ASCIIFileAddressTableContainer ( HAL::ASCIIFileModuleMapper moduleMapper,
std::string  addressTableMapFile,
std::string  addressTablePrefix = "" 
) throw ( NoSuchFileException, IllegalValueException, XMLProcessingException )

The constructor of the ASCIIFileAddressTableContainer.

moduleMapperis a ASCIIFileModuleMapper in order to map the serialNumber of a module to its typeId, and to retrieve the baseaddress if the module is a standard VME module (not VME64x plug and play)
addressTableMapFileis the path to the ASCII file described above.
addressTablePrefixallows the user to define a base-directory which will be prefixed to all address table file strings found in the map file.

Definition at line 7 of file

Member Function Documentation

Retrieves the AddressTable of a module with a given seralNumber.

Implements HAL::AddressTableContainerInterface.

Definition at line 123 of file

Member Data Documentation

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