ATLAS Offline Software
Loading...
Searching...
No Matches
xAODTestThinJVec.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
10
11
12#include "xAODTestThinJVec.h"
14
15
16namespace DMTest {
17
18
23{
25 return StatusCode::SUCCESS;
26}
27
28
32StatusCode xAODTestThinJVec::execute (const EventContext& ctx) const
33{
35
36 unsigned int evt = ctx.evt();
37
38 jvec.keepAll();
39 for (size_t i = 0; i < jvec->size(); i++) {
40 if (((evt ^ m_mask) & (1 << (i%4))) == 0) {
41 jvec.thin(i);
42 }
43 }
44
45 return StatusCode::SUCCESS;
46}
47
48
49} // namespace DMTest
#define ATH_CHECK
Evaluate an expression and check for errors.
Handle for requesting thinning for a data object.
virtual StatusCode initialize() override
Algorithm initialization; called at the beginning of the job.
UnsignedIntegerProperty m_mask
virtual StatusCode execute(const EventContext &ctx) const override
Algorithm event processing.
SG::ThinningHandleKey< DMTest::JVecContainer > m_jvecContainerKey
void thin(size_t ndx)
Mark that index ndx in the container should be thinned away.
void keepAll()
Mark that all elements should be kept (not thinned).
Handle for requesting thinning for a data object.
Definition B.h:23
Thin JVecContainer objects.