Skip to content

Commit

Permalink
init this multi-module macro
Browse files Browse the repository at this point in the history
  • Loading branch information
HaiwangYu committed Nov 27, 2017
1 parent 6ed991f commit c1d00f3
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions fun4all/macros/Fun4SeaQuest.C
Original file line number Diff line number Diff line change
@@ -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;
}

0 comments on commit c1d00f3

Please sign in to comment.