src
FWCore
Integration
plugins
ThingAlgorithm.cc
Go to the documentation of this file.
1
#include "
ThingAlgorithm.h
"
2
#include "DataFormats/TestObjects/interface/Thing.h"
3
4
namespace
edmtest
{
5
void
ThingAlgorithm::run
(ThingCollection& thingCollection)
const
{
6
thingCollection.reserve(
nThings_
);
7
auto
offset
=
offset_
.fetch_add(
offsetDelta_
);
8
int
nItems =
nThings_
;
9
if
(
grow_
) {
10
nItems *=
offset
;
11
}
12
for
(
int
i
= 0;
i
< nItems; ++
i
) {
13
Thing tc;
14
tc.a =
i
+
offset
;
15
thingCollection.push_back(tc);
16
}
17
}
18
}
// namespace edmtest
mps_fire.i
i
Definition:
mps_fire.py:429
ThingAlgorithm.h
edmtest
Definition:
AlignPCLThresholdsReader.cc:15
edmtest::ThingAlgorithm::nThings_
const int nThings_
Definition:
ThingAlgorithm.h:23
edmtest::ThingAlgorithm::grow_
const bool grow_
Definition:
ThingAlgorithm.h:24
edmtest::ThingAlgorithm::offset_
std::atomic< long > offset_
Definition:
ThingAlgorithm.h:21
edmtest::ThingAlgorithm::run
void run(ThingCollection &thingCollection) const
Definition:
ThingAlgorithm.cc:5
edmtest::ThingAlgorithm::offsetDelta_
const long offsetDelta_
Definition:
ThingAlgorithm.h:22
hltrates_dqm_sourceclient-live_cfg.offset
offset
Definition:
hltrates_dqm_sourceclient-live_cfg.py:83
Generated for CMSSW Reference Manual by
1.8.14