Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 11:02:57

0001 #include "ThingAlgorithm.h"
0002 #include "DataFormats/TestObjects/interface/Thing.h"
0003 
0004 namespace edmtest {
0005   void ThingAlgorithm::run(ThingCollection& thingCollection) const {
0006     thingCollection.reserve(nThings_);
0007     auto offset = offset_.fetch_add(offsetDelta_);
0008     int nItems = nThings_;
0009     if (grow_) {
0010       nItems *= offset;
0011     }
0012     for (int i = 0; i < nItems; ++i) {
0013       Thing tc;
0014       tc.a = i + offset;
0015       thingCollection.push_back(tc);
0016     }
0017   }
0018 }  // namespace edmtest