ATLAS Offline Software
Loading...
Searching...
No Matches
TrigDecision.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/**********************************************************************************
6 * @Project: HLT
7 * @Package: TrigSteeringEvent
8 * @Class : TrigDecision
9 *
10 * @brief transient representation of all three trigger level information
11 *
12 * @author Nicolas Berger <Nicolas.Berger@cern.ch> - CERN
13 * @author Till Eifert <Till.Eifert@cern.ch> - U. of Geneva, Switzerland
14 * @author Ricardo Goncalo <Jose.Goncalo@cern.ch> - Royal Holloway, U. of London
15 * @author Fabrizio Salvatore <p.salvatore@cern.ch> - University of Sussex/
16 * - Royal Holloway, U. of London
17 *
18 * File and Version Information:
19 * $Id: TrigDecision.cxx,v 1.2 2009-02-05 18:04:30 tbold Exp $
20 **********************************************************************************/
21
22
24
25//#include "TrigSteering/Sequence.h"
26
27using namespace TrigDec;
28
29
32 m_bgCode(0),
36{
37 // m_detailLevel = NONE;
38 // m_status = true;
39}
40
42 const HLT::HLTResult& l2Result,
43 const HLT::HLTResult& efResult,
44 uint32_t masterKey ) :
46 m_bgCode(0),
47 m_l1_result(l1Result),
48 m_l2_result(l2Result),
49 m_ef_result(efResult),
53{ }
54
55
57 const HLT::HLTResult& hltResult,
58 uint32_t masterKey ) :
60 m_bgCode(0),
61 m_l1_result(l1Result),
62 // m_l2_result(0),
63 // m_ef_result(0),
64 m_hlt_result(hltResult),
67 m_hlt_result_ptr(0) { }
68
69
71 const DataLink<HLT::HLTResult>& l2Result,
72 const DataLink<HLT::HLTResult>& efResult,
73 uint32_t masterKey,
74 char bgCode)
76 m_bgCode(bgCode),
77 m_l1_result (l1Result),
78 m_l2_result (l2Result),
79 m_ef_result (efResult),
80 m_l2_result_ptr(nullptr),
81 m_ef_result_ptr(nullptr),
82 m_hlt_result_ptr(nullptr)
83{
84}
85
86
88{
89 // resetCache();
90 // if pointers to HLT results pointers are set we own them (we need to handle od version)
92 delete m_l2_result_ptr;
93
95 delete m_ef_result_ptr;
96
97
99 delete m_hlt_result_ptr;
100
101}
102
103namespace {
104 static const HLT::HLTResult invalid_result;
105}
106
108 if (m_l2_result_ptr) // if we have ptr we should use it (old data 13.0.X and 14.0.0)
109 return *m_l2_result_ptr;
110 if (m_l2_result.isValid()) { // add protection against invalid DataLinks
111 return *m_l2_result; // this is data link, derefencing it means whole lot different thing
112 } else {
113 return invalid_result; // if DataLink invalid, return dummy HLTResult
114 }
115}
116
117
119 if (m_ef_result_ptr) // if we have ptr we should use it (old data 13.0.X and 14.0.0)
120 return *m_ef_result_ptr;
121 if (m_ef_result.isValid()) { // add protection against invalid DataLinks
122 return *m_ef_result; // this is data link, derefencing it means whole lot different thing
123 } else {
124 return invalid_result; // if DataLink invalid, return dummy HLTResult
125 }
126}
127
128
130 if (m_hlt_result_ptr) // if we have ptr we should use it (old data 13.0.X and 14.0.0)
131 return *m_hlt_result_ptr;
132 if (m_hlt_result.isValid()) { // add protection against invalid DataLinks
133 return *m_hlt_result; // this is data link, derefencing it means whole lot different thing
134 } else {
135 return invalid_result; // if DataLink invalid, return dummy HLTResult
136 }
137}
138
HLT::HLTResult is sumarising result of trigger decision evaluation (online/offline) It contains basic...
Definition HLTResult.h:51
const HLT::HLTResult & getEFResult() const
const HLT::HLTResult & getL2Result() const
DataLink< HLT::HLTResult > m_ef_result
HLTResult of trigger level EF.
const HLT::HLTResult & getHLTResult() const
DataLink< HLT::HLTResult > m_l2_result
HLTResult of trigger level 2.
DataLink< HLT::HLTResult > m_hlt_result
HLTResult of merged L2EF.