ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigAnalysis
TrigJiveXML
src
xAODTrigDecisionRetriever.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
TrigJiveXML/xAODTrigDecisionRetriever.h
"
6
7
#include <string>
8
9
#include "CLHEP/Units/SystemOfUnits.h"
10
11
// references:
12
// Event/xAOD/xAODTrigger/trunk/Root/TrigDecision_v1.cxx
13
// Event/xAOD/xAODTrigger/trunk/Root/TrigDecisionAuxInfo_v1.cxx
14
#include "
xAODTrigger/TrigDecision.h
"
15
16
namespace
JiveXML
{
17
18
//--------------------------------------------------------------------------
19
20
xAODTrigDecisionRetriever::xAODTrigDecisionRetriever
(
const
std::string&
type
,
const
std::string& name,
const
IInterface* parent):
21
AthAlgTool
(
type
, name, parent),
m_typeName
(
"TrigDecision_xAOD"
)
22
{
23
24
declareInterface<IDataRetriever>(
this
);
25
}
26
27
//--------------------------------------------------------------------------
28
29
StatusCode
xAODTrigDecisionRetriever::retrieve
(ToolHandle<IFormatTool> &FormatTool) {
30
31
DataVect
test;
32
33
const
xAOD::TrigDecision
* trigDec = 0;
34
35
m_sgKey
=
"xTrigDecision"
;
//sgKey from 20.0.0.2 AOD
36
if
(
evtStore
()->
retrieve
(trigDec,
m_sgKey
).isFailure() ) {
37
if
(
msgLvl
(MSG::DEBUG))
msg
(MSG::DEBUG) <<
"No xAOD::xTrigDecision found in SG "
<<
endmsg
;
38
return
StatusCode::SUCCESS;
39
}
40
if
(
msgLvl
(MSG::DEBUG))
msg
(MSG::DEBUG) <<
"Found xAOD::xTrigDecision in SG ! "
<<
endmsg
;
41
42
DataVect
smk;
43
DataVect
bgCode;
44
DataVect
tav;
45
DataVect
tap;
46
DataVect
tbp;
47
48
smk.push_back(
DataType
( trigDec->
smk
() ));
52
/*
53
bgCode.push_back(DataType( trigDec->bgCode() ));
54
tav.push_back(DataType( trigDec->tav() ));
55
tap.push_back(DataType( trigDec->tap() ));
56
tbp.push_back(DataType( trigDec->tbp() ));
57
*/
58
DataMap
myDataMap;
59
/*
60
myDataMap["smk"] = smk;
61
myDataMap["bgCode"] = bgCode;
62
myDataMap["tav"] = tav;
63
myDataMap["tap"] = tap;
64
myDataMap["tbp"] = tbp;
65
*/
66
if
(
msgLvl
(MSG::DEBUG))
msg
(MSG::DEBUG) <<
dataTypeName
() <<
": "
67
<<
" SMK: "
<< trigDec->
smk
()
68
<<
" BGCODE: "
<< trigDec->
bgCode
()
69
<<
" TAV: "
<< trigDec->
tav
()
70
<<
" TAP: "
<< trigDec->
tap
()
71
<<
" TBP: "
<< trigDec->
tbp
()
72
<<
" from: "
<<
m_sgKey
<<
endmsg
;
73
75
//return 0;
77
return
FormatTool->AddToEvent(
dataTypeName
(),
m_sgKey
, &myDataMap);
78
}
79
}
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:54
DataType
OFFLINE_FRAGMENTS_NAMESPACE::PointerType DataType
Definition
CTPResultByteStreamTool.cxx:22
TrigDecision.h
AthAlgTool::AthAlgTool
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Definition
AthAlgTool.cxx:16
AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
Definition
AthCommonDataStore.h:85
AthCommonMsg< AlgTool >::msgLvl
bool msgLvl(const MSG::Level lvl) const
Definition
AthCommonMsg.h:30
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition
AthCommonMsg.h:24
JiveXML::xAODTrigDecisionRetriever::xAODTrigDecisionRetriever
xAODTrigDecisionRetriever(const std::string &type, const std::string &name, const IInterface *parent)
Standard Constructor.
Definition
xAODTrigDecisionRetriever.cxx:20
JiveXML::xAODTrigDecisionRetriever::retrieve
virtual StatusCode retrieve(ToolHandle< IFormatTool > &FormatTool)
Retrieve all the data.
Definition
xAODTrigDecisionRetriever.cxx:29
JiveXML::xAODTrigDecisionRetriever::m_sgKey
std::string m_sgKey
Definition
xAODTrigDecisionRetriever.h:50
JiveXML::xAODTrigDecisionRetriever::m_typeName
const std::string m_typeName
The data type that is generated by this retriever.
Definition
xAODTrigDecisionRetriever.h:48
JiveXML::xAODTrigDecisionRetriever::dataTypeName
virtual std::string dataTypeName() const
Return the name of the data type.
Definition
xAODTrigDecisionRetriever.h:43
xAOD::TrigDecision_v1::tav
const std::vector< uint32_t > & tav() const
Get the Trigger After Veto bits.
xAOD::TrigDecision_v1::smk
uint32_t smk() const
Get the Super Master Key describing this object.
xAOD::TrigDecision_v1::tap
const std::vector< uint32_t > & tap() const
Get the Trigger After Prescale bits.
xAOD::TrigDecision_v1::bgCode
char bgCode() const
Get the bunch group code of the current event.
xAOD::TrigDecision_v1::tbp
const std::vector< uint32_t > & tbp() const
Get the Trigger Before Prescale bits.
JiveXML
This header is shared inbetween the C-style server thread and the C++ Athena ServerSvc.
Definition
BadLArRetriever.cxx:22
JiveXML::DataMap
std::map< std::string, DataVect > DataMap
Definition
DataType.h:59
JiveXML::DataVect
std::vector< DataType > DataVect
Defines a map with a key and a vector of DataType objects e.g.
Definition
DataType.h:58
xAOD::TrigDecision
TrigDecision_v1 TrigDecision
Define the latest version of the trigger decision class.
Definition
Event/xAOD/xAODTrigger/xAODTrigger/TrigDecision.h:16
type
xAODTrigDecisionRetriever.h
Generated on
for ATLAS Offline Software by
1.17.0