CGEM BOSS 6.6.5.f
BESIII Offline Software System
Loading...
Searching...
No Matches
DumpMC Class Reference

#include <DumpMC.h>

+ Inheritance diagram for DumpMC:

Public Member Functions

 DumpMC (const std::string &name, ISvcLocator *pSvcLocator)
 
StatusCode initialize ()
 
StatusCode execute ()
 
StatusCode finalize ()
 
 DumpMC (const std::string &name, ISvcLocator *pSvcLocator)
 
StatusCode initialize ()
 
StatusCode execute ()
 
StatusCode finalize ()
 

Detailed Description

Constructor & Destructor Documentation

◆ DumpMC() [1/2]

DumpMC::DumpMC ( const std::string &  name,
ISvcLocator *  pSvcLocator 
)

Definition at line 9 of file DumpMC.cxx.

9 :
10 Algorithm(name, pSvcLocator)
11{}

◆ DumpMC() [2/2]

DumpMC::DumpMC ( const std::string &  name,
ISvcLocator *  pSvcLocator 
)

Member Function Documentation

◆ execute() [1/2]

StatusCode DumpMC::execute ( )

Definition at line 30 of file DumpMC.cxx.

30 {
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}

◆ execute() [2/2]

StatusCode DumpMC::execute ( )

◆ finalize() [1/2]

StatusCode DumpMC::finalize ( )

Definition at line 74 of file DumpMC.cxx.

74 {
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}

◆ finalize() [2/2]

StatusCode DumpMC::finalize ( )

◆ initialize() [1/2]

StatusCode DumpMC::initialize ( )

Definition at line 13 of file DumpMC.cxx.

13 {
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}

◆ initialize() [2/2]

StatusCode DumpMC::initialize ( )

The documentation for this class was generated from the following files: