Geant4  10.02.p01
MCGIDI_map.cc File Reference
#include <string.h>
#include <limits.h>
#include <PoPs.h>
#include "MCGIDI_map.h"
#include <xDataTOM_importXML_private.h>
+ Include dependency graph for MCGIDI_map.cc:

Go to the source code of this file.

Macros

#define PATH_MAX   4096
 

Functions

static MCGIDI_mapEntry * _MCGIDI_map_addEntry (statusMessageReporting *smr, MCGIDI_map *map, enum MCGIDI_mapEntry_type type, const char *schema, const char *path, const char *evaluation, const char *projectile, const char *target)
 
static char * _MCGIDI_map_findTargetViaPoPIDs2 (statusMessageReporting *smr, MCGIDI_map *map, const char *evaluation, int projectile_PoPID, int target_PoPID)
 
static int _MCGIDI_map_findAllOfTargetViaPoPIDs2 (statusMessageReporting *smr, MCGIDI_map *mapAllOfTarget, MCGIDI_map *map, int projectile_PoPID, int target_PoPID)
 
static int _MCGIDI_map_walkTree2 (statusMessageReporting *smr, MCGIDI_map *map, int level, int(*handler)(MCGIDI_mapEntry *entry, int level, void *userData), void *userData)
 
static void _MCGIDI_map_simpleWrite2 (FILE *f, MCGIDI_map *map, int level)
 
static char * _MCGIDI_map_smrUserInterface (void *userData)
 
MCGIDI_map * MCGIDI_map_new (statusMessageReporting *smr)
 
int MCGIDI_map_initialize (statusMessageReporting *smr, MCGIDI_map *map)
 
MCGIDI_map * MCGIDI_map_readFile (statusMessageReporting *smr, const char *basePath, const char *mapFileName)
 
void * MCGIDI_map_free (statusMessageReporting *smr, MCGIDI_map *map)
 
void MCGIDI_map_release (statusMessageReporting *smr, MCGIDI_map *map)
 
MCGIDI_mapEntry * MCGIDI_map_getFirstEntry (MCGIDI_map *map)
 
MCGIDI_mapEntry * MCGIDI_map_getNextEntry (MCGIDI_mapEntry *entry)
 
int MCGIDI_map_addTarget (statusMessageReporting *smr, MCGIDI_map *map, const char *schema, const char *path, const char *evaluation, const char *projectile, const char *target)
 
int MCGIDI_map_addPath (statusMessageReporting *smr, MCGIDI_map *map, const char *path)
 
char * MCGIDI_map_findTargetViaPoPIDs (statusMessageReporting *smr, MCGIDI_map *map, const char *evaluation, int projectile_PoPID, int target_PoPID)
 
char * MCGIDI_map_findTarget (statusMessageReporting *smr, MCGIDI_map *map, const char *evaluation, const char *projectile, const char *targetName)
 
MCGIDI_map * MCGIDI_map_findAllOfTargetViaPoPIDs (statusMessageReporting *smr, MCGIDI_map *map, int projectile_PoPID, int target_PoPID)
 
MCGIDI_map * MCGIDI_map_findAllOfTarget (statusMessageReporting *smr, MCGIDI_map *map, const char *projectile, const char *targetName)
 
char * MCGIDI_map_getFullPath (statusMessageReporting *smr, MCGIDI_map *map, const char *endPath)
 
char * MCGIDI_map_getTargetsFullPath (statusMessageReporting *smr, MCGIDI_mapEntry *target)
 
int MCGIDI_map_walkTree (statusMessageReporting *smr, MCGIDI_map *map, int(*handler)(MCGIDI_mapEntry *entry, int level, void *userData), void *userData)
 
char * MCGIDI_map_toXMLString (statusMessageReporting *smr, MCGIDI_map *map)
 
void MCGIDI_map_simpleWrite (FILE *f, MCGIDI_map *map)
 

Variables

static int aliasesNeeded = 1
 

Macro Definition Documentation

#define PATH_MAX   4096

Definition at line 12 of file MCGIDI_map.cc.

Referenced by MCGIDI_map_readFile().

Function Documentation

static MCGIDI_mapEntry * _MCGIDI_map_addEntry ( statusMessageReporting *  smr,
MCGIDI_map *  map,
enum MCGIDI_mapEntry_type  type,
const char *  schema,
const char *  path,
const char *  evaluation,
const char *  projectile,
const char *  target 
)
static

Definition at line 237 of file MCGIDI_map.cc.

