From c1d00f391b6efc258217537ac0abde2453af819e Mon Sep 17 00:00:00 2001 From: HaiwangYu Date: Mon, 27 Nov 2017 11:55:46 -0500 Subject: [PATCH] init this multi-module macro --- fun4all/macros/Fun4SeaQuest.C | 49 +++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100755 fun4all/macros/Fun4SeaQuest.C diff --git a/fun4all/macros/Fun4SeaQuest.C b/fun4all/macros/Fun4SeaQuest.C new file mode 100755 index 00000000..f96e9adc --- /dev/null +++ b/fun4all/macros/Fun4SeaQuest.C @@ -0,0 +1,49 @@ +/* + * Fun4SeaQuest.C + * + * Created on: Oct 30, 2017 + * Author: yuhw@nmsu.edu + */ + + + +void Fun4SeaQuest( + const int nevent = 2, + const char *outdst = "dst.root", + const char *outeval = "eval.root" + ) { + + int verbosity = 0; + + gSystem->Load("libfun4all.so"); + Fun4AllServer* se = Fun4AllServer::instance(); + se->Verbosity(verbosity); + + gSystem->Load("libmodules.so"); + + ReadMySql *reader = new ReadMySql(); + reader->Verbosity(verbosity); + reader->set_hit_type("SQHit_v1"); + reader->set_hit_container_type("Vector"); + se->registerSubsystem(reader); + + TestAnalyzer *analyzer = new TestAnalyzer(); + analyzer->Verbosity(verbosity); + analyzer->set_hit_container_choice("Vector"); + analyzer->set_out_name(outeval); + se->registerSubsystem(analyzer); + + + Fun4AllInputManager *in = new Fun4AllDummyInputManager("DUMMY"); + se->registerInputManager(in); + + Fun4AllDstOutputManager *out = new Fun4AllDstOutputManager("DSTOUT", outdst); + se->registerOutputManager(out); + + se->run(nevent); + se->End(); + + delete se; + + cout << "Fun4SeaQuest Done!" << endl; +}