ATLAS Offline Software
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Private Types | Private Member Functions | Private Attributes | List of all members
python.FilePeekerLib.FilePeeker Class Reference
Inheritance diagram for python.FilePeekerLib.FilePeeker:
Collaboration diagram for python.FilePeekerLib.FilePeeker:

Public Member Functions

def __init__ (self, name='FilePeeker', **kw)
 
def initialize (self)
 
def start (self)
 
def stop (self)
 
def evtStore (self)
 
def metaStore (self)
 
def tagStore (self)
 
def inputStore (self)
 
def execute (self)
 
def process_metadata (self, store, metadata_name)
 
def finalize (self)
 
def print_summary (self, data=None)
 
virtual StatusCode initialize () override
 
virtual StatusCode reinitialize () override
 
virtual StatusCode start () override
 
virtual StatusCode execute () override
 
virtual StatusCode stop () override
 
virtual StatusCode finalize () override
 
virtual StatusCode sysInitialize () override
 Override sysInitialize. More...
 
virtual const char * typeName () const override
 return the std::type_info name of the underlying py-component This is used by concrete implementations to connect a python component to its C++ counter-part More...
 
virtual PyObjectself () override
 return associated python object. More...
 
 DeclareInterfaceID (IPyComponent, 1, 0)
 
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies. More...
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Public Attributes

 infname
 init base class More...
 
 outfname
 
 peeked_data
 

Protected Member Functions

virtual bool setPyAttr (PyObject *pyobj) override
 attach the C++ component to its python cousin More...
 
void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Protected Attributes

PyObjectm_self
 Pointer to self (from the python world) More...
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

def _do_peeking (self, peek_evt_data=False)
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

 _old_file_flag
 input-store self.inputStore.dump() More...
 
 _begin_run_flag
 
 _peeked_events
 
DataObjIDColl m_extendedExtraObjects
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Detailed Description

utility algorithm to inspect a file's content

Definition at line 64 of file FilePeekerLib.py.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ __init__()

def python.FilePeekerLib.FilePeeker.__init__ (   self,
  name = 'FilePeeker',
**  kw 
)

Definition at line 67 of file FilePeekerLib.py.

67  def __init__(self, name='FilePeeker', **kw):
68 
69  super(FilePeeker, self).__init__(name, **kw)
70  self.infname = kw.get('infname', 'not-there.pool')
71  self.outfname= kw.get('outfname', None)
72 
73  # flag to enable the bwd compat fallback mechanism...
74  self._old_file_flag = False
75 
76  # flag to enable event less files without beginRun...
77  self._begin_run_flag = False
78 
79  # all data, collected over the events analyzed
80  self._peeked_events = []
81 

Member Function Documentation

◆ _do_peeking()

def python.FilePeekerLib.FilePeeker._do_peeking (   self,
  peek_evt_data = False 
)
private
the real function doing all the work of peeking at the input file
@return a dict of peeked-at data

Definition at line 312 of file FilePeekerLib.py.

