16 using namespace asg::msgUserCode;
17 if (gSystem->Exec(cmd.c_str()) != 0) {
24int main (
int argc,
char **argv)
26 using namespace asg::msgUserCode;
37 std::string jobDefFile = argv[1];
38 std::string output = argv[2];
39 std::string input = argv[3];
41 std::string
type =
"DEFAULT";
42 std::string mergeCmd =
"";
44 TFile jd(jobDefFile.c_str());
46 std::unique_ptr<TList> outs{
dynamic_cast<TList*
>(jd.Get(
"outputs"))};
47 if (outs.get() ==
nullptr) {
51 TIter itr(outs.get());
53 while ((obj = itr())) {
55 if (std::regex_match(output, std::regex(os->label() +
"\\.root.*")) ||
56 std::regex_match(output, std::regex(
".*\\." + os->label() +
"\\.root.*")))
64 if (mergeCmd.empty()) {
66 mergeCmd =
"xAODMerge -s";
67 }
else if (
type ==
"xAODNoMeta") {
68 mergeCmd =
"xAODMerge";
73 mergeCmd +=
" " + output +
" " + input;
74 if (not
try_exec(mergeCmd))
return -1;
static const std::string optType
static const std::string optMergeCmd
bool try_exec(const std::string &cmd)
StatusCode Init(const char *appname)
Function initialising ROOT/PyROOT for using the ATLAS EDM.