ATLAS Offline Software
xAODTestThinCVec.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3  */
12 #include "xAODTestThinCVec.h"
14 
15 
16 namespace DMTest {
17 
18 
23 {
24  ATH_CHECK( m_cvecKey.initialize (m_stream) );
25  return StatusCode::SUCCESS;
26 }
27 
28 
32 StatusCode xAODTestThinCVec::execute (const EventContext& ctx) const
33 {
35 
36  unsigned int evt = ctx.evt();
37 
38  cvec.keepAll();
39  for (size_t i = 0; i < cvec->size(); i++) {
40  if (((evt ^ m_mask) & (1 << (i%4))) == 0) {
41  cvec.thin(i);
42  }
43  }
44 
45  return StatusCode::SUCCESS;
46 }
47 
48 
49 } // namespace DMTest
DMTest::xAODTestThinCVec::execute
virtual StatusCode execute(const EventContext &ctx) const override
Algorithm event processing.
Definition: xAODTestThinCVec.cxx:32
xAODTestThinCVec.h
Thin CVec objects.
DMTest::xAODTestThinCVec::m_cvecKey
SG::ThinningHandleKey< DMTest::CVec > m_cvecKey
Definition: xAODTestThinCVec.h:49
SG::ThinningHandleBase::keepAll
void keepAll()
Mark that all elements should be kept (not thinned).
Definition: ThinningHandleBase.cxx:145
ThinningHandle.h
Handle for requesting thinning for a data object.
DMTest::xAODTestThinCVec::initialize
virtual StatusCode initialize() override
Algorithm initialization; called at the beginning of the job.
Definition: xAODTestThinCVec.cxx:22
LArG4FSStartPointFilter.evt
evt
Definition: LArG4FSStartPointFilter.py:42
DMTest::xAODTestThinCVec::m_stream
StringProperty m_stream
Definition: xAODTestThinCVec.h:52
SG::ThinningHandle
Handle for requesting thinning for a data object.
Definition: ThinningHandle.h:84
lumiFormat.i
int i
Definition: lumiFormat.py:85
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
SG::ThinningHandleBase::thin
void thin(size_t ndx)
Mark that index ndx in the container should be thinned away.
Definition: ThinningHandleBase.cxx:57
DMTest::xAODTestThinCVec::m_mask
UnsignedIntegerProperty m_mask
Definition: xAODTestThinCVec.h:55
DMTest
Definition: B.h:23