Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

GetDefaultValue.h File Reference

#include <fstream>
#include <strstream.h>
#include <vector>
#include "HepUtilities/SimpleTokenizer.h"

Include dependency graph for GetDefaultValue.h:

Include dependency graph

Go to the source code of this file.

Functions

template<class T> T GetDefaultValue (const char *filename, const char *inName, const T &defv)
 Version for reading in a simple type, returns on first match found. More...

template<class T> AIDA_STD::vector< T > GetDefaultValueVector (const char *filename, const char *inName, const T &defv)
template<class T> void GetDefaultValue (const char *filename, const char *inName, T *value, const int nitems)
template<class T> AIDA_STD::vector< T > GetManyDefaultValues (const char *filename, const char *inName, const T &defv)


Function Documentation

void GetDefaultValue const char *    filename,
const char *    inName,
T *    value,
const int    nitems
 

Version which looks only once for a token, but which may hold an array of some size. Read in are nitems items. This version is potentially more unsafe than the version above using a vector<T>. It is provided for compatibility reasons only. Use the vectorized version from above if you want to deal with arrays of values.

Definition at line 130 of file GetDefaultValue.h.

References String, and SimpleTokenizer::tokenize.

T GetDefaultValue const char *    filename,
const char *    inName,
const T &    defv
 

Template functions returning resource value read from file. If not available uses default value passed as argument. The resource line must be given as: resource: value Comments beginning with '!' or '#' can be added to the resource file.

Originally taken from: COOL Program Library Copyright (C) CERES collaboration, 1996 original author: Thomas Ullrich modified for general use in HEP by Andreas Pfeiffer & Guenther Dissertori

Definition at line 33 of file GetDefaultValue.h.

References String, and SimpleTokenizer::tokenize.

AIDA_STD::vector<T> GetDefaultValueVector const char *    filename,
const char *    inName,
const T &    defv
 

Version which looks only once for a token, but which may hold a vector of entries. Return also a vector<T>

Definition at line 76 of file GetDefaultValue.h.

References String, and SimpleTokenizer::tokenize.

AIDA_STD::vector<T> GetManyDefaultValues const char *    filename,
const char *    inName,
const T &    defv
 

version which looks for more than one token of the same name, returns vector<T> with one entry for each match.

Definition at line 174 of file GetDefaultValue.h.

References String, and SimpleTokenizer::tokenize.


Generated on Tue May 20 14:50:26 2003 for HepUtilities by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002