Go to the source code of this file.
◆ ATLAS_NOT_THREAD_SAFE()
| int main ATLAS_NOT_THREAD_SAFE |
( |
int | argc, |
|
|
char * | argv[] ) |
Definition at line 36 of file han_config_print.cxx.
37{
39 int rc =
arg.parse( argc, argv );
41
43
44
45 std::string configName(
arg.hconfig );
46 TFile*
config = TFile::Open( configName.c_str() );
48 std::cerr << "Cannot open file \"" << configName << "\"\n";
49 return 1;
50 }
51
52 TKey*
key =
config->FindKey(
"HanMetadata");
53 if (key) {
54 std::cout << "Metadata:\n";
55 TDirectory* metadatadir =
dynamic_cast<TDirectory*
>(
key->ReadObj());
56 if (! metadatadir) {
57 std::cerr << "Metadata directory is malformed\n";
58 return 1;
59 }
61 TIter
next(metadatadir->GetListOfKeys());
62 while ((mdkey =
dynamic_cast<TKey*
>(
next()))) {
63 metadatadir->GetObject(mdkey->GetName(), hcm);
64 if (hcm) {
65 std::cout << *hcm << std::endl;
66 }
67 }
68 delete metadatadir;
69 }
70
72 if( key == 0 ) {
73 std::cerr << "Cannot find configuration in file \"" << configName << "\"\n";
74 return 1;
75 }
76
78 if( g == 0 ) {
79 std::cerr << "Cannot find configuration in file \"" << configName << "\"\n";
80 return 1;
81 }
82
84 return 0;
85}
static ConditionsSingleton & getInstance()
void setCondition(const std::string &c)