34 #include "tbb/concurrent_vector.h"
93 if (iTrans ==
"IsStop") {
96 if (iTrans ==
"IsFile") {
99 if (iTrans ==
"IsRun") {
102 if (iTrans ==
"IsLumi") {
105 if (iTrans ==
"IsEvent") {
114 std::vector<std::tuple<Phase, edm::EventID, int>> expectedValues(
115 std::vector<std::pair<Transition, edm::EventID>>
const& iTrans,
int iNStreams) {
116 std::vector<std::tuple<Phase, edm::EventID, int>> returnValue;
117 returnValue.reserve(iTrans.size());
122 for (
auto const& tran : iTrans) {
123 switch (tran.first) {
129 if (
lastRun.run() != maxIDValue) {
131 for (
int i = 0;
i < iNStreams; ++
i) {
138 for (
int i = 0;
i < iNStreams; ++
i) {
149 for (
int i = 0;
i < iNStreams; ++
i) {
156 for (
int i = 0;
i < iNStreams; ++
i) {
174 for (
int i = 0;
i < iNStreams; ++
i) {
179 if (
lastRun.run() != maxIDValue) {
181 for (
int i = 0;
i < iNStreams; ++
i) {
194 p.getUntrackedParameter<
EventID>(
"id"));
232 desc.setComment(
"Checks that the transitions specified occur during the job.");
237 desc.addVPSetUntracked(
"transitions", trans, {{}});
238 descriptions.
add(
"CheckTransitions",
desc);
246 std::vector<std::tuple<Phase, edm::EventID, int>> orderedSeen;
250 auto s = std::get<2>(
i);
251 if (std::get<1>(
i).
event() > 0) {
254 orderedSeen.emplace_back(std::get<0>(
i), std::get<1>(
i),
s);
256 std::sort(orderedSeen.begin(), orderedSeen.end());
258 auto orderedExpected = expectedV;
259 std::sort(orderedExpected.begin(), orderedExpected.end());
264 auto itOS = orderedSeen.begin();
265 for (
auto itOE = orderedExpected.begin(); itOE != orderedExpected.end(); ++itOE) {
266 if (itOS == orderedSeen.end()) {
269 if (*itOE != *itOS) {
270 auto syncOE = std::get<1>(*itOE);
271 auto syncOS = std::get<1>(*itOS);
272 std::cout <<
"Different ordering " << syncOE <<
" " << std::get<2>(*itOE) <<
"\n"
273 <<
" " << syncOS <<
" " << std::get<2>(*itOS) <<
"\n";
279 if (orderedSeen.size() != orderedExpected.size()) {
280 std::cout <<
"Wrong number of transition " << orderedSeen.size() <<
" " << orderedExpected.size() << std::endl;