DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
DDEve.cpp
Go to the documentation of this file.
1 //==========================================================================
2 // AIDA Detector description implementation
3 //--------------------------------------------------------------------------
4 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
5 // All rights reserved.
6 //
7 // For the licensing terms see $DD4hepINSTALL/LICENSE.
8 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
9 //
10 // Author : M.Frank
11 //
12 //==========================================================================
13 
14 // C/C++ include files
15 #include <string>
16 #include <iostream>
17 
18 // ROOT include files
19 #include <TRint.h>
20 #include "DDEve.C"
21 
22 int main(int argc, char** argv) {
23  std::string config, data;
24  for(int i=1; i<argc; ++i) {
25  if ( 0 == ::strncmp(argv[i],"-config",4) )
26  config = argv[++i];
27  else if ( 0 == ::strncmp(argv[i],"--config",5) )
28  config = argv[++i];
29  else if ( 0 == ::strncmp(argv[i],"-data",4) )
30  data = argv[++i];
31  else if ( 0 == ::strncmp(argv[i],"--data",5) )
32  data = argv[++i];
33  else {
34  std::cout <<
35  "ddeve -opt [-opt] \n"
36  " -config <file> XML configuration file \n"
37  " -data <file> Event data file file \n"
38  << std::endl;
39  exit(0);
40  }
41  }
42  std::pair<int, char**> a(0,0);
43  const char* config_xml = config.empty() ? 0 : config.c_str();
44  gApplication = new TRint("DDEve", &a.first, a.second);
45  DDEve(config_xml);
46  gApplication->Run();
47  return 0;
48 }
main
int main(int argc, char **argv)
Definition: DDEve.cpp:22