ATLAS Offline Software
Control/xAODRootAccess/xAODRootAccess/TEvent.h
Go to the documentation of this file.
1 // Dear emacs, this is -*- c++ -*-
2 //
3 // Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
4 //
5 #ifndef XAODROOTACCESS_TEVENT_H
6 #define XAODROOTACCESS_TEVENT_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 
19 // EDM include(s):
24 #include "CxxUtils/sgkey_t.h"
25 
26 // Interface include(s):
28 
29 // Local include(s):
33 
34 // Forward declaration(s):
35 class TFile;
36 class TChain;
37 class TTree;
38 namespace std {
39  class type_info;
40 }
41 namespace SG {
42  class IAuxStore;
43 }
44 namespace xAODPrivate {
45  class THolderBucket;
46  class TLoader;
47 }
48 namespace CP {
49  class xAODWriterAlg;
50 }
51 class xAODTEventBranch;
52 class xAODTMetaBranch;
53 
54 namespace xAOD {
55 
56  // Forward declaration(s):
57  class TVirtualManager;
58  class TVirtualIncidentListener;
59  class TObjectManager;
60  class TAuxStore;
61  class TChainStateTracker;
62  class TFileMerger;
63  class TEvent;
64  class TTreeMgr;
65  class THolder;
66  ::TTree* MakeTransientTree ATLAS_NOT_THREAD_SAFE ( TEvent&, const char* );
67 
80 
81 #ifdef XAOD_STANDALONE
82  class TEvent : public TVirtualEvent, IProxyDict {
83 #else
84  class TEvent : public TVirtualEvent, public implements<IProxyDict> {
85 #endif
86  // Declare the friend functions/classes:
87  friend ::TTree* MakeTransientTree( TEvent&, const char* );
88  friend class ::xAODTEventBranch;
89  friend class ::xAODTMetaBranch;
90  friend class xAOD::TFileMerger;
91  friend class xAOD::TTreeMgr;
93  friend class xAODPrivate::TLoader;
94  friend class CP::xAODWriterAlg;
95 
96  public:
98  enum EAuxMode {
102  kUndefinedAccess = 3
103  };
104 
108  TEvent( ::TFile* file, EAuxMode mode = kUndefinedAccess);
111  TEvent( ::TTree* tree, EAuxMode mode = kUndefinedAccess);
113  virtual ~TEvent();
114 
116  TEvent( const TEvent& parent ) = delete;
118  TEvent& operator=( const TEvent& rhs ) = delete;
119 
121  EAuxMode auxMode() const;
122 
124  std::string dump();
125 
127  void printIOStats() const;
128 
132  void setPrintEventProxyWarnings(bool);
133 
136 
138  StatusCode readFrom( ::TFile* file, Bool_t useTreeCache = kTRUE,
139  const char* treeName = EVENT_TREE_NAME );
141  StatusCode readFrom( ::TTree* tree, Bool_t useTreeCache = kTRUE );
143  StatusCode writeTo( ::TFile* file, Int_t autoFlush = 200,
144  const char* treeName = EVENT_TREE_NAME );
146  StatusCode finishWritingTo( ::TFile* file );
147 
149  void setActive() const;
150 
152  void setAuxItemList( const std::string& containerKey,
153  const std::string& itemList );
154 
160  void clearListeners();
161 
163  StatusCode addNameRemap( const std::string& onfile,
164  const std::string& newName );
166  void clearNameRemap();
168  void printNameRemap() const;
169 
171 
174 
176  template< typename T >
177  ::Bool_t contains( const std::string& key );
179  template< typename T >
180  ::Bool_t transientContains( const std::string& key ) const;
181 
183  template< typename T >
184  StatusCode retrieve( const T*& obj, const std::string& key );
186  template< typename T >
187  StatusCode retrieve( T*& obj, const std::string& key );
188 
190  template< typename T >
191  StatusCode record( T* obj, const std::string& key,
192  ::Int_t basketSize = 32000, ::Int_t splitLevel = 0 );
194  template< typename T >
195  StatusCode record( std::unique_ptr< T > obj, const std::string& key,
196  ::Int_t basketSize = 32000, ::Int_t splitLevel = 0 );
197 
199  SG::IAuxStore* recordAux( const std::string& key,
202  Int_t basketSize = 32000,
203  Int_t splitLevel = 0 );
204 
206  StatusCode copy( const std::string& key,
207  ::Int_t basketSize = 32000, ::Int_t splitLevel = 0 );
209  StatusCode copy( ::Int_t basketSize = 32000, ::Int_t splitLevel = 0 );
210 
212 
215 
217  template< typename T >
218  ::Bool_t containsMeta( const std::string& key );
220  template< typename T >
221  ::Bool_t transientContainsMeta( const std::string& key ) const;
222 
224  template< typename T >
225  StatusCode retrieveMetaInput( const T*& obj, const std::string& key );
226 
228  template< typename T >
229  StatusCode retrieveMetaOutput( const T*& obj, const std::string& key );
231  template< typename T >
232  StatusCode retrieveMetaOutput( T*& obj, const std::string& key );
233 
235  template< typename T >
236  StatusCode recordMeta( T* obj, const std::string& key,
237  ::Int_t basketSize = 32000,
238  ::Int_t splitLevel = 1 );
241  template< typename T >
242  StatusCode recordMeta( std::unique_ptr< T > obj, const std::string& key,
243  ::Int_t basketSize = 32000,
244  ::Int_t splitLevel = 1 );
245 
247 
250 
252  ::Long64_t getEntries() const;
254  ::Int_t getEntry( ::Long64_t entry, ::Int_t getall = 0 );
255 
257  ::Long64_t getFiles() const;
259  ::Int_t getFile( ::Long64_t file, ::Int_t getall = 0 );
260 
262  ::Int_t fill();
263 
265  const EventFormat* inputEventFormat() const;
267  const EventFormat* outputEventFormat() const;
268 
270 
273 
275  SG::sgkey_t getHash( const std::string& key ) const override;
277  SG::sgkey_t getKey( const void* obj ) const override;
279  const std::string& getName( const void* obj ) const override;
281  const std::string& getName( SG::sgkey_t hash ) const override;
282 
284  // Declared public so we can call it from python.
285  StatusCode record( void* obj, const std::string& typeName,
286  const std::string& key,
287  ::Int_t basketSize, ::Int_t splitLevel,
288  ::Bool_t overwrite = kFALSE,
289  ::Bool_t metadata = kFALSE,
290  ::Bool_t isOwner = kTRUE );
291 
292  protected:
295  const std::type_info& ti ) override;
297  const void* getInputObject( SG::sgkey_t key,
298  const std::type_info& ti,
299  bool silent = false ) override;
300 
302  void getNames(const std::string& targetClassName,
303  std::vector<std::string>& vkeys,
304  bool metadata = false) const override;
305 
307 
310 
312  SG::DataProxy* proxy( const void* const pTransient ) const override;
313 
315  SG::DataProxy* proxy( const CLID& id,
316  const std::string& key ) const override;
317 
319  SG::DataProxy* proxy_exact( SG::sgkey_t sgkey ) const override;
320 
322  StatusCode addToStore( CLID id, SG::DataProxy* proxy ) override;
323 
325  std::vector< const SG::DataProxy* > proxies() const override;
326 
328  SG::sgkey_t stringToKey( const std::string& str, CLID clid ) override;
329 
331  const std::string* keyToString( SG::sgkey_t key ) const override;
332 
334  const std::string* keyToString( SG::sgkey_t key,
335  CLID& clid ) const override;
336 
338  void registerKey( SG::sgkey_t key, const std::string& str,
339  CLID clid ) override;
340 
344  const std::string& key,
345  bool allowMods,
346  bool returnExisting ) override;
347 
349  const std::string& name() const override;
350 
352 
356  void* getOutputObject( const std::string& key,
357  const std::type_info& ti,
358  ::Bool_t metadata = kFALSE ) const;
360  const void* getInputObject( const std::string& key,
361  const std::type_info& ti,
362  ::Bool_t silent = kFALSE,
363  ::Bool_t metadata = kFALSE );
365  StatusCode record( TAuxStore* store, const std::string& key,
366  ::Int_t basketSize, ::Int_t splitLevel,
367  ::Bool_t ownsStore = kFALSE );
369  StatusCode connectBranch( const std::string& key,
370  ::Bool_t silent = kFALSE );
372  StatusCode connectMetaBranch( const std::string& key,
373  ::Bool_t silent = kFALSE );
375  StatusCode connectAux( const std::string& prefix, ::Bool_t standalone );
378  StatusCode connectMetaAux( const std::string& prefix,
379  ::Bool_t standalone );
385  ::Bool_t metadata = kFALSE );
387  StatusCode putAux( ::TTree& outTree, TVirtualManager& mgr,
388  ::Int_t basketSize = 32000, ::Int_t splitLevel = 0,
389  ::Bool_t metadata = kFALSE );
391  static ::Bool_t hasAuxStore( const TObjectManager& mgr );
393  static ::Bool_t isAuxStore( const TObjectManager& mgr );
395  static ::Bool_t isStandalone( const TObjectManager& mgr );
397  ::Bool_t contains( const std::string& key,
398  const std::type_info& ti,
399  ::Bool_t metadata = kFALSE );
401  ::Bool_t transientContains( const std::string& key,
402  const std::type_info& ti,
403  ::Bool_t metadata = kFALSE ) const;
404 
406  typedef std::unordered_map< std::string,
409  typedef std::vector< TVirtualIncidentListener* > Listener_t;
410 
412  static const ::Int_t CACHE_SIZE;
414  static const char* const EVENT_TREE_NAME;
416  static const char* const METADATA_TREE_NAME;
417 
420 
422  ::TTree* m_inTree;
425  ::Bool_t m_inTreeMissing;
427  ::TChain* m_inChain;
431  ::Int_t m_inTreeNumber;
433  ::TTree* m_inMetaTree;
435  ::Long64_t m_entry;
436 
438  ::TTree* m_outTree;
439 
444  std::set< std::string > m_inputMissingObjects;
447 
452 
457 
459  std::unordered_map< std::string, std::set< std::string > > m_auxItemList;
460 
463 
465  std::unordered_map< std::string, std::string > m_nameRemapping;
466 
469 
472 
474  struct BranchInfo {
476  std::unique_ptr< SG::DataProxy > m_proxy;
478  const ::TClass* m_class = 0;
479  }; // struct BranchInfo
480 
482  typedef AthContainers_detail::upgrade_mutex upgrade_mutex_t;
485 
487  mutable SG::SGKeyMap< BranchInfo > m_branches ATLAS_THREAD_SAFE; // protected by mutex
488 
490 
493 
497 
499  const BranchInfo* getBranchInfo( SG::sgkey_t sgkey ) const;
500 
502 
503  }; // class TEvent
504 
505 } // namespace xAOD
506 
507 // Include the template implementation(s).
508 #include "TEvent.icc"
509 
510 #endif // XAODROOTACCESS_TEVENT_H
xAOD::TEvent::m_inTreeNumber
::Int_t m_inTreeNumber
The number of the currently open tree in the input chain.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:431
xAOD::TEvent::m_nameRemapping
std::unordered_map< std::string, std::string > m_nameRemapping
Container name re-mapping rules.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:465
xAOD::TEvent::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::TEvent::addListener
StatusCode addListener(TVirtualIncidentListener *listener)
Register an incident listener object.
Definition: Control/xAODRootAccess/Root/TEvent.cxx:910
xAOD::TVirtualEvent
Base interface for getting objects out of the input file.
Definition: TVirtualEvent.h:32
xAOD::TEvent::operator=
TEvent & operator=(const TEvent &rhs)=delete
Do not allow copying this object.
xAOD::TEvent::finishWritingTo
StatusCode finishWritingTo(::TFile *file)
Finish writing to an output file.
Definition: Control/xAODRootAccess/Root/TEvent.cxx:734
store
StoreGateSvc * store
Definition: fbtTestBasics.cxx:71
common.sgkey
def sgkey(tool)
Definition: common.py:1028
xAOD::TTreeMgr
Class creating (a) transient tree(s) from xAOD files.
Definition: TTreeMgr.h:34
xAOD::TEvent::proxy_exact
SG::DataProxy * proxy_exact(SG::sgkey_t sgkey) const override
Get proxy given a hashed key+clid.
Definition: TEventProxyDict.cxx:244
xAOD::TEvent::name
const std::string & name() const override
Get the name of the instance.
Definition: TEventProxyDict.cxx:452
xAOD::TEvent::m_auxMode
EAuxMode m_auxMode
The auxiliary access mode.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:419
xAOD::TEvent::kUndefinedAccess
@ kUndefinedAccess
Undefined, to be selected by the object.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:102
IAuxStoreHolder.h
SG
Forward declaration.
Definition: CaloCellPacker_400_500.h:32
xAOD::TEvent::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: Control/xAODRootAccess/Root/TEvent.cxx:1938
L1CaloPhase1Monitoring.standalone
standalone
Definition: L1CaloPhase1Monitoring.py:112
xAOD::TEvent::getOutputObject
void * getOutputObject(SG::sgkey_t key, const std::type_info &ti) override
Function for retrieving an output object in a non-template way.
Definition: Control/xAODRootAccess/Root/TEvent.cxx:1914
xAOD::TEvent::kAthenaAccess
@ kAthenaAccess
Access containers/objects like Athena does.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:101
xAOD::TEvent::m_outTree
::TTree * m_outTree
The tree that we are writing to.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:438
xAOD::TEvent::getFile
::Int_t getFile(::Long64_t file, ::Int_t getall=0)
Load the first event for a given file from the input TChain.
Definition: Control/xAODRootAccess/Root/TEvent.cxx:1472
xAOD::TEvent::m_inChain
::TChain * m_inChain
The (optional) chain provided as input.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:427
xAOD::TEvent::putAux
StatusCode putAux(::TTree &outTree, TVirtualManager &mgr, ::Int_t basketSize=32000, ::Int_t splitLevel=0, ::Bool_t metadata=kFALSE)
Function saving the dynamically created auxiliary properties.
Definition: Control/xAODRootAccess/Root/TEvent.cxx:3350
tree
TChain * tree
Definition: tile_monitor.h:30
xAOD::TEvent::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.
xAOD::TEvent::keyToString
const std::string * keyToString(SG::sgkey_t key) const override
Find the string corresponding to a given key.
Definition: TEventProxyDict.cxx:430
xAOD::TEvent::m_inputObjects
Object_t m_inputObjects
Collection of all the managed input objects.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:441
xAOD::TEvent::printNameRemap
void printNameRemap() const
Print the current name re-mapping rules.
Definition: Control/xAODRootAccess/Root/TEvent.cxx:1033
xAOD::TAuxStore
"ROOT implementation" of IAuxStore
Definition: TAuxStore.h:46
xAOD::TEvent::recordAux
SG::IAuxStore * recordAux(const std::string &key, SG::IAuxStoreHolder::AuxStoreType type=SG::IAuxStoreHolder::AST_ContainerStore, Int_t basketSize=32000, Int_t splitLevel=0)
Add an auxiliary store object to the output.
Definition: Control/xAODRootAccess/Root/TEvent.cxx:1066
xAOD::TEvent::record
StatusCode record(std::unique_ptr< T > obj, const std::string &key, ::Int_t basketSize=32000, ::Int_t splitLevel=0)
Add an output object to the event, explicitly taking ownership of it.
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::TEvent::copy
StatusCode copy(const std::string &key, ::Int_t basketSize=32000, ::Int_t splitLevel=0)
Copy an object directly from the input to the output.
Definition: Control/xAODRootAccess/Root/TEvent.cxx:1143
xAOD::TEvent::~TEvent
virtual ~TEvent()
Destructor.
Definition: Control/xAODRootAccess/Root/TEvent.cxx:236
xAOD::TVirtualManager
Interface class for the "manager classes".
Definition: TVirtualManager.h:24
xAOD::TEvent::getKey
SG::sgkey_t getKey(const void *obj) const override
Function returning the hash describing a known object.
Definition: Control/xAODRootAccess/Root/TEvent.cxx:1671
xAOD::TEvent::kClassAccess
@ kClassAccess
Access auxiliary data using the aux containers.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:100
xAOD::TEvent::stringToKey
SG::sgkey_t stringToKey(const std::string &str, CLID clid) override
Find the string corresponding to a given key.
Definition: TEventProxyDict.cxx:425
xAOD::TEvent::dump
std::string dump()
Function creating a user-readable dump of the current input.
Definition: Control/xAODRootAccess/Root/TEvent.cxx:292
IProxyDict.h
xAOD::TEvent::outputEventFormat
const EventFormat * outputEventFormat() const
Get information about the output objects.
Definition: Control/xAODRootAccess/Root/TEvent.cxx:1626
xAOD::TEvent::registerKey
void registerKey(SG::sgkey_t key, const std::string &str, CLID clid) override
Remember an additional mapping from key to string/CLID.
Definition: TEventProxyDict.cxx:440
CP
Select isolated Photons, Electrons and Muons.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:48
IProxyDict
A proxy dictionary.
Definition: AthenaKernel/AthenaKernel/IProxyDict.h:47
xAOD::TEvent::m_inMetaTree
::TTree * m_inMetaTree
Pointer to the metadata tree in the input file.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:433
xAOD::TEvent::BranchInfo
Helper struct used by the IProxyDict code.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:474
xAOD::TEvent::clearNameRemap
void clearNameRemap()
Clear the current name re-mapping.
Definition: Control/xAODRootAccess/Root/TEvent.cxx:1024
xAOD::TEvent::auxMode
EAuxMode auxMode() const
Get what auxiliary access mode the object was constructed with.
Definition: Control/xAODRootAccess/Root/TEvent.cxx:278
python.checkMetadata.metadata
metadata
Definition: checkMetadata.py:175
BchCleanup.mgr
mgr
Definition: BchCleanup.py:294
xAODTMetaBranch
Specialised class for browsing xAOD metadata interface objects in ROOT.
Definition: xAODTMetaBranch.h:27
xAOD::TEvent::retrieveMetaOutput
StatusCode retrieveMetaOutput(T *&obj, const std::string &key)
Retrieve an output metadata object.
SG::IAuxStoreHolder::AuxStoreType
AuxStoreType
Type of the auxiliary store.
Definition: IAuxStoreHolder.h:66
xAOD::ATLAS_NOT_THREAD_SAFE
void ErrorHandler ATLAS_NOT_THREAD_SAFE(Int_t level, Bool_t abort, const char *location, const char *message)
Function filtering the warnings coming from ROOT.
Definition: Init.cxx:105
xAOD::TEvent::m_printEventProxyWarnings
Bool_t m_printEventProxyWarnings
Option to silence common warnings that seem to be harmless.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:468
xAOD::TEvent::proxies
std::vector< const SG::DataProxy * > proxies() const override
return the list of all current proxies in store
Definition: TEventProxyDict.cxx:411
xAOD::TEvent::getBranchInfo
const BranchInfo * getBranchInfo(SG::sgkey_t sgkey) const
Get the object describing one object/branch.
Definition: TEventProxyDict.cxx:268
xAOD::TEvent::m_inTree
::TTree * m_inTree
The main tree that we are reading from.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:422
xAOD::TEvent::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: Control/xAODRootAccess/Root/TEvent.cxx:1725
xAOD::TEvent::getEntries
::Long64_t getEntries() const
Get how many entries are available from the current input file(s)
Definition: Control/xAODRootAccess/Root/TEvent.cxx:1293
xAOD::TEvent::m_auxItemList
std::unordered_map< std::string, std::set< std::string > > m_auxItemList
Rules for selecting which auxiliary branches to write.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:459
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
xAOD::TEvent::getEntry
::Int_t getEntry(::Long64_t entry, ::Int_t getall=0)
Function loading a given entry of the input TTree.
Definition: Control/xAODRootAccess/Root/TEvent.cxx:1324
xAOD::TChainStateTracker
Class helping with tracking the state of TChain objects.
Definition: TChainStateTracker.h:32
xAOD::TEvent::isStandalone
::Bool_t isStandalone(const TObjectManager &mgr)
Function checking if an object is standalone (not a container)
Definition: Control/xAODRootAccess/Root/TEvent.cxx:3637
TVirtualEvent.h
checkCorrelInHIST.prefix
dictionary prefix
Definition: checkCorrelInHIST.py:391
file
TFile * file
Definition: tile_monitor.h:29
test_pyathena.parent
parent
Definition: test_pyathena.py:15
dumpFileToPlots.treeName
string treeName
Definition: dumpFileToPlots.py:20
Preparation.mode
mode
Definition: Preparation.py:94
xAOD::TEvent::m_inputEventFormat
EventFormat m_inputEventFormat
Format of the current input file.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:454
xAOD::TEvent::proxy
SG::DataProxy * proxy(const void *const pTransient) const override
get proxy for a given data object address in memory
Definition: TEventProxyDict.cxx:206
xAOD::TEvent::contains
::Bool_t contains(const std::string &key)
Function checking if an object is available from the store.
CP::xAODWriterAlg
Algorithm writing an xAOD output file.
Definition: xAODWriterAlg.h:29
xAOD::TEvent::getEventFormatElement
const xAOD::EventFormatElement * getEventFormatElement(SG::sgkey_t sgkey) const
Get the metadata object for a given "SG key".
Definition: TEventProxyDict.cxx:351
CLID
uint32_t CLID
The Class ID type.
Definition: Event/xAOD/xAODCore/xAODCore/ClassID_traits.h:47
xAOD::TEvent::setPrintEventProxyWarnings
void setPrintEventProxyWarnings(bool)
Function to silence warnings associated with broken element links.
Definition: Control/xAODRootAccess/Root/TEvent.cxx:3697
xAOD::TEvent::upgrade_mutex_t
AthContainers_detail::upgrade_mutex upgrade_mutex_t
Mutex and lock for multithread synchronization.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:482
xAOD::TEvent::m_listeners
Listener_t m_listeners
Listeners who should be notified when certain incidents happen.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:462
xAOD::TEvent::CACHE_SIZE
static const ::Int_t CACHE_SIZE
Size of a possible TTreeCache (30 MB)
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:412
xAOD::TEvent::m_outputMetaObjects
Object_t m_outputMetaObjects
Collection of all the managed output meta-objects.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:451
xAOD::TEvent::EVENT_TREE_NAME
static const char *const EVENT_TREE_NAME
Name of the event tree.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:414
StatusCode.h
xAOD::TEvent::m_outputObjects
Object_t m_outputObjects
Collection of all the managed output object.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:446
xAOD::TEvent::m_inputMetaObjects
Object_t m_inputMetaObjects
Collection of all the managed input meta-objects.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:449
xAOD::TEvent::MakeTransientTree
friend ::TTree * MakeTransientTree(TEvent &, const char *)
GetAllXsec.entry
list entry
Definition: GetAllXsec.py:132
xAOD::TEvent::m_branchesMutex
upgrade_mutex_t m_branchesMutex
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:484
xAODPrivate::THolderBucket
Helper object for holding something through a THolder.
Definition: TEventProxyDict.cxx:46
xAOD::TEvent::METADATA_TREE_NAME
static const char *const METADATA_TREE_NAME
Name of the metadata tree.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:416
EventFormat.h
xAOD::EventFormat_v1
Event format metadata for xAOD files.
Definition: EventFormat_v1.h:38
xAOD::TEvent::TEvent
TEvent(const TEvent &parent)=delete
Do not allow copy-constructing this object:
xAOD::TEvent::record
StatusCode record(T *obj, const std::string &key, ::Int_t basketSize=32000, ::Int_t splitLevel=0)
Add an output object to the event.
xAOD::TEvent::upgrading_lock_t
AthContainers_detail::upgrading_lock< upgrade_mutex_t > upgrading_lock_t
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:483
xAOD::TEvent::TEvent
TEvent(EAuxMode mode=kUndefinedAccess)
Default constructor.
Definition: Control/xAODRootAccess/Root/TEvent.cxx:131
xAOD::TEvent::retrieveMetaInput
StatusCode retrieveMetaInput(const T *&obj, const std::string &key)
Retrieve an input metadata object.
xAOD::TEvent::m_inTreeMissing
::Bool_t m_inTreeMissing
Internal status flag showing that an input file is open, but it doesn't contain an event tree.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:425
MakeNewFileFromOldAndSubstitution.newName
dictionary newName
Definition: ICHEP2016/MakeNewFileFromOldAndSubstitution.py:95
xAOD::TEvent::initStats
StatusCode initStats()
Function to initialise the statistics for all Tree content.
Definition: Control/xAODRootAccess/Root/TEvent.cxx:1961
xAOD::TObjectManager
Manager for EDM objects created by ROOT.
Definition: TObjectManager.h:29
xAODTEventBranch
Specialised class for browsing xAOD event interface objects in ROOT.
Definition: xAODTEventBranch.h:32
SG::sgkey_t
uint32_t sgkey_t
Type used for hashed StoreGate key+CLID pairs.
Definition: CxxUtils/CxxUtils/sgkey_t.h:32
xAOD::TEvent::fill
::Int_t fill()
Function filling one event into the output tree.
Definition: Control/xAODRootAccess/Root/TEvent.cxx:1508
threading.h
Threading definitions.
xAOD::TEvent::transientContains
::Bool_t transientContains(const std::string &key) const
Function checking if an object is already in memory.
xAOD::TEvent::removeListener
StatusCode removeListener(TVirtualIncidentListener *listener)
Remove an incident listener object.
Definition: Control/xAODRootAccess/Root/TEvent.cxx:946
xAOD::TFileMerger
Helper class for merging xAOD files.
Definition: TFileMerger.h:47
xAOD::TEvent::isAuxStore
::Bool_t isAuxStore(const TObjectManager &mgr)
Function checking if a given object may be an auxiliary store.
Definition: Control/xAODRootAccess/Root/TEvent.cxx:3614
xAOD::TEvent::connectAux
StatusCode connectAux(const std::string &prefix, ::Bool_t standalone)
Function setting up access to a set of auxiliary branches.
Definition: Control/xAODRootAccess/Root/TEvent.cxx:2856
SG::IAuxStore
Interface for non-const operations on an auxiliary store.
Definition: IAuxStore.h:48
xAOD::TEvent::m_outputEventFormat
EventFormat * m_outputEventFormat
Format of the current output file.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:456
xAOD::TEvent::setUpDynamicStore
StatusCode setUpDynamicStore(TObjectManager &mgr, ::TTree *tree)
Function adding dynamic variable reading capabilities to an auxiliary store object.
Definition: Control/xAODRootAccess/Root/TEvent.cxx:3088
xAOD::TEvent::EAuxMode
EAuxMode
Auxiliary store "mode".
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:98
xAOD::TEvent::getFiles
::Long64_t getFiles() const
Get how many files are available on the currently defined input.
Definition: Control/xAODRootAccess/Root/TEvent.cxx:1452
sgkey_t.h
Define the type used for hashed StoreGate key+CLID pairs.
xAOD::TEvent::addNameRemap
StatusCode addNameRemap(const std::string &onfile, const std::string &newName)
Add a name re-mapping rule.
Definition: Control/xAODRootAccess/Root/TEvent.cxx:990
xAOD::TEvent::retrieveMetaOutput
StatusCode retrieveMetaOutput(const T *&obj, const std::string &key)
Retrieve an output metadata object.
python.trfDecorators.silent
def silent(func)
Redirect stdout/err to /dev/null Useful wrapper to get rid of ROOT verbosity...
Definition: trfDecorators.py:24
CaloCondBlobAlgs_fillNoiseFromASCII.hash
dictionary hash
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:109
xAOD::TEvent::ATLAS_THREAD_SAFE
SG::SGKeyMap< BranchInfo > m_branches ATLAS_THREAD_SAFE
Map from hashed sgkey to BranchInfo.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:487
xAOD::TEvent::hasAuxStore
::Bool_t hasAuxStore(const TObjectManager &mgr)
Function checking if a given object may have an auxiliary store.
Definition: Control/xAODRootAccess/Root/TEvent.cxx:3593
xAOD::TEvent::retrieve
StatusCode retrieve(T *&obj, const std::string &key)
Retrieve an output object from the event.
xAOD::TEvent::recordObject
SG::DataProxy * recordObject(SG::DataObjectSharedPtr< DataObject > obj, const std::string &key, bool allowMods, bool returnExisting) override
Record an object in the store.
Definition: TEventProxyDict.cxx:445
xAOD::TEvent::connectBranch
StatusCode connectBranch(const std::string &key, ::Bool_t silent=kFALSE)
Function setting up access to a particular branch.
Definition: Control/xAODRootAccess/Root/TEvent.cxx:2558
xAOD::TEvent::getHash
SG::sgkey_t getHash(const std::string &key) const override
Function returning the hash describing an object name.
Definition: Control/xAODRootAccess/Root/TEvent.cxx:1649
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
xAOD::TEvent::retrieve
StatusCode retrieve(const T *&obj, const std::string &key)
Retrieve either an input or an output object from the event.
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::TEvent::m_entry
::Long64_t m_entry
The entry to look at from the input tree.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:435
xAODPrivate
Definition: TEventProxyDict.cxx:43
xAOD::TEvent::inputEventFormat
const EventFormat * inputEventFormat() const
Get information about the input objects.
Definition: Control/xAODRootAccess/Root/TEvent.cxx:1603
xAOD::TEvent::addToStore
StatusCode addToStore(CLID id, SG::DataProxy *proxy) override
Add a new proxy to the store.
Definition: TEventProxyDict.cxx:385
xAOD::TEvent::m_inChainTracker
TChainStateTracker * m_inChainTracker
Optional object for tracking the state changes of an input TChain.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:429
xAOD::TEvent::writeTo
StatusCode writeTo(::TFile *file, Int_t autoFlush=200, const char *treeName=EVENT_TREE_NAME)
Connect the object to an output file.
Definition: Control/xAODRootAccess/Root/TEvent.cxx:692
xAOD::TEvent::containsMeta
::Bool_t containsMeta(const std::string &key)
Function checking if a meta-object is available from the store.
ReadCalibFromCool.typeName
typeName
Definition: ReadCalibFromCool.py:477
xAOD::TEvent::readFrom
StatusCode readFrom(::TFile *file, Bool_t useTreeCache=kTRUE, const char *treeName=EVENT_TREE_NAME)
Connect the object to a new input file.
Definition: Control/xAODRootAccess/Root/TEvent.cxx:364
AthContainers_detail::upgrading_lock
Lock object for taking out upgradable locks.
Definition: threading.h:229
xAOD::TEvent::Object_t
std::unordered_map< std::string, TVirtualManager * > Object_t
Definition of the internal data structure type.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:407
xAOD::TEvent::Listener_t
std::vector< TVirtualIncidentListener * > Listener_t
Definition of the structure type holding on to listeners.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:409
str
Definition: BTagTrackIpAccessor.cxx:11
xAOD::TEvent::kBranchAccess
@ kBranchAccess
Access auxiliary data branch-by-branch.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:99
SG::DataObjectSharedPtr
Smart pointer to manage DataObject reference counts.
Definition: DataObjectSharedPtr.h:46
xAOD::TEvent::setAuxItemList
void setAuxItemList(const std::string &containerKey, const std::string &itemList)
Configure which dynamic variables to write out for a given store.
Definition: Control/xAODRootAccess/Root/TEvent.cxx:882
xAOD::TEvent::getName
const std::string & getName(const void *obj) const override
Function returning the key describing a known object.
Definition: Control/xAODRootAccess/Root/TEvent.cxx:1684
checker_macros.h
Define macros for attributes used to control the static checker.
python.PyAthena.obj
obj
Definition: PyAthena.py:132
xAOD::TEvent::setActive
void setActive() const
Set this event object as the currently active one.
Definition: Control/xAODRootAccess/Root/TEvent.cxx:860
SG::DataProxy
Definition: DataProxy.h:44
xAOD::TEvent::transientContainsMeta
::Bool_t transientContainsMeta(const std::string &key) const
Function checking if a meta-object is already in memory.
xAOD::TEvent::BranchInfo::m_proxy
std::unique_ptr< SG::DataProxy > m_proxy
Data proxy describing this branch/object.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:476
xAOD::TEvent::connectMetaBranch
StatusCode connectMetaBranch(const std::string &key, ::Bool_t silent=kFALSE)
Function setting up access to a branch in the metadata tree.
Definition: Control/xAODRootAccess/Root/TEvent.cxx:2742
xAOD::TEvent::printIOStats
void printIOStats() const
Function printing the I/O statistics of the current process.
Definition: Control/xAODRootAccess/Root/TEvent.cxx:347
TEvent.icc
xAOD::TEvent
Tool for accessing xAOD files outside of Athena.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:84
xAOD::TEvent::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: Control/xAODRootAccess/xAODRootAccess/TEvent.h:444
xAODPrivate::TLoader
Definition: TEventProxyDict.cxx:151
SG::IAuxStoreHolder::AST_ContainerStore
@ AST_ContainerStore
The store describes a container.
Definition: IAuxStoreHolder.h:68
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
xAOD::TEvent::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: Control/xAODRootAccess/Root/TEvent.cxx:2975
xAOD::TEvent::setAuxStore
StatusCode setAuxStore(TObjectManager &mgr, ::Bool_t metadata=kFALSE)
Function connecting a DV object to its auxiliary store.
Definition: Control/xAODRootAccess/Root/TEvent.cxx:3172
xAOD::TEvent::clearListeners
void clearListeners()
Remove all listeners from the object.
Definition: Control/xAODRootAccess/Root/TEvent.cxx:970