ATLAS Offline Software
EvenEventsSelectorTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
11 
12 //___________________________________________________________________________
14 }
15 
16 //__________________________________________________________________________
18  ATH_MSG_INFO("EvenEventsSelectorTool::postNext");
19  StatusCode retc = StatusCode::SUCCESS;
20  const AthenaAttributeList* attrList{nullptr};
21  ATH_MSG_INFO(evtStore()->dump());
22  StatusCode sc = evtStore()->retrieve(attrList,"EventInfoAtts");
23  if (sc.isSuccess()) {
24  ATH_MSG_INFO("Found attribute list");
25  // dump spec
26  coral::AttributeList::const_iterator it = attrList->begin();
27  while (it != attrList->end()) {
28  //ATH_MSG_INFO("Spec element " << it->specification().name());
29  std::ostringstream value;
30  it->toOutputStream(value);
31  ATH_MSG_INFO("Spec element " << value.str());
32  ++it;
33  }
34  // take only even events
35  if ((*attrList)["EventNumber"].data<unsigned long long>()%2!=0) {
36  retc = StatusCode::RECOVERABLE;
37  ATH_MSG_INFO("Rejecting event");
38  }
39  }
40  else {
41  ATH_MSG_INFO("Could not find attribute list");
42  }
43  return retc;
44 }
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
skel.it
it
Definition: skel.GENtoEVGEN.py:407
athena.value
value
Definition: athena.py:124
AthenaAttributeList.h
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
run_Egamma1_LArStrip_Fex.dump
dump
Definition: run_Egamma1_LArStrip_Fex.py:87
EvenEventsSelectorTool::~EvenEventsSelectorTool
virtual ~EvenEventsSelectorTool()
Destructor.
Definition: EvenEventsSelectorTool.cxx:13
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthenaAttributeList
An AttributeList represents a logical row of attributes in a metadata table. The name and type of eac...
Definition: PersistentDataModel/PersistentDataModel/AthenaAttributeList.h:45
EvenEventsSelectorTool.h
This file contains the class definition for the EvenEventsSelectorTool class.
EvenEventsSelectorTool::postNext
virtual StatusCode postNext() const override
Definition: EvenEventsSelectorTool.cxx:17