17 #include "gtest/gtest.h"
18 #include "framework/core/RandomNumbers.h"
19 #include <framework/logging/LogSystem.h>
20 #include <framework/logging/LogConfig.h>
21 #include <framework/dbobjects/MagneticField.h>
22 #include <framework/dbobjects/MagneticFieldComponentConstant.h>
23 #include <mdst/dbobjects/CollisionInvariantMass.h>
24 #include <mdst/dbobjects/CollisionBoostVector.h>
25 #include <mdst/dbobjects/BeamSpot.h>
26 #include <framework/database/DBStore.h>
33 class TestEventListener:
public ::testing::EmptyTestEventListener {
36 TestEventListener(
bool debug): ::testing::EmptyTestEventListener(), m_enableDebug{debug} {}
41 virtual void OnTestStart(const ::testing::TestInfo& test)
final override
47 std::string name = test.test_case_name();
55 collisionInvariantMass->setMass(10.5738932579, 0, 0);
58 collisionBoostVector->setBoost(TVector3(0.0414880886031, 0, 0.272492455429), TMatrixDSym(3));
64 virtual void OnTestEnd(const ::testing::TestInfo&)
final override
75 int main(
int argc,
char** argv)
77 ::testing::InitGoogleTest(&argc, argv);
78 ::testing::UnitTest& unit_test = *::testing::UnitTest::GetInstance();
80 for (
int i = 1; i < argc; ++i) {
81 if (std::string(argv[i]) ==
"--debug") debug =
true;
83 unit_test.listeners().Append(
new TestEventListener(debug));
84 return RUN_ALL_TESTS();
This class contains the beam spot position and size modeled as a gaussian distribution in space.
This class contains the measured average boost vector vec(beta) = (beta_x, beta_y,...
This class contains the measured average center-of-mass energy, which is equal to the invariant mass ...
void setDebugLevel(int debugLevel)
Configure the debug messaging level.
@ c_Debug
Debug: for code development.
void setLogLevel(ELogLevel logLevel)
Configure the log level.
void resetLogging()
Reset logging system to defaults: empty all log messages and reset connections to the default.
LogConfig * getLogConfig()
Returns global log system configuration.
static LogSystem & Instance()
Static method to get a reference to the LogSystem instance.
Describe one component of the Geometry.
static void initialize()
Initialize the random number generator with a unique random seed;.
static const double T
[tesla]
static DBStore & Instance()
Instance of a singleton DBStore.
void addConstantOverride(const std::string &name, TObject *obj, bool oneRun=false)
Add constant override payload.
int main(int argc, char **argv)
Run all tests.