ATLAS Offline Software
GoodRunsListSelectorTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef GoodRunsLists_GoodRunsListSelectorTool_H
6 #define GoodRunsLists_GoodRunsListSelectorTool_H
7 
17 
18 #include <vector>
19 #include <string>
20 #include <map>
21 
22 //typedef std::pair< std::vector<std::string>, std::vector<std::string> > vvPair;
23 
28 class TFormula;
29 
30 namespace Root {
31  class TGRLCollection;
32  class TGoodRunsListReader;
33 }
34 
35 class GoodRunsListSelectorTool : virtual public AthAlgTool, virtual public IGoodRunsListSelectorTool, virtual public IAthenaEvtLoopPreSelectTool
36 {
37  public:
38  GoodRunsListSelectorTool( const std::string&, const std::string&, const IInterface* );
39  virtual ~GoodRunsListSelectorTool();
40 
42  StatusCode queryInterface( const InterfaceID& riid, void** ppvIf );
43 
47  bool passEvent(const EventIDBase& pEvent) ;
50 
52  //static const InterfaceID& interfaceID() {
53  // return IAthenaEvtLoopPreSelectTool::interfaceID();
54  // //return IGoodRunsListSelectorTool::interfaceID();
55  //}
56 
58  bool passRunLB( int runNumber, int lumiBlockNr,
59  const std::vector<std::string>& grlnameVec=std::vector<std::string>(),
60  const std::vector<std::string>& brlnameVec=std::vector<std::string>() ) ;
62  bool passThisRunLB( const std::vector<std::string>& grlnameVec=std::vector<std::string>(),
63  const std::vector<std::string>& brlnameVec=std::vector<std::string>() ) ;
65  bool registerGRLSelector(const std::string& name, const std::vector<std::string>& grlnameVec, const std::vector<std::string>& brlnameVec);
67  const std::map< std::string, vvPair >& getGRLSelectorRegistry() { return m_registry; }
68 
72 
73  protected:
74 
75  bool fileExists(const char* fileName);
76 
77  std::vector<std::string> m_goodrunslistVec;
78  std::vector<std::string> m_blackrunslistVec;
79 
82 
84 
85  std::map< std::string,TFormula* > m_dqformula;
86 
87  int m_boolop;
89  bool m_usecool;
90  bool m_verbose;
93 
94  std::map< std::string, vvPair > m_registry;
95 
96 };
97 
98 #endif
99 
Root::TGoodRunsListReader
Definition: TGoodRunsListReader.h:34
RegularFormula.h
GoodRunsListSelectorTool::m_boolop
int m_boolop
Definition: GoodRunsListSelectorTool.h:87
Root
Definition: GoodRunsListSelectorTool.h:30
IGoodRunsListSelectorTool.h
IAthenaEvtLoopPreSelectTool
This class provides the interface for AthenaEvtLoopPreSelectTool classes used by AthenaEventLoopMgr.
Definition: IAthenaEvtLoopPreSelectTool.h:22
GoodRunsListSelectorTool::m_grlcollection
Root::TGRLCollection * m_grlcollection
Definition: GoodRunsListSelectorTool.h:80
GoodRunsListSelectorTool::fileExists
bool fileExists(const char *fileName)
Definition: GoodRunsListSelectorTool.cxx:294
GoodRunsListSelectorTool::m_rejectanybrl
bool m_rejectanybrl
Definition: GoodRunsListSelectorTool.h:91
GoodRunsListSelectorTool::m_goodrunslistVec
std::vector< std::string > m_goodrunslistVec
Definition: GoodRunsListSelectorTool.h:77
GoodRunsListSelectorTool::~GoodRunsListSelectorTool
virtual ~GoodRunsListSelectorTool()
Definition: GoodRunsListSelectorTool.cxx:49
GoodRunsListSelectorTool::getBRLCollection
const Root::TGRLCollection * getBRLCollection() const
Definition: GoodRunsListSelectorTool.h:71
GoodRunsListSelectorTool
This file contains the class definition for the GoodRunsListSelectorTool class.
Definition: GoodRunsListSelectorTool.h:36
GoodRunsListSelectorTool::m_eventselectormode
bool m_eventselectormode
Definition: GoodRunsListSelectorTool.h:92
IGoodRunsListSelectorTool
Definition: IGoodRunsListSelectorTool.h:19
GoodRunsListSelectorTool::finalize
StatusCode finalize()
Finalize AlgTool.
Definition: GoodRunsListSelectorTool.cxx:286
GoodRunsListSelectorTool::passRunLB
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
Definition: GoodRunsListSelectorTool.cxx:228
FortranAlgorithmOptions.fileName
fileName
Definition: FortranAlgorithmOptions.py:13
GoodRunsListSelectorTool::registerGRLSelector
bool registerGRLSelector(const std::string &name, const std::vector< std::string > &grlnameVec, const std::vector< std::string > &brlnameVec)
register grl/brl combination
Definition: GoodRunsListSelectorTool.cxx:316
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
GoodRunsListSelectorTool::queryInterface
StatusCode queryInterface(const InterfaceID &riid, void **ppvIf)
To allow access to the IGoodRunsListSelectorTool interface.
Definition: GoodRunsListSelectorTool.cxx:66
AthAlgTool.h
IAthenaEvtLoopPreSelectTool.h
This file contains the class definition for the IAthenaEvtLoopPreSelectTool class.
GoodRunsListSelectorTool::m_brlcollection
Root::TGRLCollection * m_brlcollection
Definition: GoodRunsListSelectorTool.h:81
GoodRunsListSelectorTool::m_dqformula
std::map< std::string, TFormula * > m_dqformula
Definition: GoodRunsListSelectorTool.h:85
GoodRunsListSelectorTool::getGRLSelectorRegistry
const std::map< std::string, vvPair > & getGRLSelectorRegistry()
get GRL selector registry
Definition: GoodRunsListSelectorTool.h:67
GoodRunsListSelectorTool::GoodRunsListSelectorTool
GoodRunsListSelectorTool(const std::string &, const std::string &, const IInterface *)
Definition: GoodRunsListSelectorTool.cxx:23
Root::TGRLCollection
Definition: TGRLCollection.h:29
GoodRunsListSelectorTool::passEvent
bool passEvent(const EventIDBase &pEvent)
called for each event by EventSelector to decide if the event should be passed
Definition: GoodRunsListSelectorTool.cxx:163
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
GoodRunsListSelectorTool::passThisRunLB
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
Definition: GoodRunsListSelectorTool.cxx:194
DeMoAtlasDataLoss.runNumber
string runNumber
Definition: DeMoAtlasDataLoss.py:64
GoodRunsListSelectorTool::m_blackrunslistVec
std::vector< std::string > m_blackrunslistVec
Definition: GoodRunsListSelectorTool.h:78
GoodRunsListSelectorTool::m_usecool
bool m_usecool
Definition: GoodRunsListSelectorTool.h:89
GoodRunsListSelectorTool::m_registry
std::map< std::string, vvPair > m_registry
Definition: GoodRunsListSelectorTool.h:94
GoodRunsListSelectorTool::getGRLCollection
const Root::TGRLCollection * getGRLCollection() const
get grl/brl collection
Definition: GoodRunsListSelectorTool.h:70
GoodRunsListSelectorTool::m_passthrough
bool m_passthrough
Definition: GoodRunsListSelectorTool.h:88
AthAlgTool
Definition: AthAlgTool.h:26
GoodRunsListSelectorTool::initialize
StatusCode initialize()
Initialize AlgTool.
Definition: GoodRunsListSelectorTool.cxx:79
GoodRunsListSelectorTool::m_verbose
bool m_verbose
Definition: GoodRunsListSelectorTool.h:90
GoodRunsListSelectorTool::m_reader
Root::TGoodRunsListReader * m_reader
Definition: GoodRunsListSelectorTool.h:83