36 return StatusCode::SUCCESS;
49 auto plinkscont = std::make_unique<PLinksContainer>();
50 auto plinksauxcont = std::make_unique<PLinksAuxContainer>();
51 plinkscont->setStore (plinksauxcont.get());
52 for (
size_t i = 0; i < 5; i++) {
53 plinkscont->push_back (std::make_unique<PLinks>());
57 *plinkscont->back()) );
62 std::move (plinksauxcont)) );
66 auto plinksinfo = std::make_unique<PLinks>();
67 auto plinksauxinfo = std::make_unique<PLinksAuxInfo>();
68 plinksinfo->setStore (plinksauxinfo.get());
76 std::move (plinksauxinfo)) );
83 return StatusCode::SUCCESS;
89 const std::string& key2,
91 size_t ndx)
const ->
EL
93 if ((ndx%3) == 0 && !cvec1.empty()) {
94 return EL (key1, (ndx % cvec1.size()));
96 else if ((ndx%3) == 1 && !cvec2.empty()) {
97 return EL (key2, (ndx % cvec2.size()));
106 const std::string& key2,
113 for (
size_t i = 0; i < ndx%5; ++i) {
114 v.emplace_back (
makeLink (key1, cvec1, key2, cvec2, ndx+i+1));
117 return StatusCode::SUCCESS;
122 const std::string& key1,
124 const std::string& key2,
125 const CVec& cvec2)
const
129 size_t ndx = ctx.evt();
130 for (
const PLinks* plinks : *decor) {
131 decor (*plinks) =
makeLink (key1, cvec1, key2, cvec2, ndx);
138 size_t ndx = ctx.evt() + 3;
139 for (
const PLinks* plinks : *decor) {
141 for (
size_t i = 0; i < ndx%5; ++i) {
142 v.emplace_back (
makeLink (key1, cvec1, key2, cvec2, ndx+i+1));
151 size_t ndx = ctx.evt() + 4;
152 decor (*decor) =
makeLink (key1, cvec1, key2, cvec2, ndx);
157 size_t ndx = ctx.evt() + 7;
159 for (
size_t i = 0; i < ndx%5; ++i) {
160 v.emplace_back (
makeLink (key1, cvec1, key2, cvec2, ndx+i+1));
165 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
For testing packed links.
For testing packed links.
Handle class for reading from StoreGate.
Handle class for adding a decoration to an object.
Handle class for recording to StoreGate.
void setPLink(const ElementLink< CVec > &l)
Set the single link.
void setVLinks(const std::vector< ElementLink< CVec > > &v)
Set the vector of links.
SG::WriteDecorHandleKey< DMTest::PLinks > m_plinksInfoDecorVLinksKey
SG::WriteHandleKey< DMTest::PLinks > m_plinksInfoKey
StatusCode decorPLinks(const EventContext &ctx, const std::string &key1, const CVec &cvec1, const std::string &key2, const CVec &cvec2) const
StatusCode fillPLinks(const std::string &key1, const CVec &cvec1, const std::string &key2, const CVec &cvec2, size_t ndx, PLinks &plinks) const
SG::WriteDecorHandleKey< DMTest::PLinks > m_plinksInfoDecorLinkKey
SG::ReadHandleKey< DMTest::CVec > m_cvecKey
SG::WriteDecorHandleKey< DMTest::PLinksContainer > m_plinksDecorLinkKey
virtual StatusCode execute(const EventContext &ctx) const override
Algorithm event processing.
SG::WriteHandleKey< DMTest::PLinksContainer > m_plinksContainerKey
EL makeLink(const std::string &key1, const CVec &cvec1, const std::string &key2, const CVec &cvec2, size_t ndx) const
SG::WriteDecorHandleKey< DMTest::PLinksContainer > m_plinksDecorVLinksKey
SG::ReadHandleKey< DMTest::CVec > m_ctrigKey
virtual StatusCode initialize() override
Algorithm initialization; called at the beginning of the job.
Handle class for adding a decoration to an object.
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
This module defines the arguments passed from the BATCH driver to the BATCH worker.
Test writing packed links.