CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
edm::LuminosityBlockProcessingStatus Class Reference

#include <LuminosityBlockProcessingStatus.h>

Public Member Functions

bool cleaningUpAfterException () const
 
bool continuingLumi () const
 
bool didGlobalBeginSucceed () const
 
void endLumi ()
 
void globalBeginDidSucceed ()
 
void haveContinuedLumi ()
 
bool haveStartedNextLumi () const
 
bool isLumiEnding () const
 
edm::Timestamp const & lastTimestamp () const
 
 LuminosityBlockProcessingStatus (EventProcessor *iEP, unsigned int iNStreams, std::shared_ptr< void > iRunResource)
 
std::shared_ptr< LuminosityBlockPrincipal > & lumiPrincipal ()
 
void needToContinueLumi ()
 
const IOVSyncValue nextSyncValue () const
 
void noExceptionHappened ()
 
void resumeGlobalLumiQueue ()
 
std::shared_ptr< void > const & runResource () const
 
void setEndTime ()
 
void setNextSyncValue (IOVSyncValue iValue)
 
void setResumer (LimitedTaskQueue::Resumer iResumer)
 
void startNextLumi ()
 
void startProcessingEvents ()
 
void stopProcessingEvents ()
 
bool streamFinishedLumi ()
 
void updateLastTimestamp (edm::Timestamp const &iTime)
 
bool wasEventProcessingStopped () const
 

Private Attributes

bool cleaningUpAfterException_ {true}
 
bool continuingLumi_ {false}
 
edm::Timestamp endTime_ {}
 
std::atomic< char > endTimeSetStatus_ {0}
 
EventProcessoreventProcessor_ = nullptr
 
bool globalBeginSucceeded_ {false}
 
LimitedTaskQueue::Resumer globalLumiQueueResumer_
 
bool lumiEnding_ {false}
 
std::shared_ptr< LuminosityBlockPrincipallumiPrincipal_
 
IOVSyncValue nextSyncValue_
 
std::atomic< unsigned int > nStreamsStillProcessingLumi_ {0}
 
std::shared_ptr< void > run_
 
bool startedNextLumi_ {false}
 
bool stopProcessingEvents_ {false}
 

Detailed Description

Definition at line 39 of file LuminosityBlockProcessingStatus.h.

Constructor & Destructor Documentation

edm::LuminosityBlockProcessingStatus::LuminosityBlockProcessingStatus ( EventProcessor iEP,
unsigned int  iNStreams,
std::shared_ptr< void >  iRunResource 
)
inline

Definition at line 43 of file LuminosityBlockProcessingStatus.h.

43  :
44  run_(std::move(iRunResource)) , eventProcessor_(iEP), nStreamsStillProcessingLumi_(iNStreams){}
def move(src, dest)
Definition: eostools.py:510

Member Function Documentation

bool edm::LuminosityBlockProcessingStatus::cleaningUpAfterException ( ) const
inline
bool edm::LuminosityBlockProcessingStatus::continuingLumi ( ) const
inline
bool edm::LuminosityBlockProcessingStatus::didGlobalBeginSucceed ( ) const
inline
void edm::LuminosityBlockProcessingStatus::endLumi ( )
inline
void edm::LuminosityBlockProcessingStatus::globalBeginDidSucceed ( )
inline
void edm::LuminosityBlockProcessingStatus::haveContinuedLumi ( )
inline
bool edm::LuminosityBlockProcessingStatus::haveStartedNextLumi ( ) const
inline
bool edm::LuminosityBlockProcessingStatus::isLumiEnding ( ) const
inline
edm::Timestamp const& edm::LuminosityBlockProcessingStatus::lastTimestamp ( ) const
inline

Definition at line 85 of file LuminosityBlockProcessingStatus.h.

References endTime_.

std::shared_ptr<LuminosityBlockPrincipal>& edm::LuminosityBlockProcessingStatus::lumiPrincipal ( )
inline
void edm::LuminosityBlockProcessingStatus::needToContinueLumi ( )
inline
const IOVSyncValue edm::LuminosityBlockProcessingStatus::nextSyncValue ( ) const
inline
void edm::LuminosityBlockProcessingStatus::noExceptionHappened ( )
inline
void edm::LuminosityBlockProcessingStatus::resumeGlobalLumiQueue ( )
inline

Definition at line 51 of file LuminosityBlockProcessingStatus.h.

References globalLumiQueueResumer_, lumiPrincipal_, and edm::LimitedTaskQueue::Resumer::resume().

51  {
52  //free lumi for next usage
53  lumiPrincipal_.reset();
55  }
std::shared_ptr< LuminosityBlockPrincipal > lumiPrincipal_
std::shared_ptr<void> const& edm::LuminosityBlockProcessingStatus::runResource ( ) const
inline

Definition at line 93 of file LuminosityBlockProcessingStatus.h.

References run_, and setEndTime().

