ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigAnalysis
TrigJiveXML
src
CTPDecisionRetriever.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
TrigJiveXML/CTPDecisionRetriever.h
"
6
#include "CLHEP/Units/SystemOfUnits.h"
7
#include "
AnalysisTriggerEvent/CTP_Decision.h
"
8
9
namespace
JiveXML
{
10
11
//--------------------------------------------------------------------------
12
13
CTPDecisionRetriever::CTPDecisionRetriever
(
const
std::string&
type
,
const
std::string& name,
const
IInterface* parent):
14
AthAlgTool
(
type
, name, parent),
15
m_typeName
(
"LVL1Result"
)
16
{
17
declareInterface<IDataRetriever>(
this
);
18
}
19
20
//--------------------------------------------------------------------------
21
22
StatusCode
CTPDecisionRetriever::retrieve
(ToolHandle<IFormatTool> &FormatTool) {
23
24
DataVect
itemListL1Vec;
25
DataVect
prescaleListL1Vec;
26
DataVect
itemListL2Vec;
27
DataVect
prescaleListL2Vec;
28
DataVect
itemListEFVec;
29
DataVect
prescaleListEFVec;
30
DataVect
passedTrigger;
31
DataVect
passedL1;
32
DataVect
passedL2;
33
DataVect
passedEF;
34
35
// placeholders only ! For backwards compatibility.
36
// Trigger energies moved to TriggerInfoRetriever
37
DataVect
energySumEt;
38
DataVect
energyEx;
39
DataVect
energyEy;
40
DataVect
energyEtMiss;
41
42
energySumEt.push_back(
DataType
( -1. ) );
43
energyEx.push_back(
DataType
( -1. ) );
44
energyEy.push_back(
DataType
( -1. ) );
45
energyEtMiss.push_back(
DataType
( -1. ) );
46
47
// CTP_Decision has no 'passed' info
48
passedTrigger.push_back(
DataType
( -1. ) );
49
passedL1.push_back(
DataType
( -1. ) );
50
passedL2.push_back(
DataType
( -1. ) );
51
passedEF.push_back(
DataType
( -1. ) );
52
53
// end of placeholders
54
55
std::string itemListL1=
""
;
56
std::string prescaleListL1=
""
;
57
std::string itemListL2=
"n_a_CTPDecOnly"
;
58
std::string prescaleListL2=
"0"
;
59
std::string itemListEF=
"n_a_CTPDecOnly"
;
60
std::string prescaleListEF=
"0"
;
61
64
65
const
CTP_Decision
* ctpDecision;
66
67
// L1JetObject -not- available
68
if
(
evtStore
()->
retrieve
(ctpDecision,
"CTP_Decision"
).isFailure() ) {
69
if
(
msgLvl
(MSG::DEBUG))
msg
(MSG::DEBUG) <<
"CTP_Decision retrieval from Storegate failed"
<<
endmsg
;
70
return
StatusCode::SUCCESS;
71
}
72
if
(
msgLvl
(MSG::DEBUG))
msg
(MSG::DEBUG) <<
"Found CTP_Decision in StoreGate !"
<<
endmsg
;
73
74
CTP_Decision::items_type::const_iterator itCTP = (ctpDecision->
getItems
()).begin();
75
CTP_Decision::items_type::const_iterator itCTPe = (ctpDecision->
getItems
()).end();
76
77
for
(; itCTP != itCTPe; ++itCTP){
78
itemListL1 +=
"-"
+*itCTP;
79
prescaleListL1 +=
"-0"
;
80
}
81
82
itemListL1Vec.emplace_back( std::move( itemListL1 ));
83
itemListL2Vec.emplace_back( std::move( itemListL2 ));
84
itemListEFVec.emplace_back( std::move( itemListEF ));
85
prescaleListL1Vec.emplace_back( std::move( prescaleListL1 ));
86
prescaleListL2Vec.emplace_back( std::move( prescaleListL2 ));
87
prescaleListEFVec.emplace_back( std::move( prescaleListEF ));
88
89
DataMap
myDataMap;
90
const
int
nEntries = itemListL1Vec.size();
91
myDataMap[
"ctpItemList"
] = std::move(itemListL1Vec);
92
myDataMap[
"prescaleListL1"
] = std::move(prescaleListL1Vec);
93
myDataMap[
"itemListL2"
] = std::move(itemListL2Vec);
94
myDataMap[
"prescaleListL2"
] = std::move(prescaleListL2Vec);
95
myDataMap[
"itemListEF"
] = std::move(itemListEFVec);
96
myDataMap[
"prescaleListEF"
] = std::move(prescaleListEFVec);
97
myDataMap[
"passedTrigger"
] = std::move(passedTrigger);
98
myDataMap[
"passedL1"
] = std::move(passedL1);
99
myDataMap[
"passedL2"
] = std::move(passedL2);
100
myDataMap[
"passedEF"
] = std::move(passedEF);
101
myDataMap[
"energySumEt"
] = std::move(energySumEt);
102
myDataMap[
"energyEx"
] = std::move(energyEx);
103
myDataMap[
"energyEy"
] = std::move(energyEy);
104
myDataMap[
"energyEtMiss"
] = std::move(energyEtMiss);
105
106
if
(
msgLvl
(MSG::DEBUG))
msg
(MSG::DEBUG) <<
dataTypeName
() <<
": "
<< nEntries <<
endmsg
;
107
108
//forward data to formating tool
109
return
FormatTool->AddToEvent(
dataTypeName
(),
"CTP_Decision"
, &myDataMap);
110
}
111
}
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:54
CTPDecisionRetriever.h
DataType
OFFLINE_FRAGMENTS_NAMESPACE::PointerType DataType
Definition
CTPResultByteStreamTool.cxx:22
CTP_Decision.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
CTP_Decision
Legacy data class representing the LVL1 CTP trigger decision.
Definition
CTP_Decision.h:39
CTP_Decision::getItems
const items_type & getItems() const
Get a vector of fired LVL1 items.
Definition
CTP_Decision.h:56
JiveXML::CTPDecisionRetriever::dataTypeName
virtual std::string dataTypeName() const
Return the name of the data type.
Definition
CTPDecisionRetriever.h:28
JiveXML::CTPDecisionRetriever::retrieve
virtual StatusCode retrieve(ToolHandle< IFormatTool > &FormatTool)
Retrieve all the data.
Definition
CTPDecisionRetriever.cxx:22
JiveXML::CTPDecisionRetriever::CTPDecisionRetriever
CTPDecisionRetriever(const std::string &type, const std::string &name, const IInterface *parent)
Standard Constructor.
Definition
CTPDecisionRetriever.cxx:13
JiveXML::CTPDecisionRetriever::m_typeName
const std::string m_typeName
The data type that is generated by this retriever.
Definition
CTPDecisionRetriever.h:33
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
type
Generated on
for ATLAS Offline Software by
1.17.0