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

In This Package:

GiGaUtil Namespace Reference

GiGaUtil.h "GiGa/GiGaUtil.h" helper utilities for GiGa. More...


Classes

class  Delete
 useful utility(templated class) to delete the object More...
class  Eraser
 useful utility(functor) to delete the object More...
struct  FastCast
 Helpful utility to perfrom a fast cast. More...
class  InstanceCounter
 Static class used to instrument constructors and destructors to search for memory leaks. More...

Functions

std::ostream & DumpG4Event (std::ostream &stream, const G4Event *event=0)
std::ostream & DumpG4Event (const G4Event *event=0, std::ostream &stream=std::cout)
std::ostream & DumpG4Step (std::ostream &stream, const G4Step *step=0)
std::ostream & DumpG4Step (const G4Step *step=0, std::ostream &stream=std::cout)
std::ostream & DumpG4Track (std::ostream &stream, const G4Track *track=0)
std::ostream & DumpG4Track (const G4Track *track=0, std::ostream &stream=std::cout)
StatusCode SplitTypeAndName (const std::string &TypeAndName, std::string &Type, std::string &Name)
 split a "Type/Name" string into "Type" and "Name"
template<class TYPE>
const std::string ObjTypeName (TYPE obj)
 useful utility(function) to extract the object type name
template<class TYPE>
TYPE * Delete_Ptr (TYPE *obj)
 useful utility(templated function) to delete the object through the pointer

Detailed Description

GiGaUtil.h "GiGa/GiGaUtil.h" helper utilities for GiGa.

collection of simple helper utilities for GiGa package

Author:
Ivan Belyaev
Date:
23/07/2001


Function Documentation

std::ostream& GiGaUtil::DumpG4Event ( std::ostream &  stream,
const G4Event *  event = 0 
)

std::ostream& GiGaUtil::DumpG4Event ( const G4Event *  event = 0,
std::ostream &  stream = std::cout 
)

std::ostream& GiGaUtil::DumpG4Step ( std::ostream &  stream,
const G4Step *  step = 0 
)

std::ostream& GiGaUtil::DumpG4Step ( const G4Step *  step = 0,
std::ostream &  stream = std::cout 
)

std::ostream& GiGaUtil::DumpG4Track ( std::ostream &  stream,
const G4Track *  track = 0 
)

std::ostream& GiGaUtil::DumpG4Track ( const G4Track *  track = 0,
std::ostream &  stream = std::cout 
)

StatusCode GiGaUtil::SplitTypeAndName ( const std::string &  TypeAndName,
std::string &  Type,
std::string &  Name 
)

split a "Type/Name" string into "Type" and "Name"

rules:

error conditions

Parameters:
TypeAndName the string to be splitted
Type returned "Type"
Name returned "Name"
Returns:
status code

template<class TYPE>
const std::string GiGaUtil::ObjTypeName ( TYPE  obj  )  [inline]

useful utility(function) to extract the object type name

Parameters:
obj pointer to object of type "TYPE"
Returns:
type name of the object

Definition at line 59 of file GiGaUtil.h.

00060   { 
00061     return 
00062       obj ? 
00063       std::string( System::typeinfoName( typeid(*obj) ) ) : 
00064       std::string( "'UNKNOWN_type'" );
00065   };

template<class TYPE>
TYPE* GiGaUtil::Delete_Ptr ( TYPE *  obj  )  [inline]

useful utility(templated function) to delete the object through the pointer

Author:
Vanya Belyaev
Date:
23/07/2001
Parameters:
obj pointer to object to be deleted
Returns:
NULL pointer

Definition at line 123 of file GiGaUtil.h.

00124   { 
00125     if( 0 != obj ) { delete obj ; obj = 0 ; }
00126     return obj ;
00127   };

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

Generated on Mon Apr 11 20:01:19 2011 for GiGa by doxygen 1.4.7