ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
DataQuality
GoodRunsLists
GoodRunsLists
GoodRunsListSelectionTool.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
// $Id$
6
// Dear emacs, this is -*- c++ -*-
7
#ifndef GoodRunsLists_GoodRunsListSelectionTool_H
8
#define GoodRunsLists_GoodRunsListSelectionTool_H
9
10
// System include(s):
11
#include <vector>
12
#include <string>
13
14
// Framework include(s):
15
#include "
AsgTools/AsgTool.h
"
16
#include "
AsgTools/PropertyWrapper.h
"
17
#include "
AsgDataHandles/ReadDecorHandleKey.h
"
18
19
// Local include(s):
20
#include "
AsgAnalysisInterfaces/IGoodRunsListSelectionTool.h
"
21
#include "
GoodRunsLists/TGRLCollection.h
"
22
23
#ifndef XAOD_STANDALONE
24
#include "
DerivationFrameworkInterfaces/ISkimmingTool.h
"
25
#endif
26
35
class
GoodRunsListSelectionTool
:
virtual
public
IGoodRunsListSelectionTool
,
36
#ifndef XAOD_STANDALONE
37
virtual
public
DerivationFramework::ISkimmingTool
,
38
#endif
39
public
asg::AsgTool
{
40
41
// Declare the proper constructor(s) for Athena:
42
ASG_TOOL_CLASS2
(
GoodRunsListSelectionTool
,
IGoodRunsListSelectionTool
,
DerivationFramework::ISkimmingTool
)
43
44
public
:
45
GoodRunsListSelectionTool
(
const
std::string& name =
46
"GoodRunsListsSelectionTool"
);
47
49
virtual
StatusCode
initialize
();
50
53
55
virtual
bool
passRunLB
(
const
std::vector< std::string >& grlnameVec =
56
std::vector< std::string >(),
57
const
std::vector< std::string >& brlnameVec =
58
std::vector< std::string >() )
const
;
59
61
virtual
bool
passRunLB
(
const
xAOD::EventInfo
& event,
62
const
std::vector< std::string >& grlnameVec =
63
std::vector< std::string >(),
64
const
std::vector< std::string >& brlnameVec =
65
std::vector< std::string >() )
const
;
66
68
virtual
bool
passRunLB
(
int
runNumber,
int
lumiBlockNr,
69
const
std::vector< std::string >& grlnameVec =
70
std::vector< std::string >(),
71
const
std::vector< std::string >& brlnameVec =
72
std::vector< std::string >() )
const
;
73
75
virtual
const
Root::TGRLCollection
&
getGRLCollection
()
const
{
76
return
m_grlcollection
;
77
}
78
80
virtual
const
Root::TGRLCollection
&
getBRLCollection
()
const
{
81
return
m_brlcollection
;
82
}
83
84
#ifndef XAOD_STANDALONE
87
virtual
bool
eventPassesFilter
(
const
EventContext& ctx)
const
;
88
#endif
89
91
92
protected
:
94
StatusCode
readXMLs
(
Root::TGRLCollection
& grl,
95
const
std::vector< std::string >&
files
);
96
97
Gaudi::Property<std::vector<std::string>>
m_goodrunslistVec
{
this
,
"GoodRunsListVec"
, {}};
98
Gaudi::Property<std::vector<std::string>>
m_blackrunslistVec
{
this
,
"BlackRunsListVec"
, {}};
99
100
Root::TGRLCollection
m_grlcollection
;
101
Root::TGRLCollection
m_brlcollection
;
102
103
Gaudi::Property<int>
m_boolop
{
this
,
"BoolOperation"
, 0};
104
Gaudi::Property<bool>
m_passthrough
{
this
,
"PassThrough"
,
true
};
105
Gaudi::Property<bool>
m_rejectanybrl
{
this
,
"RejectBlackRunsInEventSelector"
,
false
};
106
Gaudi::Property<bool>
m_useRandomRunNumber
{
this
,
"UseRandomRunNumber"
,
false
};
107
108
SG::ReadDecorHandleKey<xAOD::EventInfo>
m_randomRunNumberKey
109
{
this
,
"RandomRunNumber"
,
"EventInfo.RandomRunNumber"
};
110
SG::ReadDecorHandleKey<xAOD::EventInfo>
m_randomLumiBlockKey
111
{
this
,
"RandomLumiBlock"
,
"EventInfo.RandomLumiBlockNumber"
};
112
113
};
// class GoodRunsListSelectionTool
114
115
#endif
// GoodRunsLists_GoodRunsListSelectionTool_H
ASG_TOOL_CLASS2
#define ASG_TOOL_CLASS2(CLASSNAME, INT1, INT2)
Definition
AsgToolMacros.h:77
AsgTool.h
ReadDecorHandleKey.h
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
ISkimmingTool.h
IGoodRunsListSelectionTool.h
PropertyWrapper.h
TGRLCollection.h
DerivationFramework::ISkimmingTool
Definition
ISkimmingTool.h:24
GoodRunsListSelectionTool::m_useRandomRunNumber
Gaudi::Property< bool > m_useRandomRunNumber
Definition
GoodRunsListSelectionTool.h:106
GoodRunsListSelectionTool::m_passthrough
Gaudi::Property< bool > m_passthrough
Definition
GoodRunsListSelectionTool.h:104
GoodRunsListSelectionTool::readXMLs
StatusCode readXMLs(Root::TGRLCollection &grl, const std::vector< std::string > &files)
Helper function reading in the specified files into a GRL object.
Definition
GoodRunsListSelectionTool.cxx:145
GoodRunsListSelectionTool::m_goodrunslistVec
Gaudi::Property< std::vector< std::string > > m_goodrunslistVec
Definition
GoodRunsListSelectionTool.h:97
GoodRunsListSelectionTool::m_brlcollection
Root::TGRLCollection m_brlcollection
Definition
GoodRunsListSelectionTool.h:101
GoodRunsListSelectionTool::GoodRunsListSelectionTool
GoodRunsListSelectionTool(const std::string &name="GoodRunsListsSelectionTool")
Definition
GoodRunsListSelectionTool.cxx:16
GoodRunsListSelectionTool::m_blackrunslistVec
Gaudi::Property< std::vector< std::string > > m_blackrunslistVec
Definition
GoodRunsListSelectionTool.h:98
GoodRunsListSelectionTool::initialize
virtual StatusCode initialize()
Initialize AlgTool.
Definition
GoodRunsListSelectionTool.cxx:19
GoodRunsListSelectionTool::m_randomRunNumberKey
SG::ReadDecorHandleKey< xAOD::EventInfo > m_randomRunNumberKey
Definition
GoodRunsListSelectionTool.h:109
GoodRunsListSelectionTool::eventPassesFilter
virtual bool eventPassesFilter(const EventContext &ctx) const
ISkimmingTool method: will retrieve eventInfo from storegate and use that with above methods.
Definition
GoodRunsListSelectionTool.cxx:193
GoodRunsListSelectionTool::m_grlcollection
Root::TGRLCollection m_grlcollection
Definition
GoodRunsListSelectionTool.h:100
GoodRunsListSelectionTool::getGRLCollection
virtual const Root::TGRLCollection & getGRLCollection() const
Get the good runs list used by the tool.
Definition
GoodRunsListSelectionTool.h:75
GoodRunsListSelectionTool::passRunLB
virtual bool passRunLB(const std::vector< std::string > &grlnameVec=std::vector< std::string >(), const std::vector< std::string > &brlnameVec=std::vector< std::string >()) const
Check if the current event passes the selection.
Definition
GoodRunsListSelectionTool.cxx:51
GoodRunsListSelectionTool::m_randomLumiBlockKey
SG::ReadDecorHandleKey< xAOD::EventInfo > m_randomLumiBlockKey
Definition
GoodRunsListSelectionTool.h:111
GoodRunsListSelectionTool::getBRLCollection
virtual const Root::TGRLCollection & getBRLCollection() const
Get the bad runs list used by the tool.
Definition
GoodRunsListSelectionTool.h:80
GoodRunsListSelectionTool::m_boolop
Gaudi::Property< int > m_boolop
Definition
GoodRunsListSelectionTool.h:103
GoodRunsListSelectionTool::m_rejectanybrl
Gaudi::Property< bool > m_rejectanybrl
Definition
GoodRunsListSelectionTool.h:105
IGoodRunsListSelectionTool
Main tools implementing this interface: GoodRunsListSelectionTool (source code: DataQuality/GoodRunsL...
Definition
PhysicsAnalysis/Interfaces/AsgAnalysisInterfaces/AsgAnalysisInterfaces/IGoodRunsListSelectionTool.h:26
Root::TGRLCollection
Definition
TGRLCollection.h:24
SG::ReadDecorHandleKey
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
Definition
StoreGate/StoreGate/ReadDecorHandleKey.h:86
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition
AsgTool.h:47
files
std::vector< std::string > files
file names and file pointers
Definition
hcg.cxx:52
xAOD::EventInfo
EventInfo_v1 EventInfo
Definition of the latest event info version.
Definition
IEventInfoCnvTool.h:16
Generated on
for ATLAS Offline Software by
1.17.0