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 <constantinos.andreopoulos \at cern.ch>
9  University of Liverpool & STFC Rutherford Appleton Laboratory
10 
11 \created July 16, 2005
12 
13 \cpright Copyright (c) 2003-2020, The GENIE Collaboration
14  For the full text of the license visit http://copyright.genie-mc.org
15 */
16 //____________________________________________________________________________
17 
18 #ifndef _GHEP_VIRTUAL_LIST_FOLDER_H_
19 #define _GHEP_VIRTUAL_LIST_FOLDER_H_
20 
21 #include <map>
22 #include <string>
23 
24 using std::map;
25 using std::string;
26 
27 namespace genie {
28 
29 class GHepParticle;
30 class GHepVirtualList;
31 
33 {
34 public:
35 
36  static GHepVirtualListFolder * Instance(void);
37 
38  void AddToVirtualList (string listname, GHepParticle * p);
39  bool VirtualListExists (string listname);
40  void RemoveList (string listname);
41  void Clear (void);
42  GHepVirtualList * VirtualList (string listname);
43 
44 private:
45 
47  GHepVirtualListFolder(const GHepVirtualListFolder & config_pool);
48  virtual ~GHepVirtualListFolder();
49 
51 
52  map<string, GHepVirtualList *> fVirtualListMap;
53 
54  void AddVirtualList(string listname);
55 
56  struct Cleaner {
62  }
63  }
64  };
65  friend struct Cleaner;
66 };
67 
68 } // genie namespace
69 
70 #endif // _GHEP_VIRTUAL_LIST_FOLDER_H_
THE MAIN GENIE PROJECT NAMESPACE
Definition: AlgCmp.h:25
std::string string
Definition: nybbler.cc:12
bool VirtualListExists(string listname)
A GHepVirtualList is a &#39;virtual&#39; collection of GHepParticles. Is virtual because it does not own but ...
p
Definition: test.py:223
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:39
GHepVirtualList * VirtualList(string listname)