Geant4  10.02
G4GIDI.hh
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 /*
27 # <<BEGIN-copyright>>
28 # <<END-copyright>>
29 */
30 #ifndef G4GIDI_h_included
31 #define G4GIDI_h_included 1
32 
33 #include <string>
34 #include <list>
35 #include <vector>
36 //using namespace std;
37 
38 #include <G4GIDI_Misc.hh>
39 #include <G4GIDI_map.hh>
40 #include <G4GIDI_target.hh>
41 #include <G4GIDI_mass.hh>
42 
43 class G4GIDI {
44 
45  private:
47  std::string projectile;
48  std::list<G4GIDI_map *> dataDirectories;
49  std::vector<G4GIDI_target *> targets;
50 
51  int init( int ip );
52 
53  public:
54  G4GIDI( int ip, std::string &dataDirectory );
55  G4GIDI( int ip, std::list<std::string> &dataDirectory );
56  ~G4GIDI( );
57 
58  int numberOfDataDirectories( void );
59  int addDataDirectory( std::string &dataDirectory );
60  int removeDataDirectory( std::string &dataDirectory );
61  std::string getDataDirectoryAtIndex( int index );
62  std::vector<std::string> *getDataDirectories( void );
63 
64  bool isThisDataAvailable( std::string &lib_name, int iZ, int iA, int iM = 0 );
65  bool isThisDataAvailable( std::string &lib_name, std::string &targetName );
66 
67  char *dataFilename( std::string &lib_name, int iZ, int iA, int iM = 0 );
68  char *dataFilename( std::string &lib_name, std::string &targetName );
69 
70  std::vector<std::string> *getNamesOfAvailableLibraries( int iZ, int iA, int iM = 0 );
71  std::vector<std::string> *getNamesOfAvailableLibraries( std::string &targetName );
72 
73  std::vector<std::string> *getNamesOfAvailableTargets( void );
74 
75  G4GIDI_target *readTarget( std::string &lib_name, int iZ, int iA, int iM = 0, bool bind = true );
76  G4GIDI_target *readTarget( std::string &lib_name, std::string &targetName, bool bind = true );
77 
78  G4GIDI_target *getAlreadyReadTarget( int iZ, int iA, int iM = 0 );
79  G4GIDI_target *getAlreadyReadTarget( std::string &targetName );
80 
81  int freeTarget( int iZ, int iA, int iM = 0 );
82  int freeTarget( std::string &targetSymbol );
83  int freeTarget( G4GIDI_target *target );
84 
85  std::vector<std::string> *getListOfReadTargetsNames( void );
86 };
87 
88 #endif // End of G4GIDI_h_included
char * dataFilename(std::string &lib_name, int iZ, int iA, int iM=0)
Definition: G4GIDI.cc:196
std::vector< std::string > * getDataDirectories(void)
Definition: G4GIDI.cc:157
std::string getDataDirectoryAtIndex(int index)
Definition: G4GIDI.cc:140
G4GIDI_target * getAlreadyReadTarget(int iZ, int iA, int iM=0)
Definition: G4GIDI.cc:321
int init(int ip)
Definition: G4GIDI.cc:77
std::vector< G4GIDI_target * > targets
Definition: G4GIDI.hh:49
int numberOfDataDirectories(void)
Definition: G4GIDI.cc:103
int freeTarget(int iZ, int iA, int iM=0)
Definition: G4GIDI.cc:363
std::vector< std::string > * getNamesOfAvailableLibraries(int iZ, int iA, int iM=0)
Definition: G4GIDI.cc:237
bool isThisDataAvailable(std::string &lib_name, int iZ, int iA, int iM=0)
Definition: G4GIDI.cc:169
std::vector< std::string > * getListOfReadTargetsNames(void)
Definition: G4GIDI.cc:389
~G4GIDI()
Definition: G4GIDI.cc:58
G4GIDI_target * readTarget(std::string &lib_name, int iZ, int iA, int iM=0, bool bind=true)
Definition: G4GIDI.cc:289
std::list< G4GIDI_map * > dataDirectories
Definition: G4GIDI.hh:48
G4GIDI(int ip, std::string &dataDirectory)
Definition: G4GIDI.cc:40
int removeDataDirectory(std::string &dataDirectory)
Definition: G4GIDI.cc:126
std::string projectile
Definition: G4GIDI.hh:47
int projectileID
Definition: G4GIDI.hh:46
int addDataDirectory(std::string &dataDirectory)
Definition: G4GIDI.cc:110
std::vector< std::string > * getNamesOfAvailableTargets(void)
Definition: G4GIDI.cc:271
Definition: G4GIDI.hh:43