ATLAS Offline Software
Public Member Functions | Public Attributes | Protected Attributes | Private Member Functions | Private Attributes | List of all members
pool::CmdLineArgs2 Class Reference

#include <CmdLineArgs2.h>

Inheritance diagram for pool::CmdLineArgs2:
Collaboration diagram for pool::CmdLineArgs2:

Public Member Functions

 CmdLineArgs2 (const std::string &name="General")
 Constructor.
More...
 
 CmdLineArgs2 (QualList &, const std::string &name="General")
 
virtual ~CmdLineArgs2 ()
 
virtual void init ()
 init More...
 
bool hasQual (const std::string &arg) const
 Check if argument was found in the argv[]. More...
 
bool getOpt (const std::string &opt, std::string &optval) const
 check if option was present and return its (first) value in optval(!) More...
 
bool getOpt (const std::string &opt, int &optval) const
 check if option was present and return its (first) numerical value in optval (!) More...
 
bool getOpts (const std::string &opt, std::vector< std::string > &optvalvec) const
 check if option was present and return its values in optvalvec(!) More...
 
virtual bool evalArgs (std::vector< std::string > &argv)
 Apply the criteria in the QualList to the argv[]. More...
 
virtual bool evalArgsPass2 (std::vector< std::string > &, pool::Args2Container &)
 Second pass options processing. More...
 
bool valid () const
 Returns true if evalArgs has been called with no errors. More...
 
const std::string & name () const
 identifier More...
 
ArgQualgetArgQual (const std::string &a)
 
QualListgetArgQuals ()
 
std::vector< std::string > & allowedTypes ()
 Hack to bring in allowed types of Collections. More...
 
unsigned int nArgs (std::string)
 Number of arguments for a given qualifer, e.g. nArgs("-src") More...
 
void setArgQuals (QualList &quals)
 set the QualList More...
 
void ignoreMissingArgs (bool ignore)
 set flag to suppress error messages about missing arguments e.g. when -xmlInput is present More...
 

Public Attributes

keys
 STL member. More...
 
elements
 STL member. More...
 

Protected Attributes

bool m_argsfine
 
bool m_ignoreMissingArgs
 
std::vector< std::string > m_argv
 

Private Member Functions

void initTypes ()
 Fill the vector m_allowedTypes. More...
 

Private Attributes

QualList m_quals
 
std::string m_id
 
std::vector< std::string > m_allowedTypes
 

Detailed Description

Definition at line 72 of file CmdLineArgs2.h.

Constructor & Destructor Documentation

◆ CmdLineArgs2() [1/2]

pool::CmdLineArgs2::CmdLineArgs2 ( const std::string &  name = "General")

Constructor.

◆ CmdLineArgs2() [2/2]

pool::CmdLineArgs2::CmdLineArgs2 ( QualList ,
const std::string &  name = "General" 
)

◆ ~CmdLineArgs2()

virtual pool::CmdLineArgs2::~CmdLineArgs2 ( )
inlinevirtual

Definition at line 79 of file CmdLineArgs2.h.

Member Function Documentation

◆ allowedTypes()

std::vector<std::string>& pool::CmdLineArgs2::allowedTypes ( )
inline

Hack to bring in allowed types of Collections.

Definition at line 113 of file CmdLineArgs2.h.

◆ evalArgs()

virtual bool pool::CmdLineArgs2::evalArgs ( std::vector< std::string > &  argv)
virtual

Apply the criteria in the QualList to the argv[].

Reimplemented in pool::DstInfo, pool::MaxEventsInfo, pool::QueryInfo, pool::SrcInfo, pool::CatalogInfo, and pool::Progress.

◆ evalArgsPass2()

virtual bool pool::CmdLineArgs2::evalArgsPass2 ( std::vector< std::string > &  ,
pool::Args2Container  
)
inlinevirtual

Second pass options processing.

Reimplemented in pool::QueryInfo.

Definition at line 100 of file CmdLineArgs2.h.

◆ getArgQual()

ArgQual& pool::CmdLineArgs2::getArgQual ( const std::string &  a)
inline

Definition at line 109 of file CmdLineArgs2.h.

◆ getArgQuals()

QualList& pool::CmdLineArgs2::getArgQuals ( )
inline

Definition at line 110 of file CmdLineArgs2.h.

◆ getOpt() [1/2]

bool pool::CmdLineArgs2::getOpt ( const std::string &  opt,
int &  optval 
) const

check if option was present and return its (first) numerical value in optval (!)

◆ getOpt() [2/2]

bool pool::CmdLineArgs2::getOpt ( const std::string &  opt,
std::string &  optval 
) const

check if option was present and return its (first) value in optval(!)

◆ getOpts()

bool pool::CmdLineArgs2::getOpts ( const std::string &  opt,
std::vector< std::string > &  optvalvec 
) const

check if option was present and return its values in optvalvec(!)

◆ hasQual()

bool pool::CmdLineArgs2::hasQual ( const std::string &  arg) const

Check if argument was found in the argv[].

◆ ignoreMissingArgs()

void pool::CmdLineArgs2::ignoreMissingArgs ( bool  ignore)
inline

set flag to suppress error messages about missing arguments e.g. when -xmlInput is present

Definition at line 122 of file CmdLineArgs2.h.

◆ init()

void pool::CmdLineArgs2::init ( )
inlinevirtual

init

Definition at line 141 of file CmdLineArgs2.h.

◆ initTypes()

void pool::CmdLineArgs2::initTypes ( )
private

Fill the vector m_allowedTypes.

◆ name()

const std::string& pool::CmdLineArgs2::name ( ) const
inline

identifier

Definition at line 106 of file CmdLineArgs2.h.

◆ nArgs()

unsigned int pool::CmdLineArgs2::nArgs ( std::string  )

Number of arguments for a given qualifer, e.g. nArgs("-src")

◆ setArgQuals()

void pool::CmdLineArgs2::setArgQuals ( QualList quals)
inline

set the QualList

Definition at line 119 of file CmdLineArgs2.h.

◆ valid()

bool pool::CmdLineArgs2::valid ( ) const
inline

Returns true if evalArgs has been called with no errors.

Definition at line 103 of file CmdLineArgs2.h.

104 :
105 

Member Data Documentation

◆ elements

T std::map< K, T >::elements
inherited

STL member.

◆ keys

K std::map< K, T >::keys
inherited

STL member.

◆ m_allowedTypes

std::vector<std::string> pool::CmdLineArgs2::m_allowedTypes
private

Definition at line 137 of file CmdLineArgs2.h.

◆ m_argsfine

bool pool::CmdLineArgs2::m_argsfine
protected

Definition at line 126 of file CmdLineArgs2.h.

◆ m_argv

std::vector<std::string> pool::CmdLineArgs2::m_argv
protected

Definition at line 128 of file CmdLineArgs2.h.

◆ m_id

std::string pool::CmdLineArgs2::m_id
private

Definition at line 136 of file CmdLineArgs2.h.

◆ m_ignoreMissingArgs

bool pool::CmdLineArgs2::m_ignoreMissingArgs
protected

Definition at line 127 of file CmdLineArgs2.h.

◆ m_quals

QualList pool::CmdLineArgs2::m_quals
private

Definition at line 135 of file CmdLineArgs2.h.


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