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 > &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 > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &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 66 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 69 of file FilePeekerLib.py.

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

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 314 of file FilePeekerLib.py.

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

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  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 > &  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 > &  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 > &  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 > &  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 133 of file FilePeekerLib.py.

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

◆ 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 152 of file FilePeekerLib.py.

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

◆ 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 256 of file FilePeekerLib.py.

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

◆ 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 84 of file FilePeekerLib.py.

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

◆ 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 148 of file FilePeekerLib.py.

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

◆ metaStore()

def python.FilePeekerLib.FilePeeker.metaStore (   self)

Definition at line 138 of file FilePeekerLib.py.

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

◆ 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 293 of file FilePeekerLib.py.

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

◆ process_metadata()

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

Definition at line 158 of file FilePeekerLib.py.

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

◆ 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 117 of file FilePeekerLib.py.

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

◆ 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 124 of file FilePeekerLib.py.

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

◆ 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 143 of file FilePeekerLib.py.

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

◆ 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 79 of file FilePeekerLib.py.

◆ _old_file_flag

python.FilePeekerLib.FilePeeker._old_file_flag
private

input-store self.inputStore.dump()

– metadata – taginfo

Definition at line 76 of file FilePeekerLib.py.

◆ _peeked_events

python.FilePeekerLib.FilePeeker._peeked_events
private

Definition at line 82 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 72 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 73 of file FilePeekerLib.py.

◆ peeked_data

python.FilePeekerLib.FilePeeker.peeked_data

Definition at line 87 of file FilePeekerLib.py.


The documentation for this class was generated from the following file:
grepfile.info
info
Definition: grepfile.py:38
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
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
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
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
initialize
void initialize()
Definition: run_EoverP.cxx:894
python.FilePeekerLib._create_file_infos
def _create_file_infos()
Definition: FilePeekerLib.py:31
mergePhysValFiles.start
start
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:14
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
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:85
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:25
RootUtils::PyGILStateEnsure
Definition: PyAthenaGILStateEnsure.h:20
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:27
LArG4FSStartPointFilterLegacy.execute
execute
Definition: LArG4FSStartPointFilterLegacy.py:20
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
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
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:195
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:221
python.processes.powheg.ZZ.ZZ.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: ZZ.py:18
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:19
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:623
str
Definition: BTagTrackIpAccessor.cxx:11
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
calibdata.copy
bool copy
Definition: calibdata.py:27
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
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
WriteBchToCool.update
update
Definition: WriteBchToCool.py:67
readCCLHist.float
float
Definition: readCCLHist.py:83
Trk::split
@ split
Definition: LayerMaterialProperties.h:38
fitman.k
k
Definition: fitman.py:528
ServiceHandle
Definition: ClusterMakerTool.h:37