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

In This Package:

test Namespace Reference


Functions

def init
def run
def _dir_
def _get_

Variables

list loc = sys.argv[1]
string loc = '/home/bviren/work/dayabay/code/dddb/trivial.xml'
list vol = sys.argv[2]
string vol = '/dd/Geometry/Trivial/lvWorld'

Function Documentation

def test::init (   loc  ) 

Definition at line 8 of file test.py.

00008               :
00009 
00010     #gaudi.loaddict('DetDict')
00011     g=gaudi.AppMgr()
00012     #g.DLLs   += [ "XmlTools"   , "DetDescCnv"    ,
00013     #              "DetDescSvc" , "DetDescChecks" , "RootHistCnv" ]
00014 
00015     g.HistogramPersistency = "ROOT"
00016     g.config()
00017 
00018     hsvc = g.service('HistogramPersistencySvc')
00019     hsvc.OutputFile = "test.root"
00020 
00021 
00022     g.DLLs += [ "RootHistCnv" ]
00023     g.ExtSvc += [ "XmlCnvSvc" , "XmlParserSvc" ] 
00024     g.EvtSel = "NONE"
00025     
00026     det = g.service('DetectorPersistencySvc')
00027     det.CnvServices = ["XmlCnvSvc"]
00028 
00029     det = g.service('XmlCnvSvc')
00030     det.AllowGenericConversion = True
00031 
00032     det = g.service('DetectorDataSvc')
00033     det.UsePersistency = True
00034     det.DetDbRootName  = "dd"
00035     det.DetStorageType = 7
00036     #det.DetDbLocation  = '/home/bviren/work/dayabay/code/lhcb/Det/XmlDDDB/DDDB/lhcb.xml'
00037     #det.DetDbLocation  = '/home/bviren/work/dayabay/code/dddb/dayabay.xml'
00038     det.DetDbLocation  = loc
00039     
00040     
00041 
def run( volume , event = 1 ) :

def test::run (   volume,
  event = 1 
)

Definition at line 42 of file test.py.

00042                               :
00043     g = gaudi.AppMgr() 
00044     g.TopAlg = ["VolumeCheckAlg/Check"]
00045     
00046     alg = g.algorithm('Check')
00047     alg.Shots3D = 10000
00048     alg.ShotsXY = 100000
00049     alg.ShotsYZ = 10000
00050     alg.ShotsZX = 10000
00051     alg.Volume  = volume
00052     g.run( event )
00053     
def _dir_ ( self , node = None , level = -1 ) :

def test::_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 54 of file test.py.

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

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

Definition at line 93 of file test.py.

00093                                                : True ) :
00094     if   str is type(node) : node = self.retrieveObject( node )
00095     elif  not node         : return _get_( self , '' , cut  )
00096     if not node            : return []
00097     if     hasattr ( node , 'registry'   ) : node = node.registry()
00098     result = []
00099     if     hasattr ( node , 'identifier' ) :
00100         obj = node.object()
00101         if cut( obj ) : result += [ obj ]
00102     for l in self.leaves ( node ) :
00103         if l : result += _get_( self , l , cut )
00104     return result 
00105     
00106 gaudi.iDataSvc.dir = _dir_ 
00107 gaudi.iDataSvc.DIR = _get_ 
00108 
00109 


Variable Documentation

list test::loc = sys.argv[1] [static]

Definition at line 114 of file test.py.

string test::loc = '/home/bviren/work/dayabay/code/dddb/trivial.xml' [static]

Definition at line 116 of file test.py.

list test::vol = sys.argv[2] [static]

Definition at line 120 of file test.py.

string test::vol = '/dd/Geometry/Trivial/lvWorld' [static]

Definition at line 122 of file test.py.

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

Generated on Mon Apr 11 20:05:14 2011 for DetDescChecks by doxygen 1.4.7