artdaq  v2_03_00
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
config_t.cc
1 #include "Config.hh"
2 #include "MPIProg.hh"
3 #include <cstring>
4 #include <cassert>
5 
6 using namespace std;
7 
8 int main()
9 {
10  char const* argv[] = {"execname", "5", "5", "100", "6000140",
11  "2", "1", "--", "a", "bc", "de f"
12  };
13  int argc = sizeof(argv) / sizeof(char *);
14  MPIProg mpiSentry(argc, const_cast<char **>(argv));
15  int rank = 1;
16  int nprocs = 15;
17  artdaq::Config cfg(rank, nprocs, 10, 0x100000, argc, const_cast<char **>(argv));
18  assert(cfg.art_argc_ == 4);
19  assert(strcmp(cfg.art_argv_[0], "--") == 0);
20  assert(strcmp(cfg.art_argv_[1], "a") == 0);
21  assert(strcmp(cfg.art_argv_[2], "bc") == 0);
22  assert(strcmp(cfg.art_argv_[3], "de f") == 0);
23  assert(!cfg.use_artapp_);
24 }
A wrapper for a MPI program. Similar to MPISentry.
Definition: MPIProg.hh:10
Helper class for configuring the builder test.
Definition: Config.hh:21