References lPoPs_addParticleIfNeeded(), and smr_freeMemory().

Referenced by _MCGIDI_map_findAllOfTargetViaPoPIDs2(), MCGIDI_map_addPath(), and MCGIDI_map_addTarget().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int _MCGIDI_map_findAllOfTargetViaPoPIDs2 ( statusMessageReporting *  smr,
MCGIDI_map *  mapAllOfTarget,
MCGIDI_map *  map,
int  projectile_PoPID,
int  target_PoPID 
)
static

Definition at line 404 of file MCGIDI_map.cc.

References _MCGIDI_map_addEntry().

Referenced by MCGIDI_map_findAllOfTargetViaPoPIDs().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static char * _MCGIDI_map_findTargetViaPoPIDs2 ( statusMessageReporting *  smr,
MCGIDI_map *  map,
const char *  evaluation,
int  projectile_PoPID,
int  target_PoPID 
)
static

Definition at line 329 of file MCGIDI_map.cc.

References n.

Referenced by MCGIDI_map_findTargetViaPoPIDs().

+ Here is the caller graph for this function:

static void _MCGIDI_map_simpleWrite2 ( FILE *  f,
MCGIDI_map *  map,
int  level 
)
static

Definition at line 554 of file MCGIDI_map.cc.

References n.

Referenced by MCGIDI_map_simpleWrite().

+ Here is the caller graph for this function:

static char * _MCGIDI_map_smrUserInterface ( void *  userData)
static

Definition at line 585 of file MCGIDI_map.cc.

References smr_allocateFormatMessage().

