ATLAS Offline Software
GoodRunsListSelectorTool.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 #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 : public extends<AthAlgTool, IGoodRunsListSelectorTool, IAthenaEvtLoopPreSelectTool>
36 {
37  public:
38  GoodRunsListSelectorTool( const std::string&, const std::string&, const IInterface* );
39  virtual ~GoodRunsListSelectorTool();
40 
44  bool passEvent(const EventIDBase& pEvent) ;
47 
49  bool passRunLB( int runNumber, int lumiBlockNr,
50  const std::vector<std::string>& grlnameVec=std::vector<std::string>(),
51  const std::vector<std::string>& brlnameVec=std::vector<std::string>() ) ;
53  bool passThisRunLB( const std::vector<std::string>& grlnameVec=std::vector<std::string>(),
54  const std::vector<std::string>& brlnameVec=std::vector<std::string>() ) ;
56  bool registerGRLSelector(const std::string& name, const std::vector<std::string>& grlnameVec, const std::vector<std::string>& brlnameVec);
58  const std::map< std::string, vvPair >& getGRLSelectorRegistry() { return m_registry; }
59 
63 
64  protected:
65 
66  bool fileExists(const char* fileName);
67 
68  std::vector<std::string> m_goodrunslistVec;
69  std::vector<std::string> m_blackrunslistVec;
70 
73 
75 
76  std::map< std::string,TFormula* > m_dqformula;
77 
78  int m_boolop;
80  bool m_usecool;
81  bool m_verbose;
84 
85  std::map< std::string, vvPair > m_registry;
86 
87 };
88 
89 #endif
90 
Root::TGoodRunsListReader
Definition: TGoodRunsListReader.h:34
RegularFormula.h
GoodRunsListSelectorTool::m_boolop
int m_boolop
Definition: GoodRunsListSelectorTool.h:78
Root
Definition: GoodRunsListSelectorTool.h:30
IGoodRunsListSelectorTool.h
GoodRunsListSelectorTool::m_grlcollection
Root::TGRLCollection * m_grlcollection
Definition: GoodRunsListSelectorTool.h:71
GoodRunsListSelectorTool::fileExists
bool fileExists(const char *fileName)
Definition: GoodRunsListSelectorTool.cxx:278
GoodRunsListSelectorTool::m_rejectanybrl
bool m_rejectanybrl
Definition: GoodRunsListSelectorTool.h:82
GoodRunsListSelectorTool::m_goodrunslistVec
std::vector< std::string > m_goodrunslistVec
Definition: GoodRunsListSelectorTool.h:68
GoodRunsListSelectorTool::~GoodRunsListSelectorTool
virtual ~GoodRunsListSelectorTool()
Definition: GoodRunsListSelectorTool.cxx:46
GoodRunsListSelectorTool::getBRLCollection
const Root::TGRLCollection * getBRLCollection() const
Definition: GoodRunsListSelectorTool.h:62
GoodRunsListSelectorTool
This file contains the class definition for the GoodRunsListSelectorTool class.
Definition: GoodRunsListSelectorTool.h:36
GoodRunsListSelectorTool::m_eventselectormode
bool m_eventselectormode
Definition: GoodRunsListSelectorTool.h:83
GoodRunsListSelectorTool::finalize
StatusCode finalize()
Finalize AlgTool.
Definition: GoodRunsListSelectorTool.cxx:270
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:212
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:300
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgTool.h
IAthenaEvtLoopPreSelectTool.h
This file contains the class definition for the IAthenaEvtLoopPreSelectTool class.
GoodRunsListSelectorTool::m_brlcollection
Root::TGRLCollection * m_brlcollection
Definition: GoodRunsListSelectorTool.h:72
GoodRunsListSelectorTool::m_dqformula
std::map< std::string, TFormula * > m_dqformula
Definition: GoodRunsListSelectorTool.h:76
GoodRunsListSelectorTool::getGRLSelectorRegistry
const std::map< std::string, vvPair > & getGRLSelectorRegistry()
get GRL selector registry
Definition: GoodRunsListSelectorTool.h:58
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:147
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
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:178
DeMoAtlasDataLoss.runNumber
string runNumber
Definition: DeMoAtlasDataLoss.py:64
GoodRunsListSelectorTool::m_blackrunslistVec
std::vector< std::string > m_blackrunslistVec
Definition: GoodRunsListSelectorTool.h:69
GoodRunsListSelectorTool::m_usecool
bool m_usecool
Definition: GoodRunsListSelectorTool.h:80
GoodRunsListSelectorTool::m_registry
std::map< std::string, vvPair > m_registry
Definition: GoodRunsListSelectorTool.h:85
GoodRunsListSelectorTool::getGRLCollection
const Root::TGRLCollection * getGRLCollection() const
get grl/brl collection
Definition: GoodRunsListSelectorTool.h:61
GoodRunsListSelectorTool::m_passthrough
bool m_passthrough
Definition: GoodRunsListSelectorTool.h:79
GoodRunsListSelectorTool::initialize
StatusCode initialize()
Initialize AlgTool.
Definition: GoodRunsListSelectorTool.cxx:63
GoodRunsListSelectorTool::m_verbose
bool m_verbose
Definition: GoodRunsListSelectorTool.h:81
GoodRunsListSelectorTool::m_reader
Root::TGoodRunsListReader * m_reader
Definition: GoodRunsListSelectorTool.h:74