93 {return run_;}
void LuminosityBlockProcessingStatus::setEndTime ( )

Definition at line 20 of file LuminosityBlockProcessingStatus.cc.

References endTime_, endTimeSetStatus_, and lumiPrincipal_.

Referenced by runResource().

20  {
21  if(2 != endTimeSetStatus_) {
22  //not already set
23  char expected = 0;
24  if(endTimeSetStatus_.compare_exchange_strong(expected,1)) {
25  lumiPrincipal_->setEndTime(endTime_);
26  endTimeSetStatus_.store(2);
27  } else {
28  //wait until time is set
29  while( 2 != endTimeSetStatus_.load()) {}
30  }
31  }
32  }
std::shared_ptr< LuminosityBlockPrincipal > lumiPrincipal_
void edm::LuminosityBlockProcessingStatus::setNextSyncValue ( IOVSyncValue  iValue)
inline

Definition at line 87 of file LuminosityBlockProcessingStatus.h.

References eostools::move(), and nextSyncValue_.

Referenced by edm::EventProcessor::readNextEventForStream().

87  {
88  nextSyncValue_ = std::move(iValue);
89  }
def move(src, dest)
Definition: eostools.py:510
void edm::LuminosityBlockProcessingStatus::setResumer ( LimitedTaskQueue::Resumer  iResumer)
inline

Definition at line 48 of file LuminosityBlockProcessingStatus.h.

References globalLumiQueueResumer_, and eostools::move().

48  {
50  }
def move(src, dest)
Definition: eostools.py:510
void edm::LuminosityBlockProcessingStatus::startNextLumi ( )
inline
void edm::LuminosityBlockProcessingStatus::startProcessingEvents ( )
inline
void edm::LuminosityBlockProcessingStatus::stopProcessingEvents ( )
inline
bool edm::LuminosityBlockProcessingStatus::streamFinishedLumi ( )
inline

Definition at line 57 of file LuminosityBlockProcessingStatus.h.

References nStreamsStillProcessingLumi_.

57  {
58  return 0 == (--nStreamsStillProcessingLumi_);
59  }
void edm::LuminosityBlockProcessingStatus::updateLastTimestamp ( edm::Timestamp const &  iTime)
inline

Definition at line 82 of file LuminosityBlockProcessingStatus.h.

References endTime_.

82  {
83  if (iTime> endTime_) { endTime_ = iTime;}
84  }
bool edm::LuminosityBlockProcessingStatus::wasEventProcessingStopped ( ) const
inline

Member Data Documentation

bool edm::LuminosityBlockProcessingStatus::cleaningUpAfterException_ {true}
private
bool edm::LuminosityBlockProcessingStatus::continuingLumi_ {false}
private
edm::Timestamp edm::LuminosityBlockProcessingStatus::endTime_ {}
private
std::atomic<char> edm::LuminosityBlockProcessingStatus::endTimeSetStatus_ {0}
private

Definition at line 106 of file LuminosityBlockProcessingStatus.h.

Referenced by setEndTime().

EventProcessor* edm::LuminosityBlockProcessingStatus::eventProcessor_ = nullptr
private

Definition at line 102 of file LuminosityBlockProcessingStatus.h.

bool edm::LuminosityBlockProcessingStatus::globalBeginSucceeded_ {false}
private
LimitedTaskQueue::Resumer edm::LuminosityBlockProcessingStatus::globalLumiQueueResumer_
private

Definition at line 101 of file LuminosityBlockProcessingStatus.h.

Referenced by resumeGlobalLumiQueue(), and setResumer().

bool edm::LuminosityBlockProcessingStatus::lumiEnding_ {false}
private

Definition at line 108 of file LuminosityBlockProcessingStatus.h.

Referenced by endLumi(), and isLumiEnding().

std::shared_ptr<LuminosityBlockPrincipal> edm::LuminosityBlockProcessingStatus::lumiPrincipal_
private
IOVSyncValue edm::LuminosityBlockProcessingStatus::nextSyncValue_
private

Definition at line 103 of file LuminosityBlockProcessingStatus.h.

Referenced by nextSyncValue(), and setNextSyncValue().

std::atomic<unsigned int> edm::LuminosityBlockProcessingStatus::nStreamsStillProcessingLumi_ {0}
private

Definition at line 104 of file LuminosityBlockProcessingStatus.h.

Referenced by streamFinishedLumi().

std::shared_ptr<void> edm::LuminosityBlockProcessingStatus::run_
private

Definition at line 100 of file LuminosityBlockProcessingStatus.h.

Referenced by runResource().

bool edm::LuminosityBlockProcessingStatus::startedNextLumi_ {false}
private

Definition at line 110 of file LuminosityBlockProcessingStatus.h.

Referenced by haveStartedNextLumi(), and startNextLumi().

bool edm::LuminosityBlockProcessingStatus::stopProcessingEvents_ {false}
private