40 return StatusCode::SUCCESS;
48 std::lock_guard<CallMutex> lockGuard(
m_callLock);
52 for (
const auto& tool : m_helperTools) {
53 if (!tool->preNext().isSuccess()) {
61 return StatusCode::FAILURE;
66 return StatusCode::FAILURE;
72 return StatusCode::FAILURE;
75 StatusCode status = StatusCode::SUCCESS;
76 for (
const auto& tool : m_helperTools) {
77 StatusCode toolStatus = tool->postNext();
78 if (toolStatus.isRecoverable()) {
79 ATH_MSG_INFO(
"Request skipping event from: " << tool->name());
80 if (status.isSuccess()) {
81 status = StatusCode::RECOVERABLE;
83 }
else if (toolStatus.isFailure()) {
85 status = StatusCode::FAILURE;
88 if (status.isRecoverable()) {
90 }
else if (status.isFailure()) {
100 return StatusCode::SUCCESS;
109 for (
int i = 0; i < jump; i++) {
110 if (!
next(ctxt).isSuccess()) {
111 return StatusCode::FAILURE;
114 return StatusCode::SUCCESS;
117 return StatusCode::FAILURE;
128 return StatusCode::SUCCESS;
140 ATH_MSG_WARNING(
"Fewer secondary input events than primary input events. Expect trouble!");
149 ATH_MSG_DEBUG(
"DoubleEventSelectorAthenaPool::recordAttributeList");
154 const coral::AttributeList& attrList = m_headerIterator->currentRow().attributeList();
156 std::unique_ptr<AthenaAttributeList> athAttrList{};
161 athAttrList = std::make_unique<AthenaAttributeList>();
170 athAttrList = std::make_unique<AthenaAttributeList>(attrList);
180 athAttrList->extend(
"hasSecondaryInput",
"bool");
181 (*athAttrList)[
"hasSecondaryInput"].data<
bool>() =
true;
184 ATH_CHECK(wh.record(std::move(athAttrList)));
186 return StatusCode::SUCCESS;
200 if (inc.type() == IncidentType::BeginProcessing) {
211 ATH_MSG_WARNING(
"could not read event source ID from incident event context with key EventSelector");
215 ATH_MSG_DEBUG(
"** MN Incident handler " << inc.type() <<
" Event source ID=" << fid1 );
216 if( inc.type() == IncidentType::BeginProcessing ) {
218 m_activeEventsPerSource[fid1]++;
219 }
else if( inc.type() == IncidentType::EndProcessing ) {
220 m_activeEventsPerSource[fid1]--;
224 if( msgLvl(MSG::DEBUG) ) {
225 for(
auto& source: m_activeEventsPerSource )
226 msg(MSG::DEBUG) <<
"SourceID: " << source.first <<
" active events: " << source.second <<
endmsg;
236 if (inc.type() == IncidentType::BeginProcessing) {
247 ATH_MSG_WARNING(
"could not read event source ID from incident event context with key SecondaryEventSelector");
251 ATH_MSG_DEBUG(
"** MN Incident handler " << inc.type() <<
" Event source ID=" << fid2 );
252 if( inc.type() == IncidentType::BeginProcessing ) {
254 m_activeEventsPerSource[fid2]++;
255 }
else if( inc.type() == IncidentType::EndProcessing ) {
256 m_activeEventsPerSource[fid2]--;
260 if( msgLvl(MSG::DEBUG) ) {
261 for(
auto& source: m_activeEventsPerSource )
262 msg(MSG::DEBUG) <<
"SourceID: " << source.first <<
" active events: " << source.second <<
endmsg;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
This file contains the class definition for the DoubleEventSelectorAthenaPool class.
An AttributeList represents a logical row of attributes in a metadata table.
SG::SlotSpecificObj< SG::SourceID > m_sourceID2
virtual StatusCode next(IEvtSelector::Context &ctxt) const override
Gaudi::Property< std::string > m_secondaryAttrListSuffix
bool m_secondaryByteStream
virtual StatusCode seek(Context &ctxt, int evtNum) const override
Seek to a given event number.
virtual ~DoubleEventSelectorAthenaPool()
Destructor.
virtual void handle(const Incident &incident) override
Incident service handle listening for BeginProcessing and EndProcessing.
virtual StatusCode recordAttributeList() const override
Record AttributeList in StoreGate.
SG::SlotSpecificObj< SG::SourceID > m_sourceID1
virtual StatusCode initialize() override
Initialize function.
virtual int size(Context &ctxt) const override
Return the size of the collection.
ServiceHandle< ISecondaryEventSelector > m_secondarySelector
EventSelectorAthenaPool(const std::string &name, ISvcLocator *pSvcLocator)
Standard Service Constructor.
virtual StatusCode nextWithSkip(IEvtSelector::Context &ctxt) const override
Go to next event and skip if necessary.
virtual StatusCode initialize() override
Required of all Gaudi Services.
friend class DoubleEventSelectorAthenaPool
make the DoubleEventSelectorAthenaPool a friend so it can access the internal EventSelectorAthenaPool...
StoreGateSvc * eventStore() const
Return pointer to active event SG.
ToolHandle< IAthenaSelectorTool > m_counterTool
virtual StatusCode fillAttributeList(coral::AttributeList *attrList, const std::string &suffix, bool copySource) const override
Fill AttributeList with specific items from the selector and a suffix.
std::string m_attrListKey
AttributeList SG key.
virtual StatusCode seek(Context &ctxt, int evtnum) const override
Seek to a given event number.
virtual bool disconnectIfFinished(const SG::SourceID &fid) const override
std::atomic_int m_evtCount
virtual int size(Context &ctxt) const override
Return the size of the collection.
const ExtendedEventContext & getExtendedEventContext(const EventContext &ctx)
Retrieve an extended context from a context object.
bool hasExtendedEventContext(const EventContext &ctx)
Test whether a context object has an extended context installed.