|
ATLAS Offline Software
|
Go to the documentation of this file.
11 #ifndef ATHENAROOTCOMPS_ATHENA_ROOTNTUPLEEVENTSELECTOR_H
12 #define ATHENAROOTCOMPS_ATHENA_ROOTNTUPLEEVENTSELECTOR_H 1
15 #include <unordered_map>
19 #include "GaudiKernel/IEvtSelector.h"
20 #include "GaudiKernel/IIoComponent.h"
21 #include "GaudiKernel/IIncidentSvc.h"
22 #include "GaudiKernel/MsgStream.h"
23 #include "Gaudi/Property.h"
24 #include "GaudiKernel/ServiceHandle.h"
30 #include "TObjString.h"
38 namespace Athena {
class RootNtupleEventContext; }
46 public extends<AthService,
47 IEvtSelector, IEvtSelectorSeek,
48 IAddressProvider, IIoComponent, IIncidentListener>
69 virtual void handle(
const Incident& incident)
override;
73 virtual StatusCode createContext( Context*& refpCtxt )
const override;
75 virtual StatusCode last( Context& refContext )
const override;
77 virtual StatusCode next( Context& refCtxt,
int jump )
const override;
80 virtual StatusCode rewind( Context& refCtxt )
const override;
82 virtual StatusCode createAddress(
const Context& refCtxt,
83 IOpaqueAddress*& )
const override;
84 virtual StatusCode releaseContext( Context*& refCtxt )
const override;
85 virtual StatusCode resetCriteria(
const std::string& cr,
86 Context& ctx )
const override;
95 virtual StatusCode seek (Context& refCtxt,
int evtnum)
const override;
101 virtual int curEvent (
const Context& refCtxt)
const override;
121 const EventContext& ctx)
override;
125 virtual int size (Context& refCtxt)
const override;
143 void setupInputCollection( Gaudi::Details::PropertyBase& inputCollectionsName );
151 TTree* fetchNtuple(
const std::string&
fname,
152 const std::string& tupleName)
const;
154 void addMetadataFromDirectoryName(
const std::string &metadirname,
156 const std::string &
prefix =
"")
const;
157 void addMetadataFromDirectory(TDirectoryFile *metadir,
158 const std::string &
prefix =
"")
const;
160 void addMetadata(TObjString *metastring,
const std::string &
path =
"")
const;
165 const std::string&
prefix)
const;
174 void find_coll_idx(
int evtidx,
long& coll_idx,
long& tuple_idx)
const;
274 #endif //> ATHENAROOTCOMPS_ATHENA_ROOTNTUPLEEVENTSELECTOR_H
long m_skipEvts
Number of events to skip at the beginning.
ServiceHandle< IIncidentSvc > IIncSvc_t
IIncSvc_t m_incsvc
Handle to the incident service.
def finalize(self)
_info( "content of StoreGate..." ) self.sg.dump()
ServiceHandle< StoreGateSvc > StoreGateSvc_t
StringProperty m_tupleName
Name of TTree to load from collection of input files.
path
python interpreter configuration --------------------------------------—
ServiceHandle< IClassIDSvc > ICLIDSvc_t
StringArrayProperty m_inputCollectionsName
List of input files containing TTree.
IDictSvc_t m_dictsvc
Pointer to the IDictLoaderSvc.
long m_nbrEvts
Number of Events read so far.
TTree * m_tuple
current tree being read
The Athena Transient Store API.
Class implementing the GAUDI IEvtSelector interface using ROOT TTree as a backend.
std::vector< std::string > m_tupleNames
Names of all trees over which to iterate.
Some weak symbol referencing magic...
long m_curEvt
current event index
::StatusCode StatusCode
StatusCode definition for legacy code.
StoreGateSvc_t m_ometaStore
Pointer to the StoreGateSvc output metadata store.
std::vector< std::vector< CollMetaData > > m_collEvts
cache of the number of entries for each collection Indexed like [tuple][collection]
bool m_needReload
The (python) selection function to apply on the TChain we are reading.
std::vector< TFile * > m_files
ICLIDSvc_t m_clidsvc
Pointer to the IClassIDSvc.
StoreGateSvc_t m_dataStore
Pointer to the StoreGateSvc event store.
StoreGateSvc_t m_imetaStore
Pointer to the StoreGateSvc input metadata store.
Extension to IEvtSelector to allow for seeking.
Define macros for attributes used to control the static checker.
ServiceHandle< IDictLoaderSvc > IDictSvc_t
void DebugAids::stacktraceLine ATLAS_NOT_THREAD_SAFE(IOFD fd, unsigned long addr)
Write out stack trace line to FD.
StringArrayProperty m_activeBranchNames
List of branches to activate in the TTree.