21int usage(
const std::string& command_name,
int exit_code );
24 int parse(
int argc,
char *argv[] );
31 std::string cmdlineConditions;
39 TPython::Exec(
"import logging; logging.basicConfig()");
41 int rc = arg.parse( argc, argv );
44 std::string inputName( arg.data );
45 std::string configName( arg.hconfig );
46 std::string pathName( arg.path );
47 std::string outputName;
48 if( arg.output !=
"" ) {
49 outputName = arg.output;
52 std::string::size_type s = inputName.size();
53 std::string::size_type p = inputName.rfind(
'.', s );
54 outputName = inputName.substr( 0, p );
55 outputName +=
"_han.root";
59 if (arg.cmdlineConditions !=
"") {
64 return app.
Analyze( configName, inputName, outputName, pathName );
74int usage(
const std::string& command_name,
int exit_code )
78 message +=
"This program takes as arguments the name of a configuration\n";
79 message +=
"file and the name of the data file to be analyzed.\n";
80 message +=
"One may optionally specify a path within the data file to analyze\n";
81 message +=
"and additionally the name of the file with the output results.\n";
82 message +=
"If no output file is specified, a name based on the input is used.\n";
84 std::string::size_type
s = command_name.size();
85 std::string::size_type
p = command_name.rfind(
'/', s );
86 std::string short_name = command_name.substr( p+1, s );
89 std::cout <<
"Usage: " << short_name <<
" <config_file> <data_file> [path [results_file]]\n";
95int CmdLineArgs::parse(
int argc,
char *argv[] )
98 if( argc > 6 )
return usage( command, 1 );
99 if( argc < 3 )
return usage( command, 0 );
103 path = (
argc == 4 ||
argc == 5 ||
argc ==6) ? argv[3] :
"";
104 output = (
argc == 5 ||
argc== 6) ? argv[4] :
"";
105 cmdlineConditions = (
argc == 6) ? argv[5] :
"";
int main(int, char **)
Main class for all the CppUnit test classes.
char data[hepevt_bytes_allocation_ATLAS]
Define macros for attributes used to control the static checker.
#define ATLAS_NOT_THREAD_SAFE
getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats
static ConditionsSingleton & getInstance()
void setCondition(const std::string &c)
const std::string & getCondition() const
virtual int Analyze(const std::string &configName_, const std::string &inputName_, const std::string &outputName_, const std::string &path_="")