|
ATLAS Offline Software
|
Go to the documentation of this file.
5 #ifndef UTILITIES_COLLECTION_DSTINFO
6 #define UTILITIES_COLLECTION_DSTINFO
23 class DstInfo :
public CmdLineArgs2
37 std::pair<std::string,std::string>
nameAndType(
unsigned int);
39 std::string
name(
unsigned int);
40 std::string
type(
unsigned int);
56 markers[
"-dst"].desc <<
"<output collection name> <output collection type> " << std::endl
57 <<
"List of name-type pairs is space separated; "
58 <<
"Choices for collection types are " << std::endl;
63 markers[
"-dst"].desc << *at << std::endl;
65 markers[
"-dstconnect"].desc <<
"[Output database connection string] " << std::endl
66 <<
"The connection string will be looked up in $CORAL_DBLOOKUP_PATH/dblookup.xml" << std::endl
67 <<
"Database user authentication is done using CORAL_AUTH_PATH/authentication.xml" << std::endl
68 <<
" or CORAL_AUTH_USER and CORAL_AUTH_PASSWORD variables" << std::endl;
79 if (!retc)
return retc;
81 if ( this->
hasQual(
"-dstconnect") ) {
82 int ifirst = (*this)[
"-dstconnect"].first;
87 int ifirst = (*this)[
"-dst"].first;
88 int ilast = (*this)[
"-dst"].second;
89 std::string dstCollName =
"";
90 std::string dstCollType =
"";
93 dstCollName = std::string(
argv[
i]); ++
i;
94 dstCollType = std::string(
argv[
i]);
101 std::cerr <<
" ERROR Collection type " << dstCollType
102 <<
" is not presently handled by this program."
116 inline std::pair<std::string,std::string>
122 std::cerr <<
"Out of range request for dst (name,type) pair" << std::endl;
123 return std::pair<std::string,std::string>(
"BAD",
"BAD");
132 std::cerr <<
"Out of range request for dst name" << std::endl;
133 return std::string(
"BAD");
142 std::cerr <<
"Out of range request for dst type" << std::endl;
143 return std::string(
"BAD");
151 return this->
nArgs(
"-dst");
156 #endif // UTILITIES_COLLECTION_DSTINFO
JetConstituentVector::iterator iterator
const std::string & connect()
std::string find(const std::string &s)
return a remapped string
std::vector< std::string > m_NameVec
std::string type(unsigned int)
std::pair< std::string, std::string > nameAndType(unsigned int)
void setArgQuals(QualList &quals)
set the QualList
virtual bool evalArgs(std::vector< std::string > &argv)
Apply the criteria in the QualList to the argv[].
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[].
std::map< std::string, ArgQual > QualList
std::vector< std::string > m_TypeVec
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")