ATLAS Offline Software
Loading...
Searching...
No Matches
GoodRunsListSelectorTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef GoodRunsLists_GoodRunsListSelectorTool_H
6#define GoodRunsLists_GoodRunsListSelectorTool_H
7
12
19#include <vector>
20#include <string>
21#include <map>
22#include <memory>
23
24
28
29
30class GoodRunsListSelectorTool : public extends<AthAlgTool, IGoodRunsListSelectorTool, IAthenaEvtLoopPreSelectTool>
31{
32 public:
33 //Delegate constructor
34 using base_class::base_class;
35
37
39 StatusCode initialize();
41 bool passEvent(const EventIDBase& pEvent) ;
43 StatusCode finalize();
44
46 bool passRunLB( int runNumber, int lumiBlockNr,
47 const std::vector<std::string>& grlnameVec=std::vector<std::string>(),
48 const std::vector<std::string>& brlnameVec=std::vector<std::string>() ) ;
50 bool passThisRunLB( const std::vector<std::string>& grlnameVec=std::vector<std::string>(),
51 const std::vector<std::string>& brlnameVec=std::vector<std::string>() ) ;
53 bool registerGRLSelector(const std::string& name, const std::vector<std::string>& grlnameVec, const std::vector<std::string>& brlnameVec);
55 const std::map< std::string, vvPair >& getGRLSelectorRegistry() { return m_registry; }
56
58 const Root::TGRLCollection* getGRLCollection() const { return m_grlcollection.get(); }
59 const Root::TGRLCollection* getBRLCollection() const { return m_brlcollection.get(); }
60
61 protected:
62
63 bool fileExists(const char* fileName);
64
65 Gaudi::Property<std::vector<std::string> > m_goodrunslistVec{this, "GoodRunsListVec", {}, "list of input xml files"};
66 Gaudi::Property<std::vector<std::string> > m_blackrunslistVec{this,"BlackRunsListVec", {}, "list of input xml files"};
67
68
69 std::unique_ptr<Root::TGRLCollection> m_grlcollection{new Root::TGRLCollection()};
70 std::unique_ptr<Root::TGRLCollection> m_brlcollection{new Root::TGRLCollection()};
71
72 std::unique_ptr<Root::TGoodRunsListReader> m_reader{new Root::TGoodRunsListReader()};
73
74 Gaudi::Property<int> m_boolop{this,"BoolOperation",0};
75 Gaudi::Property<bool> m_passthrough{this,"PassThrough",true};
76 Gaudi::Property<bool> m_rejectanybrl{this,"RejectBlackRunsInEventSelector",false};
77 Gaudi::Property<bool> m_eventselectormode{this,"EventSelectorMode",false};
78
79 std::map< std::string, vvPair > m_registry;
80
81};
82
83#endif
84
This file contains the class definition for the IAthenaEvtLoopPreSelectTool class.
This file contains the class definition for the GoodRunsListSelectorTool class.
bool registerGRLSelector(const std::string &name, const std::vector< std::string > &grlnameVec, const std::vector< std::string > &brlnameVec)
register grl/brl combination
std::unique_ptr< Root::TGRLCollection > m_brlcollection
Gaudi::Property< bool > m_eventselectormode
Gaudi::Property< std::vector< std::string > > m_blackrunslistVec
Gaudi::Property< int > m_boolop
bool passRunLB(int runNumber, int lumiBlockNr, const std::vector< std::string > &grlnameVec=std::vector< std::string >(), const std::vector< std::string > &brlnameVec=std::vector< std::string >())
called for each event by GoodRunsListSelectorAlg to decide if the event should be passed
bool passEvent(const EventIDBase &pEvent)
called for each event by EventSelector to decide if the event should be passed
Gaudi::Property< bool > m_passthrough
const Root::TGRLCollection * getGRLCollection() const
get grl/brl collection
bool fileExists(const char *fileName)
Gaudi::Property< bool > m_rejectanybrl
bool passThisRunLB(const std::vector< std::string > &grlnameVec=std::vector< std::string >(), const std::vector< std::string > &brlnameVec=std::vector< std::string >())
called for each event by GoodRunsListSelectorAlg to decide if the event should be passed
StatusCode finalize()
Finalize AlgTool.
std::unique_ptr< Root::TGRLCollection > m_grlcollection
const std::map< std::string, vvPair > & getGRLSelectorRegistry()
get GRL selector registry
std::unique_ptr< Root::TGoodRunsListReader > m_reader
Gaudi::Property< std::vector< std::string > > m_goodrunslistVec
StatusCode initialize()
Initialize AlgTool.
const Root::TGRLCollection * getBRLCollection() const
std::map< std::string, vvPair > m_registry