CMS 3D CMS Logo

LuminosityBlockProcessingStatus.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: FWCore/Framework
4 // Class : LuminosityBlockProcessingStatus
5 //
6 // Implementation:
7 // [Notes on implementation]
8 //
9 // Original Author: Chris Jones
10 // Created: Thu, 11 Jan 2018 16:41:46 GMT
11 //
12 
15 
16 namespace edm {
18  endIOVWaitingTasks_.doneWaiting(std::exception_ptr{});
19  for (auto& iter : eventSetupImpls_) {
20  iter.reset();
21  }
23  }
24 
27  }
28 
31  return false;
32 
33  bool changed = false;
34  do {
35  auto expected = State::kRunning;
36  changed = state_.compare_exchange_strong(expected, State::kUpdating);
37  if (expected == State::kNoMoreEvents)
38  return false;
39  } while (changed == false);
40 
43  return true;
44  }
45 
47  bool changed = false;
48  do {
49  auto expected = State::kRunning;
50  changed = state_.compare_exchange_strong(expected, State::kUpdating);
51  assert(expected != State::kNoMoreEvents);
52  } while (changed == false);
55  }
56 
58  constexpr char kUnset = 0;
59  constexpr char kSetting = 1;
60  constexpr char kSet = 2;
61 
62  if (endTimeSetStatus_ != kSet) {
63  //not already set
64  char expected = kUnset;
65  if (endTimeSetStatus_.compare_exchange_strong(expected, kSetting)) {
66  lumiPrincipal_->setEndTime(endTime_);
67  endTimeSetStatus_.store(kSet);
68  } else {
69  //wait until time is set
70  while (endTimeSetStatus_.load() != kSet) {
71  }
72  }
73  }
74  }
75 } // namespace edm
assert(be >=bs)
const char * kSet
void doneWaiting(std::exception_ptr iPtr)
Signals that the resource is now available and tasks should be spawned.
std::shared_ptr< LuminosityBlockPrincipal > lumiPrincipal_
std::vector< std::shared_ptr< const EventSetupImpl > > eventSetupImpls_
constexpr unsigned int kUnset
HLT enums.
def move(src, dest)
Definition: eostools.py:511