/* This file is part of MAUS: http://micewww.pp.rl.ac.uk/projects/maus
*
* MAUS is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* MAUS is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with MAUS. If not, see .
*
*/
#include "gtest/gtest.h"
#include "src/common_cpp/Simulation/MAUSGeant4Manager.hh"
#include "src/common_cpp/Simulation/MAUSEventAction.hh"
#include "Utils/Exception.hh"
using MAUS::MAUSEventAction;
using MAUS::MAUSGeant4Manager;
using MAUS::MCEvent;
using MAUS::Track;
using MAUS::VirtualHit;
TEST(MAUSEventActionTest, SetGetEventsTest) {
MAUSEventAction* _eventAct
= MAUSGeant4Manager::GetInstance()->GetEventAction();
std::vector* events = new std::vector();
EXPECT_NO_THROW(_eventAct->SetEvents(events));
EXPECT_EQ(events, _eventAct->GetEvents());
}
TEST(MAUSEventActionTest, BeginOfEventActionTest) {
// check that we clear the hits at BeginOfEventAction
MAUSGeant4Manager* _g4 = MAUSGeant4Manager::GetInstance();
_g4->GetEventAction()->SetEvents(new std::vector());
std::vector