14 #include "TInterpreter.h"
18 int usage(
const std::string& command_name,
int exit_code );
23 std::string m_connectionString =
"sqlite://;schema=/afs/cern.ch/user/a/atlasdqm/dqmdisk1/cherrypy-devel/RefDB.db;dbname=REFDB";
24 long m_runNumber = 2147483646;
43 std::string infileName(
arg.mconfig );
47 std::string outfileName;
49 std::string::size_type
s = infileName.size();
50 std::string::size_type
p = infileName.rfind(
'.',
s );
51 outfileName = infileName.substr( 0,
p );
52 outfileName +=
".hcfg";
55 config.AssembleAndSave( infileName, outfileName,
arg.m_connectionString,
arg.m_runNumber,
arg.m_bulk);
78 std::string par0 =
argv[
ic];
81 m_connectionString =
argv[
ic + 1];
82 std::cout <<
"Setting DB connection string to " << m_connectionString << std::endl;
85 }
else if(par0 ==
"-r") {
88 m_runNumber = std::stol(
argv[
ic + 1]);
89 std::cout <<
"Setting run number to " << m_runNumber << std::endl;
92 std::cout <<
"Error with input arguments, specified run " <<
argv[
ic+1] <<
" not a long" <<
'\n';
95 }
else if(par0 ==
"-b") {
97 m_bulk = (strcmp(
argv[
ic+1],
"true") == 0);
98 std::cout <<
"Setting bulk processing mode to " << (m_bulk ?
"true" :
"false") << std::endl;
111 int usage(
const std::string& command_name,
int exit_code )
115 message +=
"This program takes as an argument the name of a file containing\n";
116 message +=
"a MiniConfig configuration and produces a similarly named Root file\n";
117 message +=
"containing a configuration for the \'han\' application\n";
119 std::string::size_type
s = command_name.size();
120 std::string::size_type
p = command_name.rfind(
'/',
s );
121 std::string short_name = command_name.substr(
p+1,
s );
124 std::cout <<
"Usage: " << short_name <<
" <filename>\n";