GHepVirtualListFolder.h
Go to the documentation of this file.
1 //____________________________________________________________________________
2 /*!
3 
4 \class genie::GHepVirtualListFolder
5 
6 \brief A singleton class to manage all named GHepVirtualLists
7 
8 \author Costas Andreopoulos <costas.andreopoulos \at stfc.ac.uk>
9  University of Liverpool & STFC Rutherford Appleton Lab
10 
11 \created July 16, 2005
12 
13 \cpright Copyright (c) 2003-2019, The GENIE Collaboration
14  For the full text of the license visit http://copyright.genie-mc.org
15  or see $GENIE/LICENSE
16 */
17 //____________________________________________________________________________
18 
19 #ifndef _GHEP_VIRTUAL_LIST_FOLDER_H_
20 #define _GHEP_VIRTUAL_LIST_FOLDER_H_
21 
22 #include <map>
23 #include <string>
24 
25 using std::map;
26 using std::string;
27 
28 namespace genie {
29 
30 class GHepParticle;
31 class GHepVirtualList;
32 
34 {
35 public:
36 
37  static GHepVirtualListFolder * Instance(void);
38 
39  void AddToVirtualList (string listname, GHepParticle * p);
40  bool VirtualListExists (string listname);
41  void RemoveList (string listname);
42  void Clear (void);
43  GHepVirtualList * VirtualList (string listname);
44 
45 private:
46 
48  GHepVirtualListFolder(const GHepVirtualListFolder & config_pool);
49  virtual ~GHepVirtualListFolder();
50 
52 
53  map<string, GHepVirtualList *> fVirtualListMap;
54 
55  void AddVirtualList(string listname);
56 
57  struct Cleaner {
63  }
64  }
65  };
66  friend struct Cleaner;
67 };
68 
69 } // genie namespace
70 
71 #endif // _GHEP_VIRTUAL_LIST_FOLDER_H_
THE MAIN GENIE PROJECT NAMESPACE
Definition: GeneratorBase.h:8
const char * p
Definition: xmltok.h:285
bool VirtualListExists(string listname)
A GHepVirtualList is a &#39;virtual&#39; collection of GHepParticles. Is virtual because it does not own but ...
A singleton class to manage all named GHepVirtualLists.
static GHepVirtualListFolder * fInstance
static GHepVirtualListFolder * Instance(void)
map< string, GHepVirtualList * > fVirtualListMap
void AddToVirtualList(string listname, GHepParticle *p)
STDHEP-like event record entry that can fit a particle or a nucleus.
Definition: GHepParticle.h:40
GHepVirtualList * VirtualList(string listname)
enum BeamMode string