Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:27:57

0001 // -*- C++ -*-
0002 //
0003 // Package:     FWCore/Framework
0004 // Class  :     LuminosityBlockProcessingStatus
0005 //
0006 // Implementation:
0007 //     [Notes on implementation]
0008 //
0009 // Original Author:  Chris Jones
0010 //         Created:  Thu, 11 Jan 2018 16:41:46 GMT
0011 //
0012 
0013 // system include files
0014 
0015 // user include files
0016 #include "LuminosityBlockProcessingStatus.h"
0017 #include "FWCore/Framework/interface/LuminosityBlockPrincipal.h"
0018 
0019 namespace edm {
0020   void LuminosityBlockProcessingStatus::resetResources() {
0021     endIOVWaitingTasks_.doneWaiting(std::exception_ptr{});
0022     for (auto& iter : eventSetupImpls_) {
0023       iter.reset();
0024     }
0025     resumeGlobalLumiQueue();
0026     run_.reset();
0027   }
0028 
0029   void LuminosityBlockProcessingStatus::setEndTime() {
0030     if (2 != endTimeSetStatus_) {
0031       //not already set
0032       char expected = 0;
0033       if (endTimeSetStatus_.compare_exchange_strong(expected, 1)) {
0034         lumiPrincipal_->setEndTime(endTime_);
0035         endTimeSetStatus_.store(2);
0036       } else {
0037         //wait until time is set
0038         while (2 != endTimeSetStatus_.load()) {
0039         }
0040       }
0041     }
0042   }
0043 }  // namespace edm