ATLAS Offline Software
PhysicsAnalysis
DerivationFramework
DerivationFrameworkBPhys
src
TriggerCountToMetadata.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
// Author : Matteo Bedognetti <matteo.bedognetti@cern.ch.>
7
// Changes:
8
//
9
// Store trigger counts for specific chains in the DAOD's MetaData.
10
// This allows it to store information about triggers upon which events are NOT selected during the derivation
11
//
12
// Job options:
13
// - TriggerList -- a vector containing all triggers to store as strings
14
// - FolderName -- Is supposed to be the derivation name (some convention I guess)
15
// - TrigDecisionTool -- if one wants to pass this a specific TrigDecisionTool
16
//
17
//============================================================================
18
//
19
20
#include "
TriggerCountToMetadata.h
"
21
#include "
AthenaPoolUtilities/CondAttrListCollection.h
"
22
23
#include <memory>
24
25
namespace
DerivationFramework
{
26
27
//--------------------------------------------------------------------------
28
TriggerCountToMetadata::TriggerCountToMetadata
(
const
std::string&
t
,
29
const
std::string&
n
,
30
const
IInterface*
p
)
31
: base_class(
t
,
n
,
p
), m_trigDecisionTool(
"Trig::TrigDecisionTool/TrigDecisionTool"
)
32
{
33
declareProperty(
"TrigDecisionTool"
,
m_trigDecisionTool
);
34
declareProperty(
"FolderName"
,
m_folderName
=
"DerivationLevel"
);
35
declareProperty(
"TriggerList"
,
m_triggerList
);
36
37
}
38
//--------------------------------------------------------------------------
39
StatusCode
TriggerCountToMetadata::initialize
() {
40
ATH_CHECK
(
m_trigDecisionTool
.retrieve());
41
42
return
StatusCode::SUCCESS;
43
}
44
45
//--------------------------------------------------------------------------
46
StatusCode
TriggerCountToMetadata::addBranches
()
const
{
47
48
ATH_MSG_DEBUG
(
"Inside TriggerCountToMetadata::addBranches()"
);
49
50
// W.w. method
51
addEvent(
"AllEvents"
);
52
53
for
(
unsigned
int
i
=0;
i
<
m_triggerList
.size();
i
++){
54
addEvent(
m_triggerList
[
i
] ,
m_trigDecisionTool
->isPassed(
m_triggerList
[
i
]) );
55
}
56
57
return
StatusCode::SUCCESS;
58
}
59
60
}
// End of namespace DerivationFramework
CondAttrListCollection.h
This file defines the class for a collection of AttributeLists where each one is associated with a ch...
DerivationFramework::TriggerCountToMetadata::initialize
virtual StatusCode initialize() override
Definition:
TriggerCountToMetadata.cxx:39
read_hist_ntuple.t
t
Definition:
read_hist_ntuple.py:5
DerivationFramework::TriggerCountToMetadata::addBranches
virtual StatusCode addBranches() const override
Definition:
TriggerCountToMetadata.cxx:46
python.utils.AtlRunQueryDQUtils.p
p
Definition:
AtlRunQueryDQUtils.py:209
lumiFormat.i
int i
Definition:
lumiFormat.py:85
beamspotman.n
n
Definition:
beamspotman.py:729
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition:
PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition:
AthMsgStreamMacros.h:29
TriggerCountToMetadata.h
ATH_CHECK
#define ATH_CHECK
Definition:
AthCheckMacros.h:40
DerivationFramework
THE reconstruction tool.
Definition:
ParticleSortingAlg.h:24
DerivationFramework::TriggerCountToMetadata::m_trigDecisionTool
ToolHandle< Trig::TrigDecisionTool > m_trigDecisionTool
Definition:
TriggerCountToMetadata.h:45
DerivationFramework::TriggerCountToMetadata::m_folderName
std::string m_folderName
Definition:
TriggerCountToMetadata.h:46
DerivationFramework::TriggerCountToMetadata::TriggerCountToMetadata
TriggerCountToMetadata(const std::string &t, const std::string &n, const IInterface *p)
Definition:
TriggerCountToMetadata.cxx:28
DerivationFramework::TriggerCountToMetadata::m_triggerList
std::vector< std::string > m_triggerList
Definition:
TriggerCountToMetadata.h:44
Generated on Tue Sep 2 2025 21:24:18 for ATLAS Offline Software by
1.8.18