|
ATLAS Offline Software
|
Go to the documentation of this file.
5 #ifndef UTILITIES_COLLECTION_SRCINFO
6 #define UTILITIES_COLLECTION_SRCINFO
23 class SrcInfo :
public CmdLineArgs2
37 std::pair<std::string,std::string>
nameAndType(
unsigned int);
39 std::string
name(
unsigned int);
40 std::string
type(
unsigned int);
59 markers[
"-src"].desc <<
"<input collection name> <input collection type> " << std::endl
60 <<
"List of name-type pairs is space separated; "
61 <<
"Choices for collection types are " << std::endl;
66 markers[
"-srcconnect"].desc <<
"[Input database connection string] " << std::endl
67 <<
"The connection string will be looked up in $CORAL_DBLOOKUP_PATH/dblookup.xml" << std::endl
68 <<
"Database user authentication is done using CORAL_AUTH_PATH/authentication.xml" << std::endl
69 <<
" or CORAL_AUTH_USER and CORAL_AUTH_PASSWORD variables" << std::endl;
79 if(!retc)
return retc;
81 if ( this->
hasQual(
"-srcconnect") ) {
82 int ifirst = (*this)[
"-srcconnect"].first;
87 int ifirst = (*this)[
"-src"].first;
88 int ilast = (*this)[
"-src"].second;
89 std::string srcCollName =
"";
90 std::string srcCollType =
"";
93 srcCollName = std::string(
argv[
i]); ++
i;
94 srcCollType = std::string(
argv[
i]);
101 std::cerr <<
" ERROR Collection type " << srcCollType
102 <<
" is not presently handled by this program."
116 inline std::pair<std::string,std::string>
122 std::cerr <<
"Out of range request for src (name,type) pair" << std::endl;
123 return std::pair<std::string,std::string>(
"BAD",
"BAD");
132 std::cerr <<
"Out of range request for src name" << std::endl;
133 return std::string(
"BAD");
142 std::cerr <<
"Out of range request for src type" << std::endl;
143 return std::string(
"BAD");
150 return this->
nArgs(
"-src");
155 #endif // UTILITIES_COLLECTION_SRCINFO
JetConstituentVector::iterator iterator
std::string find(const std::string &s)
return a remapped string
std::vector< std::string > m_NameVec
void setArgQuals(QualList &quals)
set the QualList
std::pair< std::string, std::string > nameAndType(unsigned int)
std::vector< std::string > m_TypeVec
virtual bool evalArgs(std::vector< std::string > &argv)
Apply the criteria in the QualList to the argv[].
bool hasQual(const std::string &arg) const
Check if argument was found in the argv[].
bool evalArgs(std::vector< std::string > &argv)
Apply the criteria in the QualList to the argv[].
std::map< std::string, ArgQual > QualList
std::string type(unsigned int)
std::vector< std::string > & allowedTypes()
Hack to bring in allowed types of Collections.
const std::string & name() const
identifier
unsigned int nArgs(std::string)
Number of arguments for a given qualifer, e.g. nArgs("-src")
const std::string & connect()