|
ATLAS Offline Software
|
Go to the documentation of this file.
24 template <
class CONT,
class T>
25 void xiota (CONT&
v,
T x)
27 std::iota (
v.begin(),
v.end(),
x);
47 return StatusCode::SUCCESS;
59 auto jveccont = std::make_unique<JVecContainer>();
60 auto jvecauxcont = std::make_unique<JVecAuxContainer>();
61 jveccont->setStore (jvecauxcont.get());
63 for (
size_t i = 0;
i < 5;
i++) {
64 jveccont->push_back (std::make_unique<JVec>());
72 std::move (jvecauxcont)) );
76 auto jvecinfo = std::make_unique<JVec>();
77 auto jvecauxinfo = std::make_unique<JVecAuxInfo>();
78 jvecinfo->setStore (jvecauxinfo.get());
80 ctx.evt() + 1001, *jvecinfo) );
84 std::move (jvecauxinfo)) );
89 return StatusCode::SUCCESS;
95 size_t ndx,
JVec& jvec)
const
97 std::vector<int> vi (ndx%5);
101 std::vector<float> vf ((ndx+1)%5);
102 xiota (vf, ndx+200.5
f);
105 std::vector<std::string> vs ((ndx+2)%5);
106 for (
size_t i = 0;
i < vs.size();
i++) {
111 std::vector<ElementLink<CVec> > vl ((ndx+3)%5);
112 for (
size_t i = 0;
i < vl.size();
i++) {
113 if (!cvec1.
empty()) {
114 vl[
i].resetWithKeyAndIndex (
key1, (ndx+
i)%cvec1.
size());
119 return StatusCode::SUCCESS;
127 size_t ndx = ctx.evt();
128 for (
const JVec* jvec : *decor) {
129 std::vector<double> vd ((ndx+2)%5);
130 xiota (vd, ndx+300.5
f);
138 size_t ndx = ctx.evt() + 4;
139 std::vector<double> vd ((ndx+2)%5);
140 xiota (vd, ndx+400.5
f);
144 return StatusCode::SUCCESS;
void setSVec(const std::vector< std::string > &v)
SG::WriteDecorHandleKey< DMTest::JVec > m_jvecInfoDecorKey
void setIVec(const std::vector< int > &v)
SG::WriteDecorHandleKey< DMTest::JVecContainer > m_jvecDecorKey
void setLVec(const std::vector< ElementLink< CVec > > &v)
SG::ReadHandleKey< DMTest::CVec > m_cvecKey
For testing jagged vectors.
Handle class for recording to StoreGate.
::StatusCode StatusCode
StatusCode definition for legacy code.
Handle class for adding a decoration to an object.
Handle class for adding a decoration to an object.
StatusCode decorJVec(const EventContext &ctx) const
For testing jagged vectors.
SG::WriteHandleKey< DMTest::JVecContainer > m_jvecContainerKey
void setFVec(const std::vector< float > &v)
std::string to_string(const DetectorType &type)
For testing jagged vectors.
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
virtual StatusCode execute(const EventContext &ctx) const override
Algorithm event processing.
SG::WriteHandleKey< DMTest::JVec > m_jvecInfoKey
StatusCode fillJVec(const std::string &key1, const CVec &cvec1, size_t ndx, JVec &jvec) const
For testing jagged vectors.
size_type size() const noexcept
Returns the number of elements in the collection.
bool empty() const noexcept
Returns true if the collection is empty.
virtual StatusCode initialize() override
Algorithm initialization; called at the beginning of the job.