312  def _do_peeking(self, peek_evt_data=False):
313  """ the real function doing all the work of peeking at the input file
314  @return a dict of peeked-at data
315  """
316  peeked_data = {}
317  import AthenaPython.PyAthena as PyAthena
318  _info = self.msg.info
319  _error= self.msg.error
320 
321  def _get_detdescr_tags(evt_type):
322  ddt = evt_type.get_detdescr_tags().split()
323  # det_descr_tags is of the form:
324  # [ 'key1', 'val1', 'key2', 'val2', ... ]
325  ddt = dict(zip(ddt[0::2], # select 'key?'
326  ddt[1::2])) # select 'val?'
327  return ddt
328 
329 
331  store = self.inputStore
332  esi_keys = store.keys('EventStreamInfo')
333  nentries = None
334  ddt = None
335  if len(esi_keys) >= 1:
336  sg_key = esi_keys[-1]
337  nentries = 0
338  stream_names = esi_keys[:]
339  for sg_key in esi_keys:
340  esi = store.retrieve('EventStreamInfo', sg_key)
341  _info('=== [EventStreamInfo#%s] ===', sg_key)
342  nentries += esi.getNumberOfEvents()
343 
344  evt_types = PyAthena.EventStreamInfo.evt_types(esi)
345  if len(evt_types) > 0:
346  evt_type = evt_types[0]
347  peeked_data['evt_type'] = evt_type.bit_mask
348  ddt = _get_detdescr_tags(evt_type)
349  peeked_data['det_descr_tags'] = ddt
350  from past.builtins import long
351  peeked_data['mc_channel_number'] = [long(evt_type.mc_channel_number())]
352 
353  def _make_item_list(item):
354  sgkey= item[1]
355  clid = item[0]
356  _typename = store._pyclidsvc.typename
357  return (_typename(clid) or str(clid), # str or keep the int?
358  sgkey)
359  item_list = esi.item_list()
360  item_list = list(map(_make_item_list, item_list))
361  peeked_data['eventdata_items'] = item_list
362  # print ("======",len(item_list))
363  peeked_data['lumi_block'] = esi.lumi_blocks()
364  peeked_data['run_number'] = esi.run_numbers()
365  #peeked_data['evt_number'] = esi.event_number()
366  peeked_data['stream_names'] = esi.processing_tags()
367  # handle event-less files
368  if not peeked_data['stream_names']:
369  stream_names = [sg_versioned_key(s).key for s in stream_names]
370  peeked_data['stream_names'] = list(set(stream_names))
371  pass
372  # more event-less files handling - POOL-from-BS-event-less files
373  # see bug#98568
374  if len(esi.run_numbers()) == 0:
375  bsmd_keys = store.keys("ByteStreamMetadataContainer")
376  if len(bsmd_keys) == 1:
377  bsmd = store[bsmd_keys[0]][0]
378  peeked_data['lumi_block'] = [bsmd.getLumiBlock()]
379  peeked_data['run_number'] = [bsmd.getRunNumber()]
380  bs_metadata = {}
381  for md in bsmd.getFreeMetaDataStrings():
382  if md.startswith('Event type:'):
383  k = 'evt_type'
384  v = []
385  if 'is sim' in md: v.append('IS_SIMULATION')
386  else: v.append('IS_DATA')
387  if 'is atlas' in md: v.append('IS_ATLAS')
388  else: v.append('IS_TESTBEAM')
389  if 'is physics' in md: v.append('IS_PHYSICS')
390  else: v.append('IS_CALIBRATION')
391  bs_metadata[k] = tuple(v)
392  elif md.startswith('GeoAtlas:'):
393  k = 'geometry'
394  v = md.split('GeoAtlas:')[1].strip()
395  bs_metadata[k] = v
396  elif md.startswith('IOVDbGlobalTag:'):
397  k = 'conditions_tag'
398  v = md.split('IOVDbGlobalTag:')[1].strip()
399  bs_metadata[k] = v
400  elif '=' in md:
401  k,v = md.split('=')
402  bs_metadata[k] = v
403  pass
404  peeked_data['evt_type'] = bs_metadata.get('evt_type', [])
405  peeked_data['geometry'] = bs_metadata.get('geometry', None)
406  peeked_data['conditions_tag'] = bs_metadata.get('conditions_tag', None)
407  peeked_data['bs_metadata'] = bs_metadata
408  pass
409  pass
410 
411  # hack to retrieve the number of events if no EventStreamInfo
412  # was present in the input file
413  if nentries is None:
414  ROOT = _import_ROOT()
415  root_files = list(ROOT.gROOT.GetListOfFiles())
416  root_files = [root_file for root_file in root_files
417  if root_file.GetName().count(self.infname)]
418  if len(root_files)==1:
419  root_file = root_files[0]
420  data_hdr = root_file.Get("POOLContainer")
421  if not data_hdr:
422  data_hdr = root_file.Get("POOLContainer_DataHeader")
423  nentries = data_hdr.GetEntriesFast() if bool(data_hdr) \
424  else None
425  else:
426  _info('could not find correct ROOT file (looking for [%s])',
427  self.infname)
428  nentries = None
429  del root_files
430  del data_hdr
431  peeked_data['nentries'] = nentries
432 
433  # retrieve the GUID
434  def _get_guid():
435  guid = None
436  ROOT = _import_ROOT()
437  root_files = list(ROOT.gROOT.GetListOfFiles())
438  root_files = [root_file for root_file in root_files
439  if root_file.GetName().count(self.infname)]
440  if len(root_files)==0:
441  _info('could not find correct ROOT file (looking for [%s])',
442  self.infname)
443  return
444 
445  root_file = root_files[0]
446  pool = root_file.Get("##Params")
447  import re
448  # Pool parameters are of the form:
449  # '[NAME=somevalue][VALUE=thevalue]'
450  pool_token = re.compile(r'[\[]NAME=(?P<name>.*?)[\]]'
451  r'[\[]VALUE=(?P<value>.*?)[\]]').match
452  params = []
453  for i in range(pool.GetEntries()):
454  if pool.GetEntry(i)>0:
455  match = pool_token(pool.db_string)
456  if not match:
457  continue
458  d = match.groupdict()
459  params.append((d['name'], d['value']))
460  if d['name'].lower() == 'fid':
461  guid = d['value']
462  return guid
463  guid = _get_guid()
464  if guid:
465  peeked_data['file_guid'] = guid
466 
467 
468  metadata_items = [(self.inputStore._pyclidsvc.typename(p.clID()),
469  p.name())
470  for p in self.inputStore.proxies()]
471  peeked_data['metadata_items'] = metadata_items
472  metadata = {}
473  def maybe_get(o, idx, default=None):
474  try:
475  return o[idx]
476  except IndexError:
477  return default
478  def maybe_float(o):
479  try:
480  return float(o)
481  except ValueError:
482  return o
483 
484  def mergeMultipleDict(inDicts):
485  outDict={}
486  for d in inDicts:
487  for k,o in d.items():
488  if k not in outDict:
489  outDict[k]=o
490  if len(outDict)==0:
491  return None
492  else:
493  return outDict
494 
495 
496 
497  for k in self.inputStore.keys('IOVMetaDataContainer'):
498  v = self.process_metadata(self.inputStore, k)
499  metadata[k] = maybe_get(v, -1)
500  peeked_data['metadata'] = metadata
501 
502 
503  taginfo = {}
504  if self.metaStore.contains('IOVMetaDataContainer','/TagInfo'):
505  v = self.process_metadata(self.metaStore, '/TagInfo')
506  taginfo = mergeMultipleDict(v)
507  else:
508  if '/TagInfo' in metadata:
509  taginfo = metadata['/TagInfo'].copy()
510  else:
511  self._old_file_flag = True
512  # no tag info whatsoever...
513  # try detdescr_tags ?
514  if ddt:
515  peeked_data['det_descr_tags'] = ddt
516  peeked_data['geometry'] = ddt.get('GeoAtlas', None)
517  peeked_data['conditions_tag'] = ddt.get('IOVDbGlobalTag', None)
518  peeked_data['tag_info'] = taginfo
519  if taginfo:
520  peeked_data['det_descr_tags'] = taginfo
521  peeked_data['geometry'] = taginfo.get('GeoAtlas', None)
522  peeked_data['conditions_tag'] = taginfo.get('IOVDbGlobalTag', None)
523  peeked_data['beam_type'] = [taginfo.get('beam_type','N/A')]
524  peeked_data['beam_energy']= [maybe_float(taginfo.get('beam_energy',
525  'N/A'))]
526 
527  if 'geometry' not in peeked_data:
528  peeked_data['geometry'] = None
529  if 'conditions_tag' not in peeked_data:
530  peeked_data['conditions_tag'] = None
531  if 'det_descr_tags' not in peeked_data:
532  peeked_data['det_descr_tags'] = {}
533 
534  # eventless simulated DAOD files
535  if not self._begin_run_flag:
536  if taginfo and taginfo.get('project_name',None) == 'IS_SIMULATION':
537  peeked_data['evt_type'] = ('IS_SIMULATION', 'IS_ATLAS', 'IS_PHYSICS')
538  if '/Simulation/Parameters' in metadata:
539  peeked_data['run_number'] = [metadata.get('/Simulation/Parameters').get('RunNumber',None)]
540 
542  if peek_evt_data is False:
543  return peeked_data
544 
545 
546 
547  # access directly the EventInfo
548  store = self.evtStore
549  evt_info_keys = store.keys('EventInfo')
550  if len(evt_info_keys) != 1:
551  _info('more than one EventInfo: %s', evt_info_keys)
552  _info(' ==> we\'ll use [%s]', evt_info_keys[0])
553  sg_key = evt_info_keys[0]
554  ei = store.retrieve('EventInfo', sg_key)
555  _info('=== [EventInfo#%s] ===', sg_key)
556  eid = ei.event_ID()
557 
558  dh_keys = [k for k in store.keys('DataHeader')
559  # remove DH-keys for backnavigation
560  if not k.startswith('[DB=')]
561  if len(dh_keys) != 1:
562  _error('more than 1 DataHeader key after filtering: %s', dh_keys)
563  _error('content of store: %s', store.keys('DataHeader'))
564  raise RuntimeError('more than one DataHeader key')
565 
566  sg_key = dh_keys[0]
567  _info('=== [DataHeader#%s] ===', sg_key)
568  dh = store.retrieve('DataHeader', sg_key)
569 
570  def _make_item_list(dhe):
571  sgkey= dhe.getKey()
572  clid = dhe.getPrimaryClassID()
573  _typename = store._pyclidsvc.typename
574  return (_typename(clid) or str(clid), # str or keep the int?
575  sgkey)
576  dhes = []
577  if hasattr(dh, 'at'):
578  # HACK for bug #77976
579  for ii in range(len(dh)):
580  dhes.append(dh.at(ii))
581  pass
582  else:
583  dhes = list(dh.elements())
584  #item_list = map(_make_item_list, dh)
585  item_list = []
586  for i,dhe in enumerate(dhes):
587  sgkey = dhe.getKey()
588  clid = dhe.getPrimaryClassID()
589  _typename = store._pyclidsvc.typename
590  try:
591  clid_name = _typename(clid)
592  if clid_name:
593  clid = clid_name
594  except Exception as err:
595  self.msg.info("no typename for clid [%s] (%s)", clid, err)
596  item_list.append((str(clid), sgkey))
597 
598  # -- event-type
599  evt_type = ei.event_type()
600  det_descr_tags = _get_detdescr_tags(evt_type)
601 
602  peeked_data.update({
603  'run_number': [eid.run_number()],
604  'evt_number': [eid.event_number()],
605  'run_type': ['N/A'],
606  'evt_type': evt_type.bit_mask,
607  'det_descr_tags': det_descr_tags,
608  'geometry': det_descr_tags.get('GeoAtlas', None),
609  'conditions_tag': det_descr_tags.get('IOVDbGlobalTag', None),
610  'lumi_block': [eid.lumi_block()],
611  'stream_names': [dh.getProcessTag()],
612  'eventdata_items': item_list,
613  'beam_type': [det_descr_tags.get('beam_type','N/A')],
614  'beam_energy': [maybe_float(det_descr_tags.get('beam_energy',
615  'N/A'))],
616  })
617 
618  trigger_info= ei.trigger_info()
619  stream_tags = trigger_info.streamTags() if trigger_info else []
620  stags = []
621  for st in stream_tags: # don't use list-comprehensions b/c of ROOT bugs
622  st_type = st.type()
623  st_name = st.name()
624  obeys_lbk=bool(st.obeysLumiblock())
625  stags.append(dict(stream_type=st_type,
626  stream_name=st_name,
627  obeys_lbk=obeys_lbk))
628  peeked_data['stream_tags'] = stags
629 
630  # -- old files compat
631  if self._old_file_flag or 1:
632 
633 
634  metadata_items = [(self.inputStore._pyclidsvc.typename(p.clID()),
635  p.name())
636  for p in self.inputStore.proxies()]
637  peeked_data['metadata_items'] = metadata_items
638  metadata = {}
639  for k in self.inputStore.keys('IOVMetaDataContainer'):
640  v = self.process_metadata(self.inputStore, k)
641  metadata[k] = maybe_get(v, -1)
642  peeked_data['metadata'] = metadata
643 
644 
645  taginfo = {}
646  if self.metaStore.contains('IOVMetaDataContainer','/TagInfo'):
647  v = self.process_metadata(self.metaStore, '/TagInfo')
648  taginfo = mergeMultipleDict(v)
649  if taginfo:
650  # we want to keep the AtlasRelease from when the file was produced
651  atlas_release = metadata.get('/TagInfo', taginfo)
652  atlas_release = atlas_release.get('AtlasRelease',
653  taginfo['AtlasRelease'])
654  taginfo['AtlasRelease'] = atlas_release
655  peeked_data['det_descr_tags'] = taginfo
656  peeked_data['tag_info'] = taginfo
657 
658 
660  ddt = peeked_data['det_descr_tags']
661  peeked_data['geometry'] = ddt.get('GeoAtlas', None)
662  peeked_data['conditions_tag'] = ddt.get('IOVDbGlobalTag', None)
663 
664 
665  peeked_data['beam_type']= [ddt.get('beam_type','N/A')]
666  beam_ene = maybe_float(ddt.get('beam_energy','N/A'))
667  peeked_data['beam_energy']=[beam_ene]
668 
669  pass # old files compat
670 
671  return peeked_data
672 

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ DeclareInterfaceID()

