DumpMC Class Reference

#include <DumpMC.h>

List of all members.

Public Member Functions

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

Private Attributes

StoreGateSvc * m_sgSvc


Detailed Description

Definition at line 5 of file DumpMC.h.


Constructor & Destructor Documentation

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

Definition at line 9 of file DumpMC.cxx.

00009                                                               :
00010   Algorithm(name, pSvcLocator)
00011 {}


Member Function Documentation

StatusCode DumpMC::execute (  ) 

Definition at line 30 of file DumpMC.cxx.

References Bes_Common::INFO.

00030                            {
00031 
00032   MsgStream log(messageService(), name());
00033   log << MSG::INFO << ">>> DumpMC from execute" << endreq;
00034   std::cout << "----- DumpMC World From execute" << std::endl;
00035   
00036   // Read Data from Transient Store
00037 //    SmartDataPtr<McEventCollection> mcCollptr(eventDataService(),
00038 //                                          "/Event/McEventCollection");
00039 //    if(!mcCollptr) {
00040 //      std::cout << " No McCollptr" << std::endl;
00041 //    }
00042 //    else {
00043 //      std::cout << " ---- Begin Iterating Over McEventCollection --- " << std::endl;
00044 //      McEventCollection::iterator it;
00045 //      for(it=mcCollptr->begin(); it!=mcCollptr->end(); it++) {
00046 //        std::cout << "Next event in the bag" << std::endl;
00047 //        std::cout << "     Generator: " << (*it)->generatorName() << std::endl;
00048 //        (*it)->pGenEvt()->print();
00049 //      }
00050 //    }
00051 
00052 /*
00053   const McEventCollection* mcCollptr;
00054   if ( m_sgSvc->retrieve(mcCollptr).isFailure() ) {
00055     log << MSG::ERROR << "Could not retrieve McEventCollection"
00056         << endreq;
00057     return StatusCode::FAILURE;
00058   }
00059   
00060   // Loop over all events in McEventCollection
00061   McEventCollection::const_iterator itr;
00062   for (itr = mcCollptr->begin(); itr!=mcCollptr->end(); ++itr) {
00063     std::cout << "Next event in the bag" << std::endl;
00064     int g_id = (*itr)->signal_process_id();
00065     GeneratorName_print(g_id);
00066     std::cout << std::endl;
00067     (*itr)->print();
00068   }       
00069 */
00070   
00071   // End of execution for each event
00072   return StatusCode::SUCCESS;
00073 }

StatusCode DumpMC::finalize (  ) 

Definition at line 74 of file DumpMC.cxx.

References Bes_Common::INFO.

00074                             {
00075 
00076   MsgStream log(messageService(), name());
00077   log << MSG::INFO << ">>> DumpMC from finalize" << endreq;
00078   std::cout << "----- DumpMC World From finalize" << std::endl;
00079 
00080   // End of finalization step
00081         return StatusCode::SUCCESS;
00082 }

StatusCode DumpMC::initialize (  ) 

Definition at line 13 of file DumpMC.cxx.

References Bes_Common::INFO.

00013                              {
00014 
00015   MsgStream log(messageService(), name());
00016         log << MSG::INFO << ">>> DumpMC from Initialize" << endreq;
00017         std::cout << "----- DumpMC World From initialize" << std::endl;
00018 
00019         /*      
00020         StatusCode sc = service("StoreGateSvc", m_sgSvc);
00021         if (sc.isFailure()) {
00022           log << MSG::ERROR << "Could not find StoreGateSvc" << endreq;
00023           return sc;
00024         }
00025         */
00026 
00027   // Initialization terminated
00028         return StatusCode::SUCCESS;
00029 }


Member Data Documentation

StoreGateSvc* DumpMC::m_sgSvc [private]

Definition at line 13 of file DumpMC.h.


Generated on Tue Nov 29 23:18:36 2016 for BOSS_7.0.2 by  doxygen 1.4.7