BOSS
7.1.1
BESIII Offline Software System
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Functions
a
c
d
e
f
g
i
l
m
n
o
p
r
s
t
u
v
w
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
v
w
x
z
Typedefs
c
d
e
g
h
i
l
m
n
o
p
r
s
t
Enumerations
Enumerator
a
b
c
d
e
f
i
k
l
m
n
o
p
r
s
t
u
w
x
z
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
m
n
p
r
s
t
v
w
Enumerations
b
c
d
e
f
g
h
i
k
l
m
n
p
r
s
t
v
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Related Symbols
:
a
b
c
d
e
f
g
i
k
l
m
n
o
p
r
s
t
v
w
x
Files
File List
File Members
All
!
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
!
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
Variables
!
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
h
i
j
k
l
m
n
p
r
s
t
u
v
w
z
Enumerations
Enumerator
a
b
c
d
e
f
g
h
i
k
m
n
o
p
r
s
t
u
w
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
▼
BOSS
Used Packages
Requirements
►
How to use the ERS package
Todo List
►
Namespaces
►
Classes
▼
Files
▼
File List
▼
7.1.1
►
Analysis
►
BesCxxPolicy
►
BesExamples
►
BesPolicy
►
Calibration
►
Control
►
Database
►
DetectorDescription
►
DistBoss
►
DQA
►
Emc
►
Event
►
EventDisplay
►
EventFilter
►
EvtPreSelect
►
External
▼
Generator
►
Babayaga
►
BabayagaNLO
►
BesBdkRc
►
BesEvtGen
►
BesGenInterface
►
BesGenModule
►
BesTwogam
►
Bhlumi
►
Bhwide
►
CosmicGenerator
►
Eepipi
►
EeTo4e
►
EeToeeV
►
Ekhara
▼
GenAnalysisTools
▼
TruthExamples
▼
TruthExamples-00-01-00
▼
src
DumpMC.cxx
HistSample.cxx
►
TruthDemo.cxx
►
TruthExamples
►
TruthHelper
►
GeneratorModule
►
GeneratorObject
►
GeneratorUtil
►
KKMC
►
McEventSelector
►
Mcgpj
►
Phokhara
►
SingleParticleGun
►
InstallArea
►
LumTauAlg
►
MagneticField
►
Mdc
►
Muc
►
OfflineEvtFilter
►
Reconstruction
►
RootPolicy
►
Simulation
►
Tof
►
Trigger
►
Utilities
►
Validation
►
File Members
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
Loading...
Searching...
No Matches
DumpMC.cxx
Go to the documentation of this file.
1
#include "
TruthExamples/DumpMC.h
"
2
#include "
GeneratorModule/GeneratorName.h
"
3
// #include "GeneratorObject/McEventCollection.h"
4
#include "GaudiKernel/MsgStream.h"
5
#include "GaudiKernel/DataSvc.h"
6
7
// #include "StoreGate/StoreGateSvc.h"
8
9
DumpMC::DumpMC
(
const
std::string& name, ISvcLocator* pSvcLocator) :
10
Algorithm(name, pSvcLocator)
11
{}
9
DumpMC::DumpMC
(
const
std::string& name, ISvcLocator* pSvcLocator) : {
…
}
12
13
StatusCode
DumpMC::initialize
(){
14
15
MsgStream log(messageService(), name());
16
log << MSG::INFO <<
">>> DumpMC from Initialize"
<< endreq;
17
std::cout <<
"----- DumpMC World From initialize"
<< std::endl;
18
19
/*
20
StatusCode sc = service("StoreGateSvc", m_sgSvc);
21
if (sc.isFailure()) {
22
log << MSG::ERROR << "Could not find StoreGateSvc" << endreq;
23
return sc;
24
}
25
*/
26
27
// Initialization terminated
28
return
StatusCode::SUCCESS;
29
}
13
StatusCode
DumpMC::initialize
() {
…
}
30
StatusCode
DumpMC::execute
() {
31
32
MsgStream log(messageService(), name());
33
log << MSG::INFO <<
">>> DumpMC from execute"
<< endreq;
34
std::cout <<
"----- DumpMC World From execute"
<< std::endl;
35
36
// Read Data from Transient Store
37
// SmartDataPtr<McEventCollection> mcCollptr(eventDataService(),
38
// "/Event/McEventCollection");
39
// if(!mcCollptr) {
40
// std::cout << " No McCollptr" << std::endl;
41
// }
42
// else {
43
// std::cout << " ---- Begin Iterating Over McEventCollection --- " << std::endl;
44
// McEventCollection::iterator it;
45
// for(it=mcCollptr->begin(); it!=mcCollptr->end(); it++) {
46
// std::cout << "Next event in the bag" << std::endl;
47
// std::cout << " Generator: " << (*it)->generatorName() << std::endl;
48
// (*it)->pGenEvt()->print();
49
// }
50
// }
51
52
/*
53
const McEventCollection* mcCollptr;
54
if ( m_sgSvc->retrieve(mcCollptr).isFailure() ) {
55
log << MSG::ERROR << "Could not retrieve McEventCollection"
56
<< endreq;
57
return StatusCode::FAILURE;
58
}
59
60
// Loop over all events in McEventCollection
61
McEventCollection::const_iterator itr;
62
for (itr = mcCollptr->begin(); itr!=mcCollptr->end(); ++itr) {
63
std::cout << "Next event in the bag" << std::endl;
64
int g_id = (*itr)->signal_process_id();
65
GeneratorName_print(g_id);
66
std::cout << std::endl;
67
(*itr)->print();
68
}
69
*/
70
71
// End of execution for each event
72
return
StatusCode::SUCCESS;
73
}
30
StatusCode
DumpMC::execute
() {
…
}
74
StatusCode
DumpMC::finalize
() {
75
76
MsgStream log(messageService(), name());
77
log << MSG::INFO <<
">>> DumpMC from finalize"
<< endreq;
78
std::cout <<
"----- DumpMC World From finalize"
<< std::endl;
79
80
// End of finalization step
81
return
StatusCode::SUCCESS;
82
}
74
StatusCode
DumpMC::finalize
() {
…
}
83
DumpMC.h
GeneratorName.h
DumpMC::initialize
StatusCode initialize()
Definition
DumpMC.cxx:13
DumpMC::execute
StatusCode execute()
Definition
DumpMC.cxx:30
DumpMC::finalize
StatusCode finalize()
Definition
DumpMC.cxx:74
DumpMC::DumpMC
DumpMC(const std::string &name, ISvcLocator *pSvcLocator)
Definition
DumpMC.cxx:9
7.1.1
Generator
GenAnalysisTools
TruthExamples
TruthExamples-00-01-00
src
DumpMC.cxx
Generated by
1.12.0