36 void UnitTestAlgXAOD ::
37 testInvariant ()
const
57 if (m_state !=
State::START && m_state != State::HIST_FINALIZED)
73 return StatusCode::SUCCESS;
84 ANA_CHECK (testWorkerState (
true, {State::HIST_INITIALIZED, State::INITIALIZED, State::INPUT_CHANGED}));
85 if (m_state == State::HIST_INITIALIZED)
86 m_state = State::INPUT_CHANGED;
87 return StatusCode::SUCCESS;
99 m_state = State::HIST_INITIALIZED;
100 return StatusCode::SUCCESS;
111 ANA_CHECK (testWorkerState (
true, {State::INPUT_CHANGED}));
112 m_state = State::INITIALIZED;
113 return StatusCode::SUCCESS;
124 ANA_CHECK (testWorkerState (
false, {State::HIST_INITIALIZED, State::INPUT_CHANGED, State::INITIALIZED}));
134 return StatusCode::FAILURE;
140 return StatusCode::SUCCESS;
151 ANA_CHECK (testWorkerState (
true, {State::INITIALIZED}));
152 return StatusCode::SUCCESS;
163 ANA_CHECK (testWorkerState (
false, {State::INITIALIZED}));
164 m_state = State::FINALIZED;
165 return StatusCode::SUCCESS;
176 ANA_CHECK (testWorkerState (
false, {State::FINALIZED, State::HIST_FINALIZED}));
177 m_state = State::HIST_FINALIZED;
178 return StatusCode::SUCCESS;
184 testWorkerState (
bool validEvent, std::set<State> validStates)
const
186 if (validStates.find (m_state) == validStates.end())
189 return StatusCode::FAILURE;
192 if (wk()->xaodEvent() ==
nullptr)
195 return StatusCode::FAILURE;
198 if (wk()->xaodStore() ==
nullptr)
201 return StatusCode::FAILURE;
206 if (wk()->
tree() ==
nullptr)
209 return StatusCode::FAILURE;
212 if (wk()->treeEntry() < 0 ||
216 return StatusCode::FAILURE;
222 return StatusCode::SUCCESS;