39 ERROR(
"File: " << pattern->getFullFilename() <<
" not opened." << endl);
43 const TRegexp regexp(pattern->getObjectName());
45 TIter iter(dir->GetListOfKeys());
47 for (TKey* key; (key = (TKey*) iter.Next()) != NULL; ) {
49 const TString tag(key->GetName());
51 if (tag.Contains(regexp) &&
isTObject(key)) {
54 p->SetUniqueID(dir->GetUUID().GetUUIDNumber());
55 listOfObjects.push_back(p);
78 int main(
int argc,
char** argv) {
94 JParser<> zap(
"\nProgram to compare root histograms. See the link below this usage for further details.\n");
98 zap[
'T'] =
make_field(test,
"Test parameters");
99 zap[
'o'] =
make_field(output,
"output file") =
"out.root";
100 zap[
't'] =
make_field(ascii ,
"output file txt" ) =
"";
101 zap[
'w'] =
make_field(onlyFailures ,
"write only failed tests" );
105 catch(
const exception &error) {
106 ERROR(error.what() << endl);
113 istringstream iss(test);
115 d[testID]->read(iss);
123 d[testID]->test(*object_a,*object_b);
127 TFile out(output.c_str(),
"recreate");
130 d[testID]->write(cout);
131 d[testID]->save(&out,
"", onlyFailures);
137 results.open (ascii);
139 d[testID]->write(results,
';', onlyFailures);
int main(int argc, char **argv)
Utility class to parse command line options.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Dictionary to map different tests to unique integer indices.
Utility class to parse command line options.
TDirectory * getDirectory(const JRootObjectID &id)
Get TDirectory pointer.
bool isTObject(const TKey *key)
Check if given key corresponds to a TObject.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
bool putObject(TDirectory &dir, const TObject &object)
Write object to ROOT directory.