ATLAS Offline Software
Loading...
Searching...
No Matches
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
8
11
12//___________________________________________________________________________
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}
#define ATH_MSG_INFO(x)
This file contains the class definition for the EvenEventsSelectorTool class.
char data[hepevt_bytes_allocation_ATLAS]
Definition HepEvt.cxx:11
static Double_t sc
An AttributeList represents a logical row of attributes in a metadata table.
virtual StatusCode postNext() const override
virtual ~EvenEventsSelectorTool()
Destructor.
-event-from-file