23int usage(
const std::string& command_name,
int exit_code );
26 int parse(
int argc,
char *argv[] );
30 std::string conditions;
39 int rc = arg.parse( argc, argv );
45 std::string configName( arg.hconfig );
46 TFile*
config = TFile::Open( configName.c_str() );
48 std::cerr <<
"Cannot open file \"" << configName <<
"\"\n";
52 TKey* key =
config->FindKey(
"HanMetadata");
54 std::cout <<
"Metadata:\n";
55 TDirectory* metadatadir =
dynamic_cast<TDirectory*
>(key->ReadObj());
57 std::cerr <<
"Metadata directory is malformed\n";
61 TIter next(metadatadir->GetListOfKeys());
62 while ((mdkey =
dynamic_cast<TKey*
>(next()))) {
63 metadatadir->GetObject(mdkey->GetName(), hcm);
65 std::cout << *hcm << std::endl;
71 key =
config->FindKey(
"top_level");
73 std::cerr <<
"Cannot find configuration in file \"" << configName <<
"\"\n";
79 std::cerr <<
"Cannot find configuration in file \"" << configName <<
"\"\n";
94int CmdLineArgs::parse(
int argc,
char *argv[] )
97 if( argc > 3 )
return usage( command, 1 );
98 if( argc < 2 )
return usage( command, 0 );
101 if(argc==3)conditions =
argv[2];
106int usage(
const std::string& command_name,
int exit_code )
110 message +=
"This program takes as an argument the name of a \'han\' configuration\n";
111 message +=
"file and prints the configuration.\n";
113 std::string::size_type
s = command_name.size();
114 std::string::size_type
p = command_name.rfind(
'/', s );
115 std::string short_name = command_name.substr( p+1, s );
118 std::cout <<
"Usage: " << short_name <<
" <filename>\n";
int main(int, char **)
Main class for all the CppUnit test classes.
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)