ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
TestBeam
TBRec
src
TBPhaseStreamerTool.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
TBPhaseStreamerTool.h
"
6
#include "
TBEvent/TBPhase.h
"
7
#include <string>
8
#include <ios>
9
10
TBPhaseStreamerTool::TBPhaseStreamerTool
(
const
std::string&
type
,
11
const
std::string& name,
12
const
IInterface* parent)
13
:
TBEventStreamerTool
(
type
,name,parent)
14
,
m_guardValue
(11.)
// in TDC counts
15
,
m_TBPhaseKey
(
"TBPhase"
)
16
{
17
declareInterface<TBEventStreamerTool>(
this
);
18
declareProperty
(
"TBPhaseKey"
,
m_TBPhaseKey
);
19
declareProperty
(
"Guard"
,
m_guardValue
);
20
}
21
22
TBPhaseStreamerTool::~TBPhaseStreamerTool
()
23
{ }
24
26
// Initialize //
28
29
StatusCode
TBPhaseStreamerTool::initializeTool
()
30
{
31
MsgStream report(msgSvc(),name());
32
33
report << MSG::INFO <<
" Cut events using guard value: "
<<
m_guardValue
;
34
35
return
StatusCode::SUCCESS;
36
}
37
39
// Accept/Reject //
41
42
StatusCode
TBPhaseStreamerTool::accept
()
43
{
44
MsgStream report(msgSvc(),name());
45
46
const
TBPhase
* thePhase = 0;
47
ATH_CHECK
(
evtStore
()->retrieve(thePhase,
m_TBPhaseKey
) );
48
49
// Get the absolute value of the distance of the TDC-WAC
50
float
dTtoWAC = thePhase->
getdTtoWAC
();
51
52
return
(dTtoWAC >
m_guardValue
)
53
? StatusCode::SUCCESS
54
: StatusCode::FAILURE;
55
}
ATH_CHECK
#define ATH_CHECK
Evaluate an expression and check for errors.
Definition
AthCheckMacros.h:40
TBPhaseStreamerTool.h
TBPhase.h
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
Definition
AthCommonDataStore.h:145
AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
Definition
AthCommonDataStore.h:85
TBEventStreamerTool::TBEventStreamerTool
TBEventStreamerTool(const std::string &name, const std::string &type, const IInterface *parent)
Definition
TBEventStreamerTool.cxx:8
TBPhaseStreamerTool::~TBPhaseStreamerTool
virtual ~TBPhaseStreamerTool()
Definition
TBPhaseStreamerTool.cxx:22
TBPhaseStreamerTool::TBPhaseStreamerTool
TBPhaseStreamerTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition
TBPhaseStreamerTool.cxx:10
TBPhaseStreamerTool::m_guardValue
float m_guardValue
Definition
TBPhaseStreamerTool.h:43
TBPhaseStreamerTool::m_TBPhaseKey
std::string m_TBPhaseKey
Definition
TBPhaseStreamerTool.h:44
TBPhaseStreamerTool::accept
virtual StatusCode accept() override
Definition
TBPhaseStreamerTool.cxx:42
TBPhaseStreamerTool::initializeTool
virtual StatusCode initializeTool() override
Definition
TBPhaseStreamerTool.cxx:29
TBPhase
Definition
TBPhase.h:22
TBPhase::getdTtoWAC
float getdTtoWAC() const
Definition
TBPhase.h:45
type
Generated on
for ATLAS Offline Software by
1.17.0