File indexing completed on 2025-08-03 08:22:09
0001 #pragma once
0002 #if ROOT_VERSION_CODE >= ROOT_VERSION(6,00,0)
0003 #include <fun4all/Fun4AllServer.h>
0004 #include <g4main/PHG4Reco.h>
0005 #endif
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 PHG4Reco * DisplayOn(const char *mac = "iongun.mac")
0017 {
0018 char cmd[100];
0019 Fun4AllServer *se = Fun4AllServer::instance();
0020 PHG4Reco *g4 = (PHG4Reco *) se->getSubsysReco("PHG4RECO");
0021 g4->InitRun(se->topNode());
0022 g4->ApplyDisplayAction();
0023 sprintf(cmd, "/control/execute %s", mac);
0024 g4->ApplyCommand(cmd);
0025 return g4;
0026 }
0027
0028 void displaycmd()
0029 {
0030 cout << "draw axis: " << endl;
0031 cout << " g4->ApplyCommand(\"/vis/scene/add/axes 0 0 0 50 cm\")" << endl;
0032 cout << "zoom" << endl;
0033 cout << " g4->ApplyCommand(\"/vis/viewer/zoom 1\")" << endl;
0034 cout << "viewpoint:" << endl;
0035 cout << " g4->ApplyCommand(\"/vis/viewer/set/viewpointThetaPhi 0 0\")" << endl;
0036 cout << "panTo:" << endl;
0037 cout << " g4->ApplyCommand(\"/vis/viewer/panTo 0 0 cm\")" << endl;
0038 cout << "print to eps:" << endl;
0039 cout << " g4->ApplyCommand(\"/vis/ogl/printEPS\")" << endl;
0040 cout << "set background color:" << endl;
0041 cout << " g4->ApplyCommand(\"/vis/viewer/set/background white\")" << endl;
0042 }