ATLAS Offline Software
REvent.h
Go to the documentation of this file.
1 // Dear emacs, this is -*- c++ -*-
2 //
3 // Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
4 //
5 #ifndef XAODROOTACCESS_REVENT_H
6 #define XAODROOTACCESS_REVENT_H
7 
8 // STL include(s):
9 #include <unordered_map>
10 #include <set>
11 #include <string>
12 #include <vector>
13 #include <memory>
14 #include <unordered_map>
15 
16 // ROOT include(s):
17 #include <Rtypes.h>
18 #include <ROOT/REntry.hxx>
19 #include <ROOT/RNTupleModel.hxx>
20 #include <ROOT/RNTupleReader.hxx>
21 #include <ROOT/RNTupleWriter.hxx>
22 #include <ROOT/RError.hxx>
23 
24 // EDM include(s):
30 #include "CxxUtils/sgkey_t.h"
31 
32 // Interface include(s):
34 
35 // Local include(s):
39 
40 // Make the RNTuple types available in the ROOT namespace
41 // with all versions of ROOT.
42 #if ROOT_VERSION_CODE < ROOT_VERSION(6, 35, 1)
43 namespace ROOT {
44 using Experimental::RNTupleReader;
45 using Experimental::RNTupleWriter;
46 using Experimental::REntry;
47 using Experimental::RException;
48 using Experimental::kInvalidDescriptorId;
49 } // namespace ROOT
50 #endif // ROOT_VERSION_CODE < ROOT_VERSION(6, 36, 0)
51 
52 
53 // Forward declaration(s):
54 class TFile;
55 class TChain;
56 class TTree;
57 namespace std {
58  class type_info;
59 }
60 namespace SG {
61  class IAuxStore;
62 }
63 namespace xAODPrivate {
64  class RHolderBucket;
65  class RLoader;
66 }
67 // namespace CP {
68 // class xAODWriterAlg;
69 // }
70 // class xAODTEventBranch;
71 // class xAODTMetaBranch;
72 
73 namespace xAOD {
74 
75  // Forward declaration(s):
76  class TVirtualManager;
77  class TVirtualIncidentListener;
78  class TObjectManager;
79  // class TAuxStore;
80  class THolder;
81  // ::TTree* MakeTransientTree ATLAS_NOT_THREAD_SAFE ( REvent&, const char* );
82 
83  namespace Experimental {
84 
85  // Forward declaration(s):
86  class RObjectManager;
87  class REvent;
88 
101 
102 #ifdef XAOD_STANDALONE
103  class REvent : public TVirtualEvent, IProxyDict {
104 #else
105  class REvent : public TVirtualEvent, public implements<IProxyDict> {
106 #endif
107  // Declare the friend functions/classes:
108  // friend ::TTree* MakeTransientTree( REvent&, const char* );
109  // friend class ::xAODTEventBranch;
110  // friend class ::xAODTMetaBranch;
112  friend class xAODPrivate::RLoader;
113  // friend class CP::xAODWriterAlg;
114 
115  public:
116 
118  enum EAuxMode {
122  kUndefinedAccess = 3
123  };
124 
127 
129  virtual ~REvent();
130 
132  REvent( const REvent& parent ) = delete;
133 
135  REvent& operator=( const REvent& rhs ) = delete;
136 
138  EAuxMode auxMode() const;
139 
141  std::string dump();
142 
144  void printIOStats() const;
145 
149  void setPrintEventProxyWarnings(bool);
150 
153 
160  StatusCode readFrom( const std::string& fileName );
161 
162  // /// Connect the object to an output file
163  // StatusCode writeTo( ::TFile* file, Int_t autoFlush = 200,
164  // const char* treeName = EVENT_RNTUPLE_NAME );
165  // /// Finish writing to an output file
166  // StatusCode finishWritingTo( ::TFile* file );
167 
169  void setActive() const;
170 
172  void setAuxItemList( const std::string& containerKey,
173  const std::string& itemList );
174 
180  void clearListeners();
181 
183  StatusCode addNameRemap( const std::string& onfile,
184  const std::string& newName );
186  void clearNameRemap();
188  void printNameRemap() const;
189 
191 
194 
196  template< typename T >
197  ::Bool_t contains( const std::string& key );
199  template< typename T >
200  ::Bool_t transientContains( const std::string& key ) const;
201 
203  template< typename T >
204  StatusCode retrieve( const T*& obj, const std::string& key );
206  template< typename T >
207  StatusCode retrieve( T*& obj, const std::string& key );
208 
209  // /// Add an output object to the event
210  // template< typename T >
211  // StatusCode record( T* obj, const std::string& key,
212  // ::Int_t basketSize = 32000, ::Int_t splitLevel = 0 );
213  // /// Add an output object to the event, explicitly taking ownership of it
214  // template< typename T >
215  // StatusCode record( std::unique_ptr< T > obj, const std::string& key,
216  // ::Int_t basketSize = 32000, ::Int_t splitLevel = 0 );
217 
218  // /// Add an auxiliary store object to the output
219  // SG::IAuxStore* recordAux( const std::string& key,
220  // SG::IAuxStoreHolder::AuxStoreType type =
221  // SG::IAuxStoreHolder::AST_ContainerStore,
222  // Int_t basketSize = 32000,
223  // Int_t splitLevel = 0 );
224 
225  // /// Copy an object directly from the input to the output
226  // StatusCode copy( const std::string& key,
227  // ::Int_t basketSize = 32000, ::Int_t splitLevel = 0 );
228  // /// Copy all (ROOT readable) objects directly from the input to the output
229  // StatusCode copy( ::Int_t basketSize = 32000, ::Int_t splitLevel = 0 );
230 
232 
235 
237  template< typename T >
238  ::Bool_t containsMeta( const std::string& key );
240  template< typename T >
241  ::Bool_t transientContainsMeta( const std::string& key ) const;
242 
244  template< typename T >
245  StatusCode retrieveMetaInput( const T*& obj, const std::string& key );
246 
248  template< typename T >
249  StatusCode retrieveMetaOutput( const T*& obj, const std::string& key );
250  // /// Retrieve an output metadata object
251  // template< typename T >
252  // StatusCode retrieveMetaOutput( T*& obj, const std::string& key );
253 
255  template< typename T >
256  StatusCode recordMeta( T* obj, const std::string& key,
257  ::Int_t basketSize = 32000,
258  ::Int_t splitLevel = 1 );
261  template< typename T >
262  StatusCode recordMeta( std::unique_ptr< T > obj, const std::string& key,
263  ::Int_t basketSize = 32000,
264  ::Int_t splitLevel = 1 );
265 
267 
270 
272  ::Long64_t getEntries() const;
274  ::Int_t getEntry( ::Long64_t entry, ::Int_t getall = 0 );
275 
278  // /// Get how many files are available on the currently defined input
279  // ::Long64_t getFiles() const;
280  // /// Load the first event for a given file from the input TChain
281  // ::Int_t getFile( ::Long64_t file, ::Int_t getall = 0 );
282 
283  // /// Function filling one event into the output tree
284  // ::Int_t fill();
285 
287  const EventFormat* inputEventFormat() const;
288  // /// Get information about the output objects
289  // const EventFormat* outputEventFormat() const;
290 
292 
295 
297  SG::sgkey_t getHash( const std::string& key ) const override;
299  SG::sgkey_t getKey( const void* obj ) const override;
301  const std::string& getName( const void* obj ) const override;
303  const std::string& getName( SG::sgkey_t hash ) const override;
304 
306  // Declared public so we can call it from python.
307  StatusCode record( void* obj, const std::string& typeName,
308  const std::string& key);
309  // const std::string& key,
310  // ::Int_t basketSize, ::Int_t splitLevel,
311  // ::Bool_t overwrite = kFALSE,
312  // ::Bool_t metadata = kFALSE,
313  // ::Bool_t isOwner = kTRUE );
314 
315  // RDS: TEvent version:
316  // /// Internal function for recording an object into the output
317  // // Declared public so we can call it from python.
318  // StatusCode record( void* obj, const std::string& typeName,
319  // const std::string& key,
320  // ::Int_t basketSize, ::Int_t splitLevel,
321  // ::Bool_t overwrite = kFALSE,
322  // ::Bool_t metadata = kFALSE,
323  // ::Bool_t isOwner = kTRUE );
324 
325  protected:
326  // /// Function for retrieving an output object in a non-template way
328  const std::type_info& ti ) override;
330  const void* getInputObject( SG::sgkey_t key,
331  const std::type_info& ti,
332  bool silent = false ) override;
333 
335  void getNames(const std::string& targetClassName,
336  std::vector<std::string>& vkeys,
337  bool metadata = false) const override;
338 
340 
343 
345  SG::DataProxy* proxy( const void* const pTransient ) const override;
346 
348  SG::DataProxy* proxy( const CLID& id,
349  const std::string& key ) const override;
350 
352  SG::DataProxy* proxy_exact( SG::sgkey_t sgkey ) const override;
353 
355  StatusCode addToStore( CLID id, SG::DataProxy* proxy ) override;
356 
358  std::vector< const SG::DataProxy* > proxies() const override;
359 
361  SG::sgkey_t stringToKey( const std::string& str, CLID clid ) override;
362 
364  const std::string* keyToString( SG::sgkey_t key ) const override;
365 
367  const std::string* keyToString( SG::sgkey_t key,
368  CLID& clid ) const override;
369 
371  void registerKey( SG::sgkey_t key, const std::string& str,
372  CLID clid ) override;
373 
377  const std::string& key,
378  bool allowMods,
379  bool returnExisting ) override;
380 
382  const std::string& name() const override;
383 
385 
388  // /// Function for retrieving an output object in a non-template way
389  void* getOutputObject( const std::string& key,
390  const std::type_info& ti,
391  ::Bool_t metadata = kFALSE ) const;
393  const void* getInputObject( const std::string& key,
394  const std::type_info& ti,
395  ::Bool_t silent = kFALSE,
396  ::Bool_t metadata = kFALSE );
397  // /// Internal function for adding an auxiliary store object to the output
398  // StatusCode record( TAuxStore* store, const std::string& key,
399  // ::Int_t basketSize, ::Int_t splitLevel,
400  // ::Bool_t ownsStore = kFALSE );
402  StatusCode connectBranch( const std::string& key,
403  ::Bool_t silent = kFALSE );
405  StatusCode connectMetaBranch( const std::string& key,
406  ::Bool_t silent = kFALSE );
408  StatusCode connectAux( const std::string& prefix, ::Bool_t standalone );
411  StatusCode connectMetaAux( const std::string& prefix,
412  ::Bool_t standalone );
413 
414 
420  StatusCode setUpDynamicStore( RObjectManager& mgr, ROOT::RNTupleReader* ntupleReader );
421 
422 
425  ::Bool_t metadata = kFALSE );
428 
429  // /// Function saving the dynamically created auxiliary properties
430  // StatusCode putAux( ::TTree& outTree, TVirtualManager& mgr,
431  // ::Int_t basketSize = 32000, ::Int_t splitLevel = 0,
432  // ::Bool_t metadata = kFALSE );
433 
437 
439  static ::Bool_t hasAuxStore( const THolder& holder );
440 
442  static ::Bool_t isAuxStore( const THolder& holder );
443 
445  static ::Bool_t isStandalone( const THolder& holder );
446 
448  ::Bool_t contains( const std::string& key,
449  const std::type_info& ti,
450  ::Bool_t metadata = kFALSE );
452  ::Bool_t transientContains( const std::string& key,
453  const std::type_info& ti,
454  ::Bool_t metadata = kFALSE ) const;
455 
457  typedef std::unordered_map< std::string,
460  typedef std::vector< TVirtualIncidentListener* > Listener_t;
461 
463  static const ::Int_t CACHE_SIZE;
465  static const char* const EVENT_RNTUPLE_NAME;
467  static const char* const METADATA_TREE_NAME;
468 
471 
473  std::unique_ptr<ROOT::RNTupleReader> m_inNtupleReader;
474 
476  ::TTree* m_inMetaTree;
477 
480 
482  ::Long64_t m_entry;
483 
485  ::TTree* m_outTree;
486 
489 
492  std::set< std::string > m_inputMissingObjects;
495 
500 
505 
507  std::unordered_map< std::string, std::set< std::string > > m_auxItemList;
508 
511 
513  std::unordered_map< std::string, std::string > m_nameRemapping;
514 
517 
520 
522  struct BranchInfo {
524  std::unique_ptr< SG::DataProxy > m_proxy;
526  const ::TClass* m_class = 0;
527  }; // struct BranchInfo
528 
530  typedef AthContainers_detail::upgrade_mutex upgrade_mutex_t;
533 
535  mutable SG::SGKeyMap< BranchInfo > m_branches ATLAS_THREAD_SAFE; // protected by mutex
536 
538 
541 
545 
547  const BranchInfo* getBranchInfo( SG::sgkey_t sgkey ) const;
548 
550 
551  }; // class REvent
552 
553  } // namepace Experimental
554 
555 } // namespace xAOD
556 
557 // Include the template implementation(s).
558 #include "REvent.icc"
559 
560 #endif // XAODROOTACCESS_REVENT_H
xAOD::Experimental::REvent::m_inputMissingObjects
std::set< std::string > m_inputMissingObjects
Objects that have been asked for, but were found to be missing in the current input.
Definition: REvent.h:492
xAOD::Experimental::REvent::transientContains
::Bool_t transientContains(const std::string &key) const
Function checking if an object is already in memory.
xAOD::TVirtualEvent
Base interface for getting objects out of the input file.
Definition: TVirtualEvent.h:32
xAOD::Experimental::REvent::kBranchAccess
@ kBranchAccess
Access auxiliary data branch-by-branch.
Definition: REvent.h:119
common.sgkey
def sgkey(tool)
Definition: common.py:1027
xAOD::Experimental::REvent::m_outputObjects
Object_t m_outputObjects
Collection of all the managed output object.
Definition: REvent.h:494
xAOD::Experimental::REvent
Tool for accessing xAOD files outside of Athena, version RNTuple.
Definition: REvent.h:105
xAOD::Experimental::REvent::retrieve
StatusCode retrieve(const T *&obj, const std::string &key)
Retrieve either an input or an output object from the event.
IAuxStoreHolder.h
xAOD::Experimental::REvent::contains
::Bool_t contains(const std::string &key)
Function checking if an object is available from the store.
SG
Forward declaration.
Definition: CaloCellPacker_400_500.h:32
xAOD::Experimental::REvent::m_branchesMutex
upgrade_mutex_t m_branchesMutex
Definition: REvent.h:532
xAOD::Experimental::REvent::removeListener
StatusCode removeListener(TVirtualIncidentListener *listener)
Remove an incident listener object.
Definition: REvent.cxx:790
xAOD::Experimental::REvent::Object_t
std::unordered_map< std::string, TVirtualManager * > Object_t
Definition of the internal data structure type.
Definition: REvent.h:458
L1CaloPhase1Monitoring.standalone
standalone
Definition: L1CaloPhase1Monitoring.py:139
xAOD::Experimental::REvent::dump
std::string dump()
Function creating a user-readable dump of the current input.
Definition: REvent.cxx:223
xAOD::Experimental::REvent::getEntries
::Long64_t getEntries() const
Get how many entries are available from the current input file(s)
Definition: REvent.cxx:1137
xAOD::Experimental::REvent::recordMeta
StatusCode recordMeta(T *obj, const std::string &key, ::Int_t basketSize=32000, ::Int_t splitLevel=1)
Add an object to the output file's metadata.
xAOD::Experimental::REvent::EAuxMode
EAuxMode
Auxiliary store "mode".
Definition: REvent.h:118
xAOD::Experimental::REvent::getOutputObject
void * getOutputObject(SG::sgkey_t key, const std::type_info &ti) override
This function is used by the TVirtualEvent interface to access an output object with a given hashed k...
Definition: REvent.cxx:1707
xAOD::Experimental::REvent::getBranchInfo
const BranchInfo * getBranchInfo(SG::sgkey_t sgkey) const
Get the object describing one object/branch.
Definition: REventProxyDict.cxx:279
xAOD::Experimental::RObjectManager
Manager for EDM objects created by ROOT.
Definition: RObjectManager.h:43
xAOD::Experimental::REvent::operator=
REvent & operator=(const REvent &rhs)=delete
Do not allow copying this object.
xAOD::THolder
This class takes care of holding EDM objects in memory.
Definition: THolder.h:35
tree
TChain * tree
Definition: tile_monitor.h:30
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
xAOD::TVirtualIncidentListener
Class providing an interface for classes listening to xAOD incidents.
Definition: TVirtualIncidentListener.h:25
xAOD::EventFormatElement
Class describing one branch of the ROOT file.
Definition: EventFormatElement.h:39
xAOD::TVirtualManager
Interface class for the "manager classes".
Definition: TVirtualManager.h:24
xAOD::Experimental::REvent::getEntry
::Int_t getEntry(::Long64_t entry, ::Int_t getall=0)
Function loading a given entry of the input TTree.
Definition: REvent.cxx:1163
IProxyDict.h
xAOD::Experimental::REvent::setPrintEventProxyWarnings
void setPrintEventProxyWarnings(bool)
Function to silence warnings associated with broken element links.
Definition: REvent.cxx:3813
xAOD::Experimental::REvent::addNameRemap
StatusCode addNameRemap(const std::string &onfile, const std::string &newName)
Add a name re-mapping rule.
Definition: REvent.cxx:834
IProxyDict
A proxy dictionary.
Definition: AthenaKernel/AthenaKernel/IProxyDict.h:47
xAOD::Experimental::REvent::METADATA_TREE_NAME
static const char *const METADATA_TREE_NAME
Name of the metadata tree.
Definition: REvent.h:467
xAOD::Experimental::REvent::getEventFormatElement
const xAOD::EventFormatElement * getEventFormatElement(SG::sgkey_t sgkey) const
Get the metadata object for a given "SG key".
Definition: REventProxyDict.cxx:362
python.checkMetadata.metadata
metadata
Definition: checkMetadata.py:175
BchCleanup.mgr
mgr
Definition: BchCleanup.py:294
xAOD::Experimental::REvent::BranchInfo
Helper struct used by the IProxyDict code.
Definition: REvent.h:522
xAOD::Experimental::REvent::m_nameRemapping
std::unordered_map< std::string, std::string > m_nameRemapping
Container name re-mapping rules.
Definition: REvent.h:513
REvent.icc
xAOD::Experimental::REvent::proxies
std::vector< const SG::DataProxy * > proxies() const override
return the list of all current proxies in store
Definition: REventProxyDict.cxx:422
xAOD::Experimental::REvent::connectMetaBranch
StatusCode connectMetaBranch(const std::string &key, ::Bool_t silent=kFALSE)
Function setting up access to a branch in the metadata tree.
Definition: REvent.cxx:2583
xAOD::Experimental::REvent::getInputObject
const void * getInputObject(SG::sgkey_t key, const std::type_info &ti, bool silent=false) override
Function for retrieving an input object in a non-template way.
Definition: REvent.cxx:1731
xAOD::Experimental::REvent::retrieveMetaOutput
StatusCode retrieveMetaOutput(const T *&obj, const std::string &key)
Retrieve an output metadata object.
xAOD::Experimental::REvent::hasAuxStore
::Bool_t hasAuxStore(const THolder &holder)
RDS: for the three following methods, moving to directly take THolder rather than have one for TObjec...
Definition: REvent.cxx:3709
xAOD::Experimental::REvent::kAthenaAccess
@ kAthenaAccess
Access containers/objects like Athena does.
Definition: REvent.h:121
xAOD::Experimental::REvent::printIOStats
void printIOStats() const
Function printing the I/O statistics of the current process.
Definition: REvent.cxx:278
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
xAOD::Experimental::REvent::keyToString
const std::string * keyToString(SG::sgkey_t key) const override
Find the string corresponding to a given key.
Definition: REventProxyDict.cxx:441
TVirtualEvent.h
xAOD::Experimental::REvent::upgrade_mutex_t
AthContainers_detail::upgrade_mutex upgrade_mutex_t
Mutex and lock for multithread synchronization.
Definition: REvent.h:530
xAOD::Experimental::REvent::recordObject
SG::DataProxy * recordObject(SG::DataObjectSharedPtr< DataObject > obj, const std::string &key, bool allowMods, bool returnExisting) override
Record an object in the store.
Definition: REventProxyDict.cxx:456
vertexingJO_ITK_init.itemList
list itemList
Definition: vertexingJO_ITK_init.py:95
xAOD::Experimental::REvent::m_inputObjects
Object_t m_inputObjects
Collection of all the managed input objects.
Definition: REvent.h:488
xAOD::Experimental::REvent::record
StatusCode record(void *obj, const std::string &typeName, const std::string &key)
Internal function for recording an object into the output.
Definition: REvent.cxx:2139
xAOD::Experimental::REvent::isStandalone
::Bool_t isStandalone(const THolder &holder)
Function checking if an object is standalone (not a container)
Definition: REvent.cxx:3753
checkCorrelInHIST.prefix
dictionary prefix
Definition: checkCorrelInHIST.py:391
test_pyathena.parent
parent
Definition: test_pyathena.py:15
xAOD::Experimental::REvent::getHash
SG::sgkey_t getHash(const std::string &key) const override
Function returning the hash describing an object name.
Definition: REvent.cxx:1433
xAOD::Experimental::REvent::printNameRemap
void printNameRemap() const
Print the current name re-mapping rules.
Definition: REvent.cxx:877
Preparation.mode
mode
Definition: Preparation.py:107
xAOD::Experimental::REvent::kUndefinedAccess
@ kUndefinedAccess
Undefined, to be selected by the object.
Definition: REvent.h:122
xAOD::Experimental::REvent::m_outTree
::TTree * m_outTree
The tree that we are writing to.
Definition: REvent.h:485
xAOD::Experimental::REvent::connectBranch
StatusCode connectBranch(const std::string &key, ::Bool_t silent=kFALSE)
Function setting up access to a particular branch.
Definition: REvent.cxx:2417
xAOD::Experimental::REvent::setAuxStore
StatusCode setAuxStore(RObjectManager &mgr, ::Bool_t metadata=kFALSE)
Function connecting a DV object to its auxiliary store.
Definition: REvent.cxx:3106
xAOD::Experimental::REvent::m_inNtupleReader
std::unique_ptr< ROOT::RNTupleReader > m_inNtupleReader
The main event reader: RNTupleReader.
Definition: REvent.h:473
CLID
uint32_t CLID
The Class ID type.
Definition: Event/xAOD/xAODCore/xAODCore/ClassID_traits.h:47
xAOD::Experimental::REvent::m_inputEventFormat
EventFormat m_inputEventFormat
Format of the current input file.
Definition: REvent.h:502
xAOD::Experimental::REvent::CACHE_SIZE
static const ::Int_t CACHE_SIZE
Size of a possible TTreeCache (30 MB)
Definition: REvent.h:463
xAOD::Experimental::REvent::~REvent
virtual ~REvent()
Destructor.
Definition: REvent.cxx:168
xAOD::Experimental::REvent::recordMeta
StatusCode recordMeta(std::unique_ptr< T > obj, const std::string &key, ::Int_t basketSize=32000, ::Int_t splitLevel=1)
Add an object to the output file's metadata, explicitly taking ownership of it.
StatusCode.h
xAOD::Experimental::REvent::setActive
void setActive() const
Set this event object as the currently active one.
Definition: REvent.cxx:704
xAOD::Experimental::REvent::connectMetaAux
StatusCode connectMetaAux(const std::string &prefix, ::Bool_t standalone)
Function setting up access to a set of auxiliary branches for a metadata object.
Definition: REvent.cxx:2823
xAOD::Experimental::REvent::m_listeners
Listener_t m_listeners
Listeners who should be notified when certain incidents happen.
Definition: REvent.h:510
GetAllXsec.entry
list entry
Definition: GetAllXsec.py:132
xAOD::Experimental::REvent::m_auxMode
EAuxMode m_auxMode
The auxiliary access mode.
Definition: REvent.h:470
xAOD::Experimental::REvent::setAuxItemList
void setAuxItemList(const std::string &containerKey, const std::string &itemList)
Configure which dynamic variables to write out for a given store.
Definition: REvent.cxx:726
xAOD::Experimental::REvent::REvent
REvent(EAuxMode mode=kUndefinedAccess)
Default constructor.
Definition: REvent.cxx:137
EventFormat.h
xAOD::EventFormat_v1
Event format metadata for xAOD files.
Definition: EventFormat_v1.h:38
xAOD::Experimental::REvent::setUpDynamicStore
StatusCode setUpDynamicStore(TObjectManager &mgr, ::TTree *tree)
Function adding dynamic variable reading capabilities to an auxiliary store object metadata still use...
Definition: REvent.cxx:3022
xAOD::Experimental::REvent::proxy_exact
SG::DataProxy * proxy_exact(SG::sgkey_t sgkey) const override
Get proxy given a hashed key+clid.
Definition: REventProxyDict.cxx:255
MakeNewFileFromOldAndSubstitution.newName
dictionary newName
Definition: ICHEP2016/MakeNewFileFromOldAndSubstitution.py:95
xAODPrivate::RLoader
Definition: REventProxyDict.cxx:151
xAOD::TObjectManager
Manager for EDM objects created by ROOT.
Definition: TObjectManager.h:29
xAOD::Experimental::REvent::readFrom
StatusCode readFrom(const std::string &fileName)
This function takes care of connecting the event object to a new input file.
Definition: REvent.cxx:292
xAOD::Experimental::REvent::ATLAS_THREAD_SAFE
SG::SGKeyMap< BranchInfo > m_branches ATLAS_THREAD_SAFE
Map from hashed sgkey to BranchInfo.
Definition: REvent.h:535
SG::sgkey_t
uint32_t sgkey_t
Type used for hashed StoreGate key+CLID pairs.
Definition: CxxUtils/CxxUtils/sgkey_t.h:32
xAOD::Experimental::REvent::retrieveMetaInput
StatusCode retrieveMetaInput(const T *&obj, const std::string &key)
Retrieve an input metadata object.
threading.h
Threading definitions.
xAOD::Experimental::REvent::containsMeta
::Bool_t containsMeta(const std::string &key)
Function checking if a meta-object is available from the store.
xAOD::Experimental::REvent::Listener_t
std::vector< TVirtualIncidentListener * > Listener_t
Definition of the structure type holding on to listeners.
Definition: REvent.h:460
xAOD::Experimental::REvent::REvent
REvent(const REvent &parent)=delete
Do not allow copy-constructing this object:
xAOD::Experimental::REvent::retrieve
StatusCode retrieve(T *&obj, const std::string &key)
Retrieve an output object from the event.
xAOD::Experimental::REvent::addListener
StatusCode addListener(TVirtualIncidentListener *listener)
Register an incident listener object.
Definition: REvent.cxx:754
xAOD::Experimental::REvent::m_entry
::Long64_t m_entry
The entry to look at from the input tree.
Definition: REvent.h:482
sgkey_t.h
Define the type used for hashed StoreGate key+CLID pairs.
xAOD::Experimental::REvent::registerKey
void registerKey(SG::sgkey_t key, const std::string &str, CLID clid) override
Remember an additional mapping from key to string/CLID.
Definition: REventProxyDict.cxx:451
python.trfDecorators.silent
def silent(func)
Redirect stdout/err to /dev/null Useful wrapper to get rid of ROOT verbosity...
Definition: trfDecorators.py:24
xAOD::Experimental::REvent::m_auxItemList
std::unordered_map< std::string, std::set< std::string > > m_auxItemList
Rules for selecting which auxiliary branches to write.
Definition: REvent.h:507
CaloCondBlobAlgs_fillNoiseFromASCII.hash
dictionary hash
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:108
xAOD::Experimental::REvent::m_printEventProxyWarnings
Bool_t m_printEventProxyWarnings
Option to silence common warnings that seem to be harmless.
Definition: REvent.h:516
xAODPrivate::RHolderBucket
Helper object for holding something through a THolder.
Definition: REventProxyDict.cxx:46
SG::SGKeyMap
std::unordered_map< sgkey_t, T > SGKeyMap
A map using sgkey_t as a key.
Definition: CxxUtils/CxxUtils/sgkey_t.h:93
xAOD::Experimental::REvent::m_inMetaTreeIsTTree
::Bool_t m_inMetaTreeIsTTree
Boolean indicating the technology of the metadata tree, i.e. TTree of RNTuple.
Definition: REvent.h:479
xAOD::Experimental::REvent::clearNameRemap
void clearNameRemap()
Clear the current name re-mapping.
Definition: REvent.cxx:868
xAODPrivate
Definition: REventProxyDict.cxx:43
xAOD::Experimental::REvent::EVENT_RNTUPLE_NAME
static const char *const EVENT_RNTUPLE_NAME
Name of the event tree.
Definition: REvent.h:465
upgrade_mutex.h
xAOD::Experimental::REvent::kClassAccess
@ kClassAccess
Access auxiliary data using the aux containers.
Definition: REvent.h:120
xAOD::Experimental::REvent::isAuxStore
::Bool_t isAuxStore(const THolder &holder)
Function checking if a given object may be an auxiliary store.
Definition: REvent.cxx:3730
xAOD::Experimental::REvent::transientContainsMeta
::Bool_t transientContainsMeta(const std::string &key) const
Function checking if a meta-object is already in memory.
ReadCalibFromCool.typeName
typeName
Definition: ReadCalibFromCool.py:477
xAOD::Experimental::REvent::BranchInfo::m_proxy
std::unique_ptr< SG::DataProxy > m_proxy
Data proxy describing this branch/object.
Definition: REvent.h:524
AthContainers_detail::upgrading_lock
Lock object for taking out upgradable locks.
Definition: threading.h:177
str
Definition: BTagTrackIpAccessor.cxx:11
xAOD::Experimental::REvent::getKey
SG::sgkey_t getKey(const void *obj) const override
Function returning the hash describing a known object.
Definition: REvent.cxx:1455
xAOD::Experimental::REvent::initStats
StatusCode initStats()
Function to initialise the statistics for all Tree content.
Definition: REvent.cxx:1754
xAOD::Experimental::REvent::inputEventFormat
const EventFormat * inputEventFormat() const
RDS: Only valid for TChains, i.e.
Definition: REvent.cxx:1387
SG::DataObjectSharedPtr
Smart pointer to manage DataObject reference counts.
Definition: DataObjectSharedPtr.h:45
jobOptions.fileName
fileName
Definition: jobOptions.SuperChic_ALP2.py:39
xAOD::Experimental::REvent::m_outputEventFormat
EventFormat * m_outputEventFormat
Format of the current output file.
Definition: REvent.h:504
xAOD::Experimental::REvent::m_inputMetaObjects
Object_t m_inputMetaObjects
Collection of all the managed input meta-objects.
Definition: REvent.h:497
xAOD::Experimental::REvent::upgrading_lock_t
AthContainers_detail::upgrading_lock< upgrade_mutex_t > upgrading_lock_t
Definition: REvent.h:531
xAOD::Experimental::REvent::getName
const std::string & getName(const void *obj) const override
Function returning the key describing a known object.
Definition: REvent.cxx:1468
checker_macros.h
Define macros for attributes used to control the static checker.
python.PyAthena.obj
obj
Definition: PyAthena.py:132
xAOD::Experimental::REvent::clearListeners
void clearListeners()
Remove all listeners from the object.
Definition: REvent.cxx:814
SG::DataProxy
Definition: DataProxy.h:45
xAOD::Experimental::REvent::name
const std::string & name() const override
Get the name of the instance.
Definition: REventProxyDict.cxx:463
ROOT
Selection rules: declare transient members.
Definition: DataVector.h:580
xAOD::Experimental::REvent::m_inMetaTree
::TTree * m_inMetaTree
Pointer to the metadata tree in the input file.
Definition: REvent.h:476
xAOD::Experimental::REvent::m_outputMetaObjects
Object_t m_outputMetaObjects
Collection of all the managed output meta-objects.
Definition: REvent.h:499
xAOD::Experimental::REvent::auxMode
EAuxMode auxMode() const
Get what auxiliary access mode the object was constructed with.
Definition: REvent.cxx:209
xAOD::Experimental::REvent::getNames
void getNames(const std::string &targetClassName, std::vector< std::string > &vkeys, bool metadata=false) const override
Function determining the list keys associated with a type name.
Definition: REvent.cxx:1509
xAOD::Experimental::REvent::proxy
SG::DataProxy * proxy(const void *const pTransient) const override
get proxy for a given data object address in memory
Definition: REventProxyDict.cxx:208
xAOD::Experimental::REvent::addToStore
StatusCode addToStore(CLID id, SG::DataProxy *proxy) override
Add a new proxy to the store.
Definition: REventProxyDict.cxx:396
xAOD::Experimental::REvent::connectAux
StatusCode connectAux(const std::string &prefix, ::Bool_t standalone)
Function setting up access to a set of auxiliary branches.
Definition: REvent.cxx:2697
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
xAOD::Experimental::REvent::stringToKey
SG::sgkey_t stringToKey(const std::string &str, CLID clid) override
Find the string corresponding to a given key.
Definition: REventProxyDict.cxx:436