| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

dump Namespace Reference


Functions

def init
def _dir_
def _get_

Variables

string vol = "/dd"
tuple det = os.getenv("XMLDETDESCROOT")
 verbose = None
 verbose = arg
 vol = arg
 det = arg
tuple g = gaudi.AppMgr()
tuple det = g.detSvc()

Function Documentation

def dump::init (   loc  ) 

Definition at line 7 of file dump.py.

00007               :
00008 
00009     #gaudi.loaddict('DetDict')
00010     #g=gaudi.AppMgr(outputlevel=1)
00011     g=gaudi.AppMgr()
00012 
00013     #g.DLLs   += [ "XmlTools"   , "DetDescCnv"    ,
00014     #              "DetDescSvc" , "DetDescChecks" , "RootHistCnv" ]
00015 
00016     #g.service('MessageSvc').OutputLevel = 1
00017     ##g.HistogramPersistency = "ROOT"
00018     ##g.config()
00019 
00020     ##hsvc = g.service('HistogramPersistencySvc')
00021     ##hsvc.OutputFile = "test.root"
00022 
00023     ##g.DLLs += [ "RootHistCnv" ]
00024     g.ExtSvc += [ "XmlCnvSvc" , "XmlParserSvc" ] 
00025     g.EvtSel = "NONE"
00026     
00027     det = g.service('DetectorPersistencySvc')
00028     det.CnvServices = ["XmlCnvSvc"]
00029 
00030     det = g.service('XmlCnvSvc')
00031     #det.OutputLevel=1
00032     det.AllowGenericConversion = True
00033 
00034     #XmlParserSvc = g.service('XmlParserSvc')
00035     #XmlParserSvc.EntityResolverSvc = "CondDBEntityResolverSvc"
00036 
00037     det = g.service('DetectorDataSvc')
00038     det.UsePersistency = True
00039     det.DetDbRootName  = "dd"
00040     det.DetStorageType = 7
00041     det.DetDbLocation  = loc
00042     
def _dir_ ( self , node = None , level = -1 ) :

def dump::_dir_ (   self,
  node = None,
  level = -1 
) [private]

The simple tool to perform the inspection fo Data Store

Usage:

evtSvc = gaudi.evtSvc()
evtSvc.dir('MC')
data = evtSvc['Rec/Calo']
evtSvc.dir( data)

Definition at line 43 of file dump.py.

00043                                               :
00044     """
00045     The simple tool to perform the inspection fo Data Store
00046     
00047     Usage:
00048     
00049     evtSvc = gaudi.evtSvc()
00050     evtSvc.dir('MC')
00051     data = evtSvc['Rec/Calo']
00052     evtSvc.dir( data)
00053     
00054     """
00055     if 0 == level          : return gaudi.SUCCESS ;
00056     if   str is type(node) : node = self.retrieveObject( node )
00057     elif  not node         : return self.dir('', level )
00058     if not node            : return gaudi.FAILURE
00059     if     hasattr ( node , 'registry'   ) : node = node.registry()
00060     if     hasattr ( node , 'identifier' ) :
00061         obj = node.object ()
00062         if not obj :
00063             obj = self.retrieveObject( node.identifier() ) 
00064             print  node.identifier()
00065         else :
00066             if hasattr( obj , 'size'    ) :
00067                 size = obj.size()
00068                 if 0 == size : print "%s (empty) %s" % (  node.identifier() , type( obj ) )
00069                 elif hasattr ( obj , 'containedObjects' ) :
00070                     c = obj.containedObjects()[0]
00071                     print "%s container of %d %s objects " % ( node.identifier() , obj.size() , type(c))
00072                 else : 
00073                     print  "%s %s " % (  node.identifier() , type( node.object()) )
00074             else :
00075                 print  "%s %s " % (  node.identifier() , type( node.object()) )
00076     else : print "The node has no 'identifier'"
00077     # start the recursion 
00078     for l in self.leaves( node ) :
00079         if l : self.dir( l , level - 1 )  
00080     return gaudi.SUCCESS 
00081 
def _get_( self , node = None , cut = lambda x : True ) :

def dump::_get_ (   self,
  node = None,
  cut = lambda x : True 
) [private]

Definition at line 82 of file dump.py.

00082                                                : True ) :
00083     if   str is type(node) : node = self.retrieveObject( node )
00084     elif  not node         : return _get_( self , '' , cut  )
00085     if not node            : return []
00086     if     hasattr ( node , 'registry'   ) : node = node.registry()
00087     result = []
00088     if     hasattr ( node , 'identifier' ) :
00089         obj = node.object()
00090         if cut( obj ) : result += [ obj ]
00091     for l in self.leaves ( node ) :
00092         if l : result += _get_( self , l , cut )
00093     return result 
00094     
00095 gaudi.iDataSvc.dir = _dir_ 
00096 gaudi.iDataSvc.DIR = _get_ 
00097 
00098 
00099 


Variable Documentation

string dump::vol = "/dd" [static]

Definition at line 103 of file dump.py.

tuple dump::det = os.getenv("XMLDETDESCROOT") [static]

Definition at line 104 of file dump.py.

dump::verbose = None [static]

Definition at line 112 of file dump.py.

dump::verbose = arg [static]

Definition at line 115 of file dump.py.

dump::vol = arg [static]

Definition at line 117 of file dump.py.

dump::det = arg [static]

Definition at line 119 of file dump.py.

tuple dump::g = gaudi.AppMgr() [static]

Definition at line 128 of file dump.py.

tuple dump::det = g.detSvc() [static]

Definition at line 131 of file dump.py.

| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 20:38:05 2011 for DetDescVis by doxygen 1.4.7