Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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):
25 #include "CxxUtils/sgkey_t.h"
26 
27 // Interface include(s):
29 
30 // Local include(s):
34 
35 // Forward declaration(s):
36 class TFile;
37 class TChain;
38 class TTree;
39 namespace std {
40  class type_info;
41 }
42 namespace SG {
43  class IAuxStore;
44 }
45 namespace xAODPrivate {
46  class THolderBucket;
47  class TLoader;
48 }
49 namespace CP {
50  class xAODWriterAlg;
51 }
52 class xAODTEventBranch;
53 class xAODTMetaBranch;
54 
55 namespace xAOD {
56 
57  // Forward declaration(s):
58  class TVirtualManager;
59  class TVirtualIncidentListener;
60  class TObjectManager;
61  class TAuxStore;
62  class TChainStateTracker;
63  class TFileMerger;
64  class TEvent;
65  class TTreeMgr;
66  class THolder;
67  ::TTree* MakeTransientTree ATLAS_NOT_THREAD_SAFE ( TEvent&, const char* );
68 
81 
82 #ifdef XAOD_STANDALONE
83  class TEvent : public TVirtualEvent, IProxyDict {
84 #else
85  class TEvent : public TVirtualEvent, public implements<IProxyDict> {
86 #endif
87  // Declare the friend functions/classes:
88  friend ::TTree* MakeTransientTree( TEvent&, const char* );
89  friend class ::xAODTEventBranch;
90  friend class ::xAODTMetaBranch;
91  friend class xAOD::TFileMerger;
92  friend class xAOD::TTreeMgr;
94  friend class xAODPrivate::TLoader;
95  friend class CP::xAODWriterAlg;
96 
97  public:
99  enum EAuxMode {
103  kUndefinedAccess = 3
104  };
105 
109  TEvent( ::TFile* file, EAuxMode mode = kUndefinedAccess);
112  TEvent( ::TTree* tree, EAuxMode mode = kUndefinedAccess);
114  virtual ~TEvent();
115 
117  TEvent( const TEvent& parent ) = delete;
119  TEvent& operator=( const TEvent& rhs ) = delete;
120 
122  EAuxMode auxMode() const;
123 
125  std::string dump();
126 
128  void printIOStats() const;
129 
133  void setPrintEventProxyWarnings(bool);
134 
137 
139  StatusCode readFrom( ::TFile* file, Bool_t useTreeCache = kTRUE,
140  const char* treeName = EVENT_TREE_NAME );
142  StatusCode readFrom( ::TTree* tree, Bool_t useTreeCache = kTRUE );
144  StatusCode writeTo( ::TFile* file, Int_t autoFlush = 200,
145  const char* treeName = EVENT_TREE_NAME );
147  StatusCode finishWritingTo( ::TFile* file );
148 
150  void setActive() const;
151 
153  void setAuxItemList( const std::string& containerKey,
154  const std::string& itemList );
155 
161  void clearListeners();
162 
164  StatusCode addNameRemap( const std::string& onfile,
165  const std::string& newName );
167  void clearNameRemap();
169  void printNameRemap() const;
170 
172 
175 
177  template< typename T >
178  ::Bool_t contains( const std::string& key );
180  template< typename T >
181  ::Bool_t transientContains( const std::string& key ) const;
182 
184  template< typename T >
185  StatusCode retrieve( const T*& obj, const std::string& key );
187  template< typename T >
188  StatusCode retrieve( T*& obj, const std::string& key );
189 
191  template< typename T >
192  StatusCode record( T* obj, const std::string& key,
193  ::Int_t basketSize = 32000, ::Int_t splitLevel = 0 );
195  template< typename T >
196  StatusCode record( std::unique_ptr< T > obj, const std::string& key,
197  ::Int_t basketSize = 32000, ::Int_t splitLevel = 0 );
198 
200  SG::IAuxStore* recordAux( const std::string& key,
203  Int_t basketSize = 32000,
204  Int_t splitLevel = 0 );
205 
207  StatusCode copy( const std::string& key,
208  ::Int_t basketSize = 32000, ::Int_t splitLevel = 0 );
210  StatusCode copy( ::Int_t basketSize = 32000, ::Int_t splitLevel = 0 );
211 
213 
216 
218  template< typename T >
219  ::Bool_t containsMeta( const std::string& key );
221  template< typename T >
222  ::Bool_t transientContainsMeta( const std::string& key ) const;
223 
225  template< typename T >
226  StatusCode retrieveMetaInput( const T*& obj, const std::string& key );
227 
229  template< typename T >
230  StatusCode retrieveMetaOutput( const T*& obj, const std::string& key );
232  template< typename T >
233  StatusCode retrieveMetaOutput( T*& obj, const std::string& key );
234 
236  template< typename T >
237  StatusCode recordMeta( T* obj, const std::string& key,
238  ::Int_t basketSize = 32000,
239  ::Int_t splitLevel = 1 );
242  template< typename T >
243  StatusCode recordMeta( std::unique_ptr< T > obj, const std::string& key,
244  ::Int_t basketSize = 32000,
245  ::Int_t splitLevel = 1 );
246 
248 
251 
253  ::Long64_t getEntries() const;
255  ::Int_t getEntry( ::Long64_t entry, ::Int_t getall = 0 );
256 
258  ::Long64_t getFiles() const;
260  ::Int_t getFile( ::Long64_t file, ::Int_t getall = 0 );
261 
263  ::Int_t fill();
264 
266  const EventFormat* inputEventFormat() const;
268  const EventFormat* outputEventFormat() const;
269 
271 
274 
276  SG::sgkey_t getHash( const std::string& key ) const override;
278  SG::sgkey_t getKey( const void* obj ) const override;
280  const std::string& getName( const void* obj ) const override;
282  const std::string& getName( SG::sgkey_t hash ) const override;
283 
285  // Declared public so we can call it from python.
286  StatusCode record( void* obj, const std::string& typeName,
287  const std::string& key,
288  ::Int_t basketSize, ::Int_t splitLevel,
289  ::Bool_t overwrite = kFALSE,
290  ::Bool_t metadata = kFALSE,
291  ::Bool_t isOwner = kTRUE );
292 
293  protected:
296  const std::type_info& ti ) override;
298  const void* getInputObject( SG::sgkey_t key,
299  const std::type_info& ti,
300  bool silent = false ) override;
301 
303  void getNames(const std::string& targetClassName,
304  std::vector<std::string>& vkeys,
305  bool metadata = false) const override;
306 
308 
311 
313  SG::DataProxy* proxy( const void* const pTransient ) const override;
314 
316  SG::DataProxy* proxy( const CLID& id,
317  const std::string& key ) const override;
318 
320  SG::DataProxy* proxy_exact( SG::sgkey_t sgkey ) const override;
321 
323  StatusCode addToStore( CLID id, SG::DataProxy* proxy ) override;
324 
326  std::vector< const SG::DataProxy* > proxies() const override;
327 
329  SG::sgkey_t stringToKey( const std::string& str, CLID clid ) override;
330 
332  const std::string* keyToString( SG::sgkey_t key ) const override;
333 
335  const std::string* keyToString( SG::sgkey_t key,
336  CLID& clid ) const override;
337 
339  void registerKey( SG::sgkey_t key, const std::string& str,
340  CLID clid ) override;
341 
345  const std::string& key,
346  bool allowMods,
347  bool returnExisting ) override;
348 
350  const std::string& name() const override;
351 
353 
357  void* getOutputObject( const std::string& key,
358  const std::type_info& ti,
359  ::Bool_t metadata = kFALSE ) const;
361  const void* getInputObject( const std::string& key,
362  const std::type_info& ti,
363  ::Bool_t silent = kFALSE,
364  ::Bool_t metadata = kFALSE );
366  StatusCode record( TAuxStore* store, const std::string& key,
367  ::Int_t basketSize, ::Int_t splitLevel,
368  ::Bool_t ownsStore = kFALSE );
370  StatusCode connectBranch( const std::string& key,
371  ::Bool_t silent = kFALSE );
373  StatusCode connectMetaBranch( const std::string& key,
374  ::Bool_t silent = kFALSE );
376  StatusCode connectAux( const std::string& prefix, ::Bool_t standalone );
379  StatusCode connectMetaAux( const std::string& prefix,
380  ::Bool_t standalone );
386  ::Bool_t metadata = kFALSE );
388  StatusCode putAux( ::TTree& outTree, TVirtualManager& mgr,
389  ::Int_t basketSize = 32000, ::Int_t splitLevel = 0,
390  ::Bool_t metadata = kFALSE );
392  static ::Bool_t hasAuxStore( const TObjectManager& mgr );
394  static ::Bool_t isAuxStore( const TObjectManager& mgr );
396  static ::Bool_t isStandalone( const TObjectManager& mgr );
398  ::Bool_t contains( const std::string& key,
399  const std::type_info& ti,
400  ::Bool_t metadata = kFALSE );
402  ::Bool_t transientContains( const std::string& key,
403  const std::type_info& ti,
404  ::Bool_t metadata = kFALSE ) const;
405 
407  typedef std::unordered_map< std::string,
410  typedef std::vector< TVirtualIncidentListener* > Listener_t;
411 
413  static const ::Int_t CACHE_SIZE;
415  static const char* const EVENT_TREE_NAME;
417  static const char* const METADATA_TREE_NAME;
418 
421 
423  ::TTree* m_inTree;
426  ::Bool_t m_inTreeMissing;
428  ::TChain* m_inChain;
432  ::Int_t m_inTreeNumber;
434  ::TTree* m_inMetaTree;
436  ::Long64_t m_entry;
437 
439  ::TTree* m_outTree;
440 
445  std::set< std::string > m_inputMissingObjects;
448 
453 
458 
460  std::unordered_map< std::string, std::set< std::string > > m_auxItemList;
461 
464 
466  std::unordered_map< std::string, std::string > m_nameRemapping;
467 
470 
473 
475  struct BranchInfo {
477  std::unique_ptr< SG::DataProxy > m_proxy;
479  const ::TClass* m_class = 0;
480  }; // struct BranchInfo
481 
483  typedef AthContainers_detail::upgrade_mutex upgrade_mutex_t;
486 
488  mutable SG::SGKeyMap< BranchInfo > m_branches ATLAS_THREAD_SAFE; // protected by mutex
489 
491 
494 
498 
500  const BranchInfo* getBranchInfo( SG::sgkey_t sgkey ) const;
501 
503 
504  }; // class TEvent
505 
506 } // namespace xAOD
507 
508 // Include the template implementation(s).
509 #include "TEvent.icc"
510 
511 #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:432
xAOD::TEvent::m_nameRemapping
std::unordered_map< std::string, std::string > m_nameRemapping
Container name re-mapping rules.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:466
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:912
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:736
SGTest::store
TestStore store
Definition: TestStore.cxx:23
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:420
xAOD::TEvent::kUndefinedAccess
@ kUndefinedAccess
Undefined, to be selected by the object.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:103
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:1940
L1CaloPhase1Monitoring.standalone
standalone
Definition: L1CaloPhase1Monitoring.py:120
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:1916
xAOD::TEvent::kAthenaAccess
@ kAthenaAccess
Access containers/objects like Athena does.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:102
xAOD::TEvent::m_outTree
::TTree * m_outTree
The tree that we are writing to.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:439
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:1474
xAOD::TEvent::m_inChain
::TChain * m_inChain
The (optional) chain provided as input.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:428
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:3364
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:442
xAOD::TEvent::printNameRemap
void printNameRemap() const
Print the current name re-mapping rules.
Definition: Control/xAODRootAccess/Root/TEvent.cxx:1035
xAOD::TAuxStore
"ROOT @c TTree implementation" of IAuxStore
Definition: TAuxStore.h:30
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:1068
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:1145
xAOD::TEvent::~TEvent
virtual ~TEvent()
Destructor.
Definition: Control/xAODRootAccess/Root/TEvent.cxx:238
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:1673
xAOD::TEvent::kClassAccess
@ kClassAccess
Access auxiliary data using the aux containers.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:101
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:294
IProxyDict.h
xAOD::TEvent::outputEventFormat
const EventFormat * outputEventFormat() const
Get information about the output objects.
Definition: Control/xAODRootAccess/Root/TEvent.cxx:1628
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:49
IProxyDict
A proxy dictionary.
Definition: AthenaKernel/AthenaKernel/IProxyDict.h:47
python.CaloAddPedShiftConfig.type
type
Definition: CaloAddPedShiftConfig.py:42
xAOD::TEvent::m_inMetaTree
::TTree * m_inMetaTree
Pointer to the metadata tree in the input file.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:434
xAOD::TEvent::BranchInfo
Helper struct used by the IProxyDict code.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:475
xAOD::TEvent::clearNameRemap
void clearNameRemap()
Clear the current name re-mapping.
Definition: Control/xAODRootAccess/Root/TEvent.cxx:1026
xAOD::TEvent::auxMode
EAuxMode auxMode() const
Get what auxiliary access mode the object was constructed with.
Definition: Control/xAODRootAccess/Root/TEvent.cxx:280
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:469
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:423
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:1727
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:1295
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:460
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:1326
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:3651
TVirtualEvent.h
vertexingJO_ITK_init.itemList
list itemList
Definition: vertexingJO_ITK_init.py:95
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:107
xAOD::TEvent::m_inputEventFormat
EventFormat m_inputEventFormat
Format of the current input file.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:455
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:3711
xAOD::TEvent::upgrade_mutex_t
AthContainers_detail::upgrade_mutex upgrade_mutex_t
Mutex and lock for multithread synchronization.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:483
xAOD::TEvent::m_listeners
Listener_t m_listeners
Listeners who should be notified when certain incidents happen.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:463
xAOD::TEvent::CACHE_SIZE
static const ::Int_t CACHE_SIZE
Size of a possible TTreeCache (30 MB)
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:413
xAOD::TEvent::m_outputMetaObjects
Object_t m_outputMetaObjects
Collection of all the managed output meta-objects.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:452
xAOD::TEvent::EVENT_TREE_NAME
static const char *const EVENT_TREE_NAME
Name of the event tree.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:415
StatusCode.h
xAOD::TEvent::m_outputObjects
Object_t m_outputObjects
Collection of all the managed output object.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:447
xAOD::TEvent::m_inputMetaObjects
Object_t m_inputMetaObjects
Collection of all the managed input meta-objects.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:450
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:485
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:417
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:484
xAOD::TEvent::TEvent
TEvent(EAuxMode mode=kUndefinedAccess)
Default constructor.
Definition: Control/xAODRootAccess/Root/TEvent.cxx:133
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:426
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:1963
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:1510
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:948
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:3628
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:2871
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:457
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:3103
xAOD::TEvent::EAuxMode
EAuxMode
Auxiliary store "mode".
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:99
xAOD::TEvent::getFiles
::Long64_t getFiles() const
Get how many files are available on the currently defined input.
Definition: Control/xAODRootAccess/Root/TEvent.cxx:1454
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:992
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:488
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:3607
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:2573
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:1651
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:436
xAODPrivate
Definition: TEventProxyDict.cxx:43
xAOD::TEvent::inputEventFormat
const EventFormat * inputEventFormat() const
Get information about the input objects.
Definition: Control/xAODRootAccess/Root/TEvent.cxx:1605
xAOD::TEvent::addToStore
StatusCode addToStore(CLID id, SG::DataProxy *proxy) override
Add a new proxy to the store.
Definition: TEventProxyDict.cxx:385
upgrade_mutex.h
xAOD::TEvent::m_inChainTracker
TChainStateTracker * m_inChainTracker
Optional object for tracking the state changes of an input TChain.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:430
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:694
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:366
AthContainers_detail::upgrading_lock
Lock object for taking out upgradable locks.
Definition: threading.h:177
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:408
xAOD::TEvent::Listener_t
std::vector< TVirtualIncidentListener * > Listener_t
Definition of the structure type holding on to listeners.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:410
str
Definition: BTagTrackIpAccessor.cxx:11
xAOD::TEvent::kBranchAccess
@ kBranchAccess
Access auxiliary data branch-by-branch.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:100
SG::DataObjectSharedPtr
Smart pointer to manage DataObject reference counts.
Definition: DataObjectSharedPtr.h:45
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:884
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:1686
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:862
SG::DataProxy
Definition: DataProxy.h:45
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:477
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:2757
xAOD::TEvent::printIOStats
void printIOStats() const
Function printing the I/O statistics of the current process.
Definition: Control/xAODRootAccess/Root/TEvent.cxx:349
TEvent.icc
xAOD::TEvent
Tool for accessing xAOD files outside of Athena.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:85
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:445
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:2990
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:3187
xAOD::TEvent::clearListeners
void clearListeners()
Remove all listeners from the object.
Definition: Control/xAODRootAccess/Root/TEvent.cxx:972