Referenced by MCGIDI_map_initialize().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int _MCGIDI_map_walkTree2 ( statusMessageReporting *  smr,
MCGIDI_map *  map,
int  level,
int(*)(MCGIDI_mapEntry *entry, int level, void *userData handler,
void *  userData 
)
static

Definition at line 480 of file MCGIDI_map.cc.

Referenced by MCGIDI_map_walkTree().

+ Here is the caller graph for this function:

int MCGIDI_map_addPath ( statusMessageReporting *  smr,
MCGIDI_map *  map,
const char *  path 
)

Definition at line 225 of file MCGIDI_map.cc.

References _MCGIDI_map_addEntry(), and MCGIDI_map_readFile().

Referenced by MCGIDI_map_readFile().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int MCGIDI_map_addTarget ( statusMessageReporting *  smr,
MCGIDI_map *  map,
const char *  schema,
const char *  path,
const char *  evaluation,
const char *  projectile,
const char *  target 
)

Definition at line 218 of file MCGIDI_map.cc.

References _MCGIDI_map_addEntry().

Referenced by MCGIDI_map_readFile().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

MCGIDI_map* MCGIDI_map_findAllOfTarget ( statusMessageReporting *  smr,
MCGIDI_map *  map,
const char *  projectile,
const char *  targetName 
)

Definition at line 430 of file MCGIDI_map.cc.

References lPoPs_addParticleIfNeeded(), and MCGIDI_map_findAllOfTargetViaPoPIDs().

Referenced by G4GIDI::getNamesOfAvailableLibraries().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

MCGIDI_map* MCGIDI_map_findAllOfTargetViaPoPIDs ( statusMessageReporting *  smr,
MCGIDI_map *  map,
int  projectile_PoPID,
int  target_PoPID 
)

Definition at line 387 of file MCGIDI_map.cc.

References _MCGIDI_map_findAllOfTargetViaPoPIDs2(), MCGIDI_map_free(), and MCGIDI_map_new().

Referenced by MCGIDI_map_findAllOfTarget().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

char* MCGIDI_map_findTarget ( statusMessageReporting *  smr,
MCGIDI_map *  map,
const char *  evaluation,
const char *  projectile,
const char *  targetName 
)

Definition at line 376 of file MCGIDI_map.cc.

References lPoPs_addParticleIfNeeded(), and MCGIDI_map_findTargetViaPoPIDs().

Referenced by G4GIDI::dataFilename(), MCGIDI_target_newReadFromMap(), and MCGIDI_target_readFromMap().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

char* MCGIDI_map_findTargetViaPoPIDs ( statusMessageReporting *  smr,
MCGIDI_map *  map,
const char *  evaluation,
int  projectile_PoPID,
int  target_PoPID 
)

Definition at line 302 of file MCGIDI_map.cc.

References _MCGIDI_map_findTargetViaPoPIDs2(), PoPs_getName_atIndex(), and smr_isOk().

Referenced by MCGIDI_map_findTarget(), MCGIDI_target_newReadFromMapViaPoPIDs(), and MCGIDI_target_readFromMapViaPoPIDs().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void* MCGIDI_map_free ( statusMessageReporting *  smr,
MCGIDI_map *  map 
)

Definition at line 173 of file MCGIDI_map.cc.

References MCGIDI_map_release(), and smr_freeMemory().

Referenced by G4GIDI::getNamesOfAvailableLibraries(), MCGIDI_map_findAllOfTargetViaPoPIDs(), MCGIDI_map_new(), MCGIDI_map_readFile(), MCGIDI_map_release(), and G4GIDI_map::~G4GIDI_map().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

MCGIDI_mapEntry* MCGIDI_map_getFirstEntry ( MCGIDI_map *  map)

Definition at line 204 of file MCGIDI_map.cc.

Referenced by G4GIDI::getNamesOfAvailableLibraries().

+ Here is the caller graph for this function:

char* MCGIDI_map_getFullPath ( statusMessageReporting *  smr,
MCGIDI_map *  map,
const char *  endPath 
)

Definition at line 441 of file MCGIDI_map.cc.

Referenced by MCGIDI_map_getTargetsFullPath().

+ Here is the caller graph for this function:

MCGIDI_mapEntry* MCGIDI_map_getNextEntry ( MCGIDI_mapEntry *  entry)

Definition at line 211 of file MCGIDI_map.cc.

Referenced by G4GIDI::getNamesOfAvailableLibraries().

+ Here is the caller graph for this function:

char* MCGIDI_map_getTargetsFullPath ( statusMessageReporting *  smr,
MCGIDI_mapEntry *  target 
)

Definition at line 459 of file MCGIDI_map.cc.

References MCGIDI_map_getFullPath().

+ Here is the call graph for this function:

int MCGIDI_map_initialize ( statusMessageReporting *  smr,
MCGIDI_map *  map 
)

Definition at line 60 of file MCGIDI_map.cc.

References _MCGIDI_map_smrUserInterface(), aliasesNeeded, lPoPs_addParticleIfNeeded(), PoPs_addAliasIfNeeded(), and smr_isOk().

Referenced by MCGIDI_map_new().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

MCGIDI_map* MCGIDI_map_new ( statusMessageReporting *  smr)

Definition at line 49 of file MCGIDI_map.cc.

References MCGIDI_map_free(), and MCGIDI_map_initialize().

Referenced by MCGIDI_map_findAllOfTargetViaPoPIDs(), and MCGIDI_map_readFile().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

MCGIDI_map* MCGIDI_map_readFile ( statusMessageReporting *  smr,
const char *  basePath,
const char *  mapFileName 
)

Definition at line 93 of file MCGIDI_map.cc.

References MCGIDI_map_addPath(), MCGIDI_map_addTarget(), MCGIDI_map_free(), MCGIDI_map_new(), n, PATH_MAX, smr_isOk(), xDataXML_freeDoc(), xDataXML_getAttributesValueInElement(), xDataXML_getDocumentsElement(), xDataXML_getFirstElement(), xDataXML_getNextElement(), and xDataXML_importFile2().

Referenced by G4GIDI_map::G4GIDI_map(), and MCGIDI_map_addPath().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void MCGIDI_map_release ( statusMessageReporting *  smr,
MCGIDI_map *  map 
)

Definition at line 182 of file MCGIDI_map.cc.

References MCGIDI_map_free(), and smr_freeMemory().

Referenced by MCGIDI_map_free().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void MCGIDI_map_simpleWrite ( FILE *  f,
MCGIDI_map *  map 
)

Definition at line 550 of file MCGIDI_map.cc.

References _MCGIDI_map_simpleWrite2().

+ Here is the call graph for this function:

char* MCGIDI_map_toXMLString ( statusMessageReporting *  smr,
MCGIDI_map *  map 
)

Definition at line 501 of file MCGIDI_map.cc.

References n, and s.

int MCGIDI_map_walkTree ( statusMessageReporting *  smr,
MCGIDI_map *  map,
int(*)(MCGIDI_mapEntry *entry, int level, void *userData handler,
void *  userData 
)

Definition at line 494 of file MCGIDI_map.cc.

References _MCGIDI_map_walkTree2().

Referenced by G4GIDI::getNamesOfAvailableTargets().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

int aliasesNeeded = 1
static

Definition at line 20 of file MCGIDI_map.cc.

Referenced by MCGIDI_map_initialize().