IPyComponent::DeclareInterfaceID ( IPyComponent  ,
,
 
)
inherited

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( Gaudi::Property< T, V, H > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Algorithm > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Algorithm > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

def python.FilePeekerLib.FilePeeker.evtStore (   self)

Definition at line 131 of file FilePeekerLib.py.

131  def evtStore(self):
132  import AthenaPython.PyAthena as PyAthena
133  return PyAthena.py_svc('StoreGateSvc/StoreGateSvc')
134 

◆ execute() [1/2]

StatusCode PyAthena::Alg::execute ( )
overridevirtualinherited

Definition at line 93 of file PyAthenaAlg.cxx.

94 {
95 // ATH_MSG_DEBUG("Executing " << name() << "...");
97  PyObject* pycontext = PyCapsule_New ( const_cast<EventContext*>(&getContext()), nullptr, nullptr);
98 
99  StatusCode sc = PyAthena::callPyMethod( m_self, "sysExecute", pycontext );
100  Py_DECREF (pycontext);
101  return sc;
102 }

◆ execute() [2/2]

def python.FilePeekerLib.FilePeeker.execute (   self)

Definition at line 150 of file FilePeekerLib.py.

150  def execute(self):
151  self.peeked_data.update(self._do_peeking(peek_evt_data=True))
152  self.print_summary()
153  self._peeked_events.append(dict(self.peeked_data))
154  return StatusCode.Success
155 

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ extraOutputDeps()

const DataObjIDColl & AthAlgorithm::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 50 of file AthAlgorithm.cxx.

51 {
52  // If we didn't find any symlinks to add, just return the collection
53  // from the base class. Otherwise, return the extended collection.
54  if (!m_extendedExtraObjects.empty()) {
56  }
57  return Algorithm::extraOutputDeps();
58 }

◆ finalize() [1/2]

StatusCode PyAthena::Alg::finalize ( )
overridevirtualinherited

Definition at line 86 of file PyAthenaAlg.cxx.

87 {
88  ATH_MSG_INFO("Finalizing " << name() << "...");
89  return PyAthena::callPyMethod( m_self, "sysFinalize" );
90 }

◆ finalize() [2/2]

def python.FilePeekerLib.FilePeeker.finalize (   self)

Definition at line 254 of file FilePeekerLib.py.

254  def finalize(self):
255  _info = self.msg.info
256  peeked_data = dict(self.peeked_data)
257  if self.outfname:
258  oname = self.outfname
259  import os
260  oname = os.path.expanduser(os.path.expandvars(oname))
261  _info('storing peeked file infos into [%s]...', oname)
262  if os.path.exists(oname):
263  os.remove(oname)
264 
265  import PyUtils.dbsqlite as dbsqlite
266  db = dbsqlite.open(oname,flags='w')
267 
268  # merge and collect data from all processed events (if any)
269  if self._peeked_events:
270  peeked_data = self._peeked_events.pop(0)
271  for d in self._peeked_events:
272  for k in ('run_number',
273  'evt_number',
274  'lumi_block',
275  'run_type',
276  'beam_type',
277  'beam_energy',
278  'stream_tags',):
279  v = d[k]
280  if isinstance(v, list) and len(v)>0:
281  v = v[0]
282  peeked_data[k].append(v)
283  #_info('peeked_data:')
284  #_info(str(peeked_data))
285  db['fileinfos'] = peeked_data
286  db.close()
287  _info('storing peeked file infos into [%s]... [done]', oname)
288  self.print_summary(peeked_data)
289  return StatusCode.Success
290 

◆ initialize() [1/2]

StatusCode PyAthena::Alg::initialize ( )
overridevirtualinherited

Definition at line 60 of file PyAthenaAlg.cxx.

61 {
62  ATH_MSG_INFO("Initializing " << name() << "...");
63  return PyAthena::callPyMethod( m_self, "sysInitialize" );
64 }

◆ initialize() [2/2]

def python.FilePeekerLib.FilePeeker.initialize (   self)

Definition at line 82 of file FilePeekerLib.py.

82  def initialize(self):
83 
84  import AthenaPython.PyAthena as PyAthena
85  self.peeked_data = _create_file_infos()
86 
87  # load our pythonizations:
88  for cls_name in ('EventStreamInfo',
89  'EventType',
90  'PyEventType',
91  ):
92  cls = getattr(PyAthena, cls_name) # noqa: F841
93 
94  _info = self.msg.info
95  _info("retrieving various stores...")
96  for store_name in ('evtStore', 'inputStore',
97  'tagStore', 'metaStore',):
98  _info('retrieving [%s]...', store_name)
99  o = getattr(self, store_name) # noqa: F841
100  _info('retrieving [%s]... [done]', store_name)
101 
105 
106  _info("retrieving various stores... [done]")
107 
108  import os
109  self.infname = os.path.basename(self.infname)
110 
111  import AthenaPython.PyAthena as PyAthena
112  _info = self.msg.info
113  return StatusCode.Success
114 

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< Algorithm > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ inputStore()

def python.FilePeekerLib.FilePeeker.inputStore (   self)

Definition at line 146 of file FilePeekerLib.py.

146  def inputStore(self):
147  import AthenaPython.PyAthena as PyAthena
148  return PyAthena.py_svc('StoreGateSvc/InputMetaDataStore')
149 

◆ metaStore()

def python.FilePeekerLib.FilePeeker.metaStore (   self)

Definition at line 136 of file FilePeekerLib.py.

136  def metaStore(self):
137  import AthenaPython.PyAthena as PyAthena
138  return PyAthena.py_svc('StoreGateSvc/MetaDataStore')
139 

◆ msg() [1/2]

MsgStream& AthCommonMsg< Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< Algorithm >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

bool AthCommonMsg< Algorithm >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< Algorithm > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ print_summary()

def python.FilePeekerLib.FilePeeker.print_summary (   self,
  data = None 
)

Definition at line 291 of file FilePeekerLib.py.

291  def print_summary(self, data=None):
292  if data is None:
293  data = self.peeked_data
294  _info = self.msg.info
295 
296 
297  _info(':::::: summary ::::::')
298  _info(' - nbr events: %s', data['nentries'])
299  _info(' - run numbers: %s', data['run_number'])
300  _info(' - evt numbers: %s', data['evt_number'])
301  _info(' - lumiblocks: %s', data['lumi_block'])
302  _info(' - evt types: %s', data['evt_type'])
303  _info(' - item list: %s', len(data['eventdata_items']))
304  _info(' - stream names: %s', data['stream_names'])
305  _info(' - stream tags: %s', data['stream_tags'])
306  _info(' - geometry: %s', data['geometry'])
307  _info(' - conditions tag: %s', data['conditions_tag'])
308  _info(' - metadata items: %s', len(data['metadata_items']))
309  _info(' - tag-info: %s', data['tag_info'].keys())
310  return
311 

◆ process_metadata()

def python.FilePeekerLib.FilePeeker.process_metadata (   self,
  store,
  metadata_name 
)

Definition at line 156 of file FilePeekerLib.py.

156  def process_metadata(self, store, metadata_name):
157  msg = self.msg
158  try:
159  obj = store[metadata_name]
160  except KeyError:
161  msg.warning('could not retrieve [%s]', metadata_name)
162  return
163  if str(obj).find('MetaCont') >= 0:
164  obj = obj.get (obj.sources()[0])
165  msg.info('processing container [%s]', obj.folderName())
166  data = []
167  payloads = obj.payloadContainer()
168  payloads_sz = payloads.size()
169  if hasattr(payloads, 'at'):
170  # HACK for bug #77976
171  _tmp = payloads
172  payloads = []
173  for ii in range(payloads_sz):
174  payloads.append(_tmp.at(ii))
175  pass
176  for ii,payload in zip(range(payloads_sz), payloads):
177  # print ("-->",ii,payload,type(payload),'\n' )
178  if not payload:
179  msg.info ("**error** null-pointer ?")
180  continue
181  # names
182  chan_names = []
183  sz = payload.name_size()
184  msg.info('==names== (sz: %s)', sz)
185  for idx in range(sz):
186  chan = payload.chanNum(idx)
187  chan_name = payload.chanName(chan)
188  #msg.info( '--> (%s, %s)', idx, chan_name)
189  chan_names.append(chan_name)
190 
191  if 1: # we don't really care about those...
192  # iovs
193  sz = payload.iov_size()
194  msg.info('==iovs== (sz: %s)',sz)
195  for idx in range(sz):
196  chan = payload.chanNum(idx)
197  iov_range = payload.iovRange(chan)
198  iov_start = iov_range.start()
199  iov_stop = iov_range.stop()
200  if 0:
201  msg.info( '(%s, %s) => (%s, %s) valid=%s runEvt=%s',
202  iov_start.run(),
203  iov_start.event(),
204  iov_stop.run(),
205  iov_stop.event(),
206  iov_start.isValid(),
207  iov_start.isRunEvent())
208 
209  # attrs
210  attrs = [] # can't use a dict as spec.name() isn't unique
211  sz = payload.size()
212  msg.info('==attrs== (sz: %s)', sz)
213  for idx in range(sz):
214  chan = payload.chanNum(idx)
215  #msg.info("idx: %i chan: %s", idx, chan)
216  attr_list = payload.attributeList(chan)
217  attr_data = []
218  for a in list(toiter(attr_list.begin(), attr_list.end())):
219  #msg.info((a,dir(a),type(a)))
220  spec = a.specification()
221  a_type = spec.typeName()
222  if a_type.find('string') >= 0:
223  a_data = a.data['string']()
224  try:
225  a_data = eval(a_data,{},{})
226  except Exception:
227  # swallow and keep as a string
228  pass
229  else:
230  a_data = a.data[a_type]()
231  #msg.info("%s: %s %s", spec.name(), a_data, type(a_data) )
232  attr_data.append( (spec.name(), a_data) )
233  attrs.append(dict(attr_data))
234  # msg.info(attrs[-1])
235  if len(attrs) == len(chan_names):
236  data.append(dict(zip(chan_names,attrs)))
237  else:
238  if len(attrs):
239  if len(attrs) == 1:
240  data.append(attrs[0])
241  else:
242  data.append(attrs)
243  else:
244  data.append(chan_names)
245  pass # loop over payloads...
246 
247  #payload.dump()
248 
252  return data
253 

◆ reinitialize()

StatusCode PyAthena::Alg::reinitialize ( )
overridevirtualinherited

Definition at line 67 of file PyAthenaAlg.cxx.

68 {
69  ATH_MSG_INFO("Re-Initializing " << name() << "...");
70  return PyAthena::callPyMethod( m_self, "sysReinitialize" );
71 }

◆ renounce()

std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(T)> > && !std::is_base_of_v<SG::VarHandleKeyArray, T> && std::is_base_of_v<Gaudi::DataHandle, T>, void> AthCommonDataStore< AthCommonMsg< Algorithm > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ self()

virtual PyObject* PyAthena::Alg::self ( )
inlineoverridevirtualinherited

return associated python object.

BORROWED reference.

Implements IPyComponent.

Definition at line 71 of file PyAthenaAlg.h.

71 { return m_self; }

◆ setPyAttr()

bool PyAthena::Alg::setPyAttr ( PyObject pyobj)
overrideprotectedvirtualinherited

attach the C++ component to its python cousin

Implements IPyComponent.

Definition at line 143 of file PyAthenaAlg.cxx.

144 {
145  // now we tell the PyObject which C++ object it is the cousin of.
147  PyObject* pyobj = TPython::CPPInstance_FromVoidPtr
148  ( (void*)this, this->typeName() );
149  if ( !pyobj ) {
150  PyErr_Clear();
151  // try PyAthena::Alg
152  pyobj = TPython::CPPInstance_FromVoidPtr ((void*)this, "PyAthena::Alg");
154  ("could not dyncast component [" << name() << "] to a python "
155  << "object of type [" << this->typeName() << "] (probably a missing "
156  << "dictionary)" << endmsg
157  << "fallback to [PyAthena::Alg]...");
158  }
159  if ( !pyobj ) {
160  PyErr_Clear();
161  ATH_MSG_WARNING("Could not dyncast component ["
162  << name() << "] to a pyobject of type ["
163  << this->typeName() << "]");
164  } else {
165  if ( -1 == PyObject_SetAttrString(o, "_cppHandle", pyobj) ) {
166  PyErr_Clear();
168  ("Could not attach C++ handle [" << name() << "] to its python "
169  << "cousin !");
170  if ( -1 == PyObject_SetAttrString(o, "_cppHandle", Py_None) ) {
171  PyErr_Clear();
173  ("could not attach a dummy C++ handle [" << name() << "] to its "
174  "python cousin !");
175  }
176  } else {
177  return true;
178  }
179  }
180  return false;
181 }

◆ start() [1/2]

StatusCode PyAthena::Alg::start ( )
overridevirtualinherited

Definition at line 74 of file PyAthenaAlg.cxx.

75 {
76  return PyAthena::callPyMethod( m_self, "sysStart" );
77 }

◆ start() [2/2]

def python.FilePeekerLib.FilePeeker.start (   self)

Definition at line 115 of file FilePeekerLib.py.

115  def start(self):
116  self._begin_run_flag = True
117  # retrieving data available at start...
118  self.peeked_data.update(self._do_peeking(peek_evt_data=False))
119  self.print_summary()
120  return StatusCode.Success
121 

◆ stop() [1/2]

StatusCode PyAthena::Alg::stop ( )
overridevirtualinherited

Definition at line 80 of file PyAthenaAlg.cxx.

81 {
82  return PyAthena::callPyMethod( m_self, "sysStop" );
83 }

◆ stop() [2/2]

def python.FilePeekerLib.FilePeeker.stop (   self)

Definition at line 122 of file FilePeekerLib.py.

122  def stop(self):
123  if not self._begin_run_flag:
124  # retrieving data for event less jobs, where no beginRun is called
125  self.peeked_data.update(self._do_peeking(peek_evt_data=False))
126  self.print_summary()
127 
128  return StatusCode.Success
129 

◆ sysInitialize()

StatusCode PyAthena::Alg::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthAlgorithm.

Definition at line 105 of file PyAthenaAlg.cxx.

106 {
108  ( "PyAthena::PyComponentMgr/PyComponentMgr", name() );
109  if ( !pyMgr.retrieve().isSuccess() ) {
110  ATH_MSG_ERROR("Could not retrieve service [" << pyMgr.typeAndName()
111  << "] !!");
112  return StatusCode::FAILURE;
113  }
114 
115  // first retrieve our python object cousin...
116  m_self = pyMgr->pyObject( this );
117 
118  if ( m_self == Py_None ) {
119  ATH_MSG_ERROR("Wrapped PyObject is NONE !");
120  return StatusCode::FAILURE;
121  }
122 
123  // re-route to usual sysInit...
124  return AlgBase_t::sysInitialize();
125 }

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Algorithm > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ tagStore()

def python.FilePeekerLib.FilePeeker.tagStore (   self)

Definition at line 141 of file FilePeekerLib.py.

141  def tagStore(self):
142  import AthenaPython.PyAthena as PyAthena
143  return PyAthena.py_svc('StoreGateSvc/TagMetaDataStore')
144 

◆ typeName()

const char * PyAthena::Alg::typeName ( ) const
overridevirtualinherited

return the std::type_info name of the underlying py-component This is used by concrete implementations to connect a python component to its C++ counter-part

Implements IPyComponent.

Definition at line 132 of file PyAthenaAlg.cxx.

133 {
134  static const std::string tname = System::typeinfoName(typeid(*this));
135  return tname.c_str();
136 }

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ _begin_run_flag

python.FilePeekerLib.FilePeeker._begin_run_flag
private

Definition at line 77 of file FilePeekerLib.py.

◆ _old_file_flag

python.FilePeekerLib.FilePeeker._old_file_flag
private

input-store self.inputStore.dump()

– metadata – taginfo

Definition at line 74 of file FilePeekerLib.py.

◆ _peeked_events

python.FilePeekerLib.FilePeeker._peeked_events
private

Definition at line 80 of file FilePeekerLib.py.

◆ infname

python.FilePeekerLib.FilePeeker.infname

init base class

if store_name not in ('evtStore',): _info('loading event proxies for [s]...', store_name) status = 'ok' if o.loadEventProxies().isSuccess() else 'err' _info('loading event proxies for [s]...

(s)', store_name, status)

Definition at line 70 of file FilePeekerLib.py.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthAlgorithm::m_extendedExtraObjects
privateinherited

Definition at line 79 of file AthAlgorithm.h.

◆ m_self

PyObject* PyAthena::Alg::m_self
protectedinherited

Pointer to self (from the python world)

Definition at line 96 of file PyAthenaAlg.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< Algorithm > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.

◆ outfname

python.FilePeekerLib.FilePeeker.outfname

Definition at line 71 of file FilePeekerLib.py.

◆ peeked_data

python.FilePeekerLib.FilePeeker.peeked_data

Definition at line 85 of file FilePeekerLib.py.


The documentation for this class was generated from the following file:
PyAthena::Alg::m_self
PyObject * m_self
Pointer to self (from the python world)
Definition: PyAthenaAlg.h:96
python.tests.PyTestsLib.finalize
def finalize(self)
_info( "content of StoreGate..." ) self.sg.dump()
Definition: PyTestsLib.py:50
PyAthena::Alg::typeName
virtual const char * typeName() const override
return the std::type_info name of the underlying py-component This is used by concrete implementation...
Definition: PyAthenaAlg.cxx:132
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
initialize
void initialize()
Definition: run_EoverP.cxx:894
python.FilePeekerLib._create_file_infos
def _create_file_infos()
Definition: FilePeekerLib.py:29
mergePhysValFiles.start
start
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:13
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
python.processes.powheg.ZZj_MiNNLO.ZZj_MiNNLO.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: ZZj_MiNNLO.py:18
PixelModuleFeMask_create_db.stop
int stop
Definition: PixelModuleFeMask_create_db.py:76
xAODRootTest._typename
def _typename(t)
Definition: xAODRootTest.py:34
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
dumpHVPathFromNtuple.append
bool append
Definition: dumpHVPathFromNtuple.py:91
XMLtoHeader.count
count
Definition: XMLtoHeader.py:84
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
python.FilePeekerLib.toiter
def toiter(beg, end)
Definition: FilePeekerLib.py:23
RootUtils::PyGILStateEnsure
Definition: PyAthenaGILStateEnsure.h:20
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
LArG4FSStartPointFilterLegacy.execute
execute
Definition: LArG4FSStartPointFilterLegacy.py:20
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:209
AthCommonDataStore
Definition: AthCommonDataStore.h:52
AthAlgorithm::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition: AthAlgorithm.cxx:66
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
Athena::typeinfoName
std::string typeinfoName(const std::type_info &ti)
Convert a type_info to a demangled string.
Definition: AthenaKernel/src/ClassName.cxx:23
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
Definition: AthCommonDataStore.h:145
contains
bool contains(const std::string &s, const std::string &regx)
does a string contain the substring
Definition: hcg.cxx:111
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:194
histSizes.list
def list(name, path='/')
Definition: histSizes.py:38
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
CxxUtils::set
constexpr std::enable_if_t< is_bitmask_v< E >, E & > set(E &lhs, E rhs)
Convenience function to set bits in a class enum bitmask.
Definition: bitmask.h:232
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
AthAlgorithm::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Definition: AthAlgorithm.h:79
a
TList * a
Definition: liststreamerinfos.cxx:10
h
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
python.FilePeekerLib._import_ROOT
def _import_ROOT()
helper functions -------------------------------------------------------—
Definition: FilePeekerLib.py:17
get
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
Definition: hcg.cxx:127
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:629
str
Definition: BTagTrackIpAccessor.cxx:11
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:801
calibdata.copy
bool copy
Definition: calibdata.py:26
xAOD::bool
setBGCode setTAP setLVL2ErrorBits bool
Definition: TrigDecision_v1.cxx:60
PyObject
_object PyObject
Definition: IPyComponent.h:26
runTrigART.print_summary
def print_summary(all_test_results, failed_tests)
Definition: runTrigART.py:137
python.ParticleTypeUtil.info
def info
Definition: ParticleTypeUtil.py:87
Trk::split
@ split
Definition: LayerMaterialProperties.h:38
fitman.k
k
Definition: fitman.py:528
python.LArMinBiasAlgConfig.float
float
Definition: LArMinBiasAlgConfig.py:65
ServiceHandle
Definition: ClusterMakerTool.h:37