Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
Generator
src
Framework
EventGen
GEVGPool.cxx
Go to the documentation of this file.
1
//____________________________________________________________________________
2
/*
3
Copyright (c) 2003-2020, The GENIE Collaboration
4
For the full text of the license visit http://copyright.genie-mc.org
5
6
Costas Andreopoulos <constantinos.andreopoulos \at cern.ch>
7
University of Liverpool & STFC Rutherford Appleton Laboratory
8
*/
9
//____________________________________________________________________________
10
11
#include "
Framework/EventGen/GEVGDriver.h
"
12
#include "
Framework/EventGen/GEVGPool.h
"
13
#include "
Framework/Interaction/InitialState.h
"
14
#include "
Framework/Messenger/Messenger.h
"
15
16
using
std::endl
;
17
using namespace
genie
;
18
19
//____________________________________________________________________________
20
namespace
genie
{
21
ostream &
operator <<
(ostream &
stream
,
const
GEVGPool
& pool)
22
{
23
pool.
Print
(stream);
24
return
stream
;
25
}
26
}
27
//___________________________________________________________________________
28
GEVGPool::GEVGPool
() :
29
map<
string
,
GEVGDriver
*>()
30
{
31
32
}
33
//___________________________________________________________________________
34
GEVGPool::~GEVGPool
()
35
{
36
GEVGPool::const_iterator
giter;
37
for
(giter = this->
begin
(); giter != this->
end
(); ++giter) {
38
GEVGDriver
* driver = giter->second;
39
delete
driver;
40
driver = 0;
41
}
42
}
43
//___________________________________________________________________________
44
GEVGDriver
*
GEVGPool::FindDriver
(
const
InitialState
&
init
)
const
45
{
46
string
str_init = init.
AsString
();
47
48
return
this->
FindDriver
(str_init);
49
}
50
//___________________________________________________________________________
51
GEVGDriver
*
GEVGPool::FindDriver
(
string
init
)
const
52
{
53
GEVGDriver
* driver = 0;
54
55
if
( this->
count
(init) == 1 ) {
56
GEVGPool::const_iterator
giter = this->find(init);
57
driver = giter->second;
58
}
else
{
59
LOG
(
"GEVGPool"
,
pWARN
)
60
<<
"No GEVGDriver object for init-state: "
<< init <<
" in pool"
;
61
}
62
return
driver;
63
}
64
//___________________________________________________________________________
65
void
GEVGPool::Print
(ostream &
stream
)
const
66
{
67
stream <<
"\n GEVGDriver List:"
<<
endl
;
68
69
GEVGPool::const_iterator
giter;
70
71
for
(giter = this->
begin
(); giter != this->
end
(); ++giter) {
72
73
string
init_state = giter->first;
74
GEVGDriver
* driver = giter->second;
75
76
stream <<
"\n["
<< init_state <<
"]"
;
77
stream << *driver;
78
}
79
}
80
//___________________________________________________________________________
ValidateOpDetReco.end
end
while True: pbar.update(maxval-len(onlies[E][S])) #print iS, "/", len(onlies[E][S]) found = False for...
Definition:
ValidateOpDetReco.py:548
genie::GEVGPool::GEVGPool
GEVGPool()
Definition:
GEVGPool.cxx:28
genie
THE MAIN GENIE PROJECT NAMESPACE
Definition:
AlgCmp.h:25
string
std::string string
Definition:
nybbler.cc:12
genie::GEVGPool::~GEVGPool
~GEVGPool()
Definition:
GEVGPool.cxx:34
const_iterator
intermediate_table::const_iterator const_iterator
Definition:
intermediate_table.cc:28
train.init
init
Definition:
train.py:42
genie::GEVGPool::FindDriver
GEVGDriver * FindDriver(const InitialState &init) const
Definition:
GEVGPool.cxx:44
LOG
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition:
Messenger.h:96
genie::InitialState::AsString
string AsString(void) const
Definition:
InitialState.cxx:408
generate_datataset.stream
stream
Definition:
generate_datataset.py:30
genie::GEVGDriver
GENIE Event Generation Driver. A minimalist user interface object for generating neutrino interaction...
Definition:
GEVGDriver.h:54
Messenger.h
pWARN
#define pWARN
Definition:
Messenger.h:60
GEVGDriver.h
genie::GEVGPool::Print
void Print(ostream &stream) const
Definition:
GEVGPool.cxx:65
genie::operator<<
ostream & operator<<(ostream &stream, const AlgConfigPool &config_pool)
Definition:
AlgConfigPool.cxx:41
GEVGPool.h
InitialState.h
reco_momentum_tuples.count
int count
Definition:
reco_momentum_tuples.py:202
util::begin
decltype(auto) constexpr begin(T &&obj)
ADL-aware version of std::begin.
Definition:
StdUtils.h:72
endl
QTextStream & endl(QTextStream &s)
Definition:
qtextstream.cpp:2030
genie::InitialState
Initial State information.
Definition:
InitialState.h:48
genie::GEVGPool
A pool of GEVGDriver objects with an initial state key.
Definition:
GEVGPool.h:37
Generated by
1.8.11