ATLAS Offline Software
AANTEventSelector.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 ANALYSISTOOLS_AANTEVENTSELECTOR_H
6 #define ANALYSISTOOLS_AANTEVENTSELECTOR_H
7 
8 // AANTEventSelector
9 
10 // Include files.
11 #ifdef _POSIX_C_SOURCE
12 # undef _POSIX_C_SOURCE
13 #endif
14 #ifdef _XOPEN_SOURCE
15 # undef _XOPEN_SOURCE
16 #endif
17 #include "Python.h"
18 
21 #include "GaudiKernel/IEvtSelector.h"
22 #include "GaudiKernel/IProperty.h"
23 #include "GaudiKernel/MsgStream.h"
24 #include "GaudiKernel/Bootstrap.h"
25 
26 #include "Rtypes.h"
27 
28 // Forward declarations.
29 class ISvcLocator;
30 class StoreGateSvc;
31 class TChain;
32 
33 // Class AANTEventSelector.
35  virtual public IEvtSelector,
36  virtual public IProperty
37 {
38 public:
39 
40  // Standard Constructor.
41  AANTEventSelector(const std::string& name, ISvcLocator* svcloc);
42 
43  // Standard Destructor.
45 
46  // Implementation of Service base class methods.
47  virtual StatusCode initialize();
48 
49  // Implementation of the IEvtSelector interface methods.
50  virtual StatusCode createContext(Context*& it) const;
51  virtual StatusCode next(Context& it) const;
52  virtual StatusCode next(Context& it, int jump) const;
53  virtual StatusCode previous(Context& it) const;
54  virtual StatusCode previous(Context& it, int jump) const;
55 
56  virtual StatusCode last(Context& it) const;
57  virtual StatusCode rewind(Context& it) const;
58 
59  virtual StatusCode createAddress(const Context& it,IOpaqueAddress*& iop) const;
60  virtual StatusCode releaseContext(Context*& it) const;
61  virtual StatusCode resetCriteria(const std::string& criteria, Context& context) const;
62 
63  // Implementation of IInterface methods.
64  virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface);
65 
66 private:
67  // StoreGateSvc
69 
70  // property
71  StringArrayProperty m_inputCollectionsProp;
72 
73  // Number of events to skip at the beginning
75 
76  // Number of Events read so far.
77  mutable long m_numEvents;
78 
79  // Total number of events
81 
82  // name of converter for TTree
83  std::string m_strConverter;
84 
85  // name of selection criteria
86  std::string m_strSelection;
87 
88  // TChain
89  TChain *m_tree;
90 
91  Long64_t m_runNumber;
92  Long64_t m_eventNumber;
93 
94  // Py I/F
97 };
98 
99 
101 {
102 public:
103  static void setTree (TChain *chain) { m_tree = chain;}
104  static TChain * getTree () { return m_tree; }
105 private:
106  static TChain *m_tree;
107 };
108 
109 #endif
AANTEventSelector
Definition: AANTEventSelector.h:37
runLayerRecalibration.chain
chain
Definition: runLayerRecalibration.py:175
AANTTreeGate
Definition: AANTEventSelector.h:101
AANTEventSelector::m_tree
TChain * m_tree
Definition: AANTEventSelector.h:89
AANTEventSelector::m_convFunc
PyObject * m_convFunc
Definition: AANTEventSelector.h:95
ATLAS_NOT_THREAD_SAFE
#define ATLAS_NOT_THREAD_SAFE
getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats
Definition: checker_macros.h:212
AANTTreeGate::setTree
static void setTree(TChain *chain)
Definition: AANTEventSelector.h:103
AANTEventSelector::m_strConverter
std::string m_strConverter
Definition: AANTEventSelector.h:83
initialize
void initialize()
Definition: run_EoverP.cxx:894
skel.it
it
Definition: skel.GENtoEVGEN.py:423
AANTEventSelector::m_storeGate
StoreGateSvc * m_storeGate
Definition: AANTEventSelector.h:68
AANTEventSelector::m_skipEvents
int m_skipEvents
Definition: AANTEventSelector.h:74
AANTEventSelector::m_inputCollectionsProp
StringArrayProperty m_inputCollectionsProp
Definition: AANTEventSelector.h:71
AANTEventSelector::m_runNumber
Long64_t m_runNumber
Definition: AANTEventSelector.h:91
StoreGateSvc
The Athena Transient Store API.
Definition: StoreGateSvc.h:128
fillPileUpNoiseLumi.next
next
Definition: fillPileUpNoiseLumi.py:52
AANTTreeGate::m_tree
static TChain * m_tree
Definition: AANTEventSelector.h:106
AANTEventSelector::m_selectionFunc
PyObject * m_selectionFunc
Definition: AANTEventSelector.h:96
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthService
Definition: AthService.h:32
AANTEventSelector::m_numEvents
long m_numEvents
Definition: AANTEventSelector.h:77
AANTEventSelector::m_strSelection
std::string m_strSelection
Definition: AANTEventSelector.h:86
AANTEventSelector::m_eventNumber
Long64_t m_eventNumber
Definition: AANTEventSelector.h:92
AANTEventSelector::m_totalNEvents
long m_totalNEvents
Definition: AANTEventSelector.h:80
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
AANTTreeGate::getTree
static TChain * getTree()
Definition: AANTEventSelector.h:104
AthService.h
checker_macros.h
Define macros for attributes used to control the static checker.
PyObject
_object PyObject
Definition: IPyComponent.h:26
Trk::previous
@ previous
Definition: BinningData.h:32