ATLAS Offline Software
Loading...
Searching...
No Matches
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"
18
19// Local include(s):
22
23#ifndef XAOD_STANDALONE
25#endif
26
36#ifndef XAOD_STANDALONE
38#endif
39 public asg::AsgTool {
40
41 // Declare the proper constructor(s) for Athena:
43
44public:
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;
88#endif
89
91
92protected:
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
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
109 {this, "RandomRunNumber", "EventInfo.RandomRunNumber"};
111 {this, "RandomLumiBlock", "EventInfo.RandomLumiBlockNumber"};
112
113}; // class GoodRunsListSelectionTool
114
115#endif // GoodRunsLists_GoodRunsListSelectionTool_H
#define ASG_TOOL_CLASS2(CLASSNAME, INT1, INT2)
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
Gaudi::Property< bool > m_useRandomRunNumber
Gaudi::Property< bool > m_passthrough
StatusCode readXMLs(Root::TGRLCollection &grl, const std::vector< std::string > &files)
Helper function reading in the specified files into a GRL object.
Gaudi::Property< std::vector< std::string > > m_goodrunslistVec
virtual bool eventPassesFilter() const
ISkimmingTool method: will retrieve eventInfo from storegate and use that with above methods.
GoodRunsListSelectionTool(const std::string &name="GoodRunsListsSelectionTool")
Gaudi::Property< std::vector< std::string > > m_blackrunslistVec
virtual StatusCode initialize()
Initialize AlgTool.
SG::ReadDecorHandleKey< xAOD::EventInfo > m_randomRunNumberKey
virtual const Root::TGRLCollection & getGRLCollection() const
Get the good runs list used by the tool.
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.
SG::ReadDecorHandleKey< xAOD::EventInfo > m_randomLumiBlockKey
virtual const Root::TGRLCollection & getBRLCollection() const
Get the bad runs list used by the tool.
Gaudi::Property< bool > m_rejectanybrl
Main tools implementing this interface: GoodRunsListSelectionTool (source code: DataQuality/GoodRunsL...
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
Base class for the dual-use tool implementation classes.
Definition AsgTool.h:47
std::vector< std::string > files
file names and file pointers
Definition hcg.cxx:50
EventInfo_v1 EventInfo
Definition of the latest event info version.