Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
JetScapeModuleBase.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file JetScapeModuleBase.cc
1 /*******************************************************************************
2  * Copyright (c) The JETSCAPE Collaboration, 2018
3  *
4  * Modular, task-based framework for simulating all aspects of heavy-ion collisions
5  *
6  * For the list of contributors see AUTHORS.
7  *
8  * Report issues at https://github.com/JETSCAPE/JETSCAPE/issues
9  *
10  * or via email to bugs.jetscape@gmail.com
11  *
12  * Distributed under the GNU General Public License 3.0 (GPLv3 or later).
13  * See COPYING for details.
14  ******************************************************************************/
15 
16 #include "JetScapeModuleBase.h"
17 #include "JetScapeXML.h"
18 #include "JetScapeTaskSupport.h"
19 #include "JetScapeLogger.h"
20 
21 #include <iostream>
22 
23 namespace Jetscape {
24 
25 // Create an instance of the static map to register modules
28 
30 
31 // ---------------------------------------------------------------------------
35  : JetScapeTask(), xml_main_file_name(""), xml_user_file_name(""),
36  mt19937_generator_(nullptr) {}
37 
38 // ---------------------------------------------------------------------------
42 
43 // ---------------------------------------------------------------------------
47  if (!JetScapeXML::Instance()->GetXMLRootMain()) {
48  JSWARN << "Not a valid JetScape Main XML file or no XML file loaded!";
49  exit(-1);
50  }
51  if (!JetScapeXML::Instance()->GetXMLRootUser()) {
52  JSWARN << "Not a valid JetScape XML file or no XML file loaded!";
53  exit(-1);
54  }
55 }
56 
57 // ---------------------------------------------------------------------------
61  // Instantiate if it isn't there yet
62  if (!mt19937_generator_) {
65  }
66  return mt19937_generator_;
67 }
68 
69 } // end namespace Jetscape