ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Event
ByteStreamTest
src
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
9
#include "
EvenEventsSelectorTool.h
"
10
#include "
AthenaPoolUtilities/AthenaAttributeList.h
"
11
12
//___________________________________________________________________________
13
EvenEventsSelectorTool::~EvenEventsSelectorTool
() {
14
}
15
16
//__________________________________________________________________________
17
StatusCode
EvenEventsSelectorTool::postNext
()
const
{
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:45
AthenaAttributeList.h
EvenEventsSelectorTool.h
This file contains the class definition for the EvenEventsSelectorTool class.
sc
static Double_t sc
Definition
LArPhysWaveHECTool.cxx:37
AthenaAttributeList
An AttributeList represents a logical row of attributes in a metadata table.
Definition
PersistentDataModel/PersistentDataModel/AthenaAttributeList.h:46
EvenEventsSelectorTool::postNext
virtual StatusCode postNext() const override
Definition
EvenEventsSelectorTool.cxx:17
EvenEventsSelectorTool::~EvenEventsSelectorTool
virtual ~EvenEventsSelectorTool()
Destructor.
Definition
EvenEventsSelectorTool.cxx:13
dump
-event-from-file
Generated on
for ATLAS Offline Software by
1.17.0