Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

T0Dummy Class Reference

#include <T0Dummy.h>

List of all members.

Public Member Functions

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


Constructor & Destructor Documentation

T0Dummy::T0Dummy const std::string &  name,
ISvcLocator *  pSvcLocator
 

00019                                                                :
00020   Algorithm(name, pSvcLocator)
00021 {
00022 
00023 }

T0Dummy::T0Dummy const std::string &  name,
ISvcLocator *  pSvcLocator
 


Member Function Documentation

StatusCode T0Dummy::execute  ) 
 

StatusCode T0Dummy::execute  ) 
 

00033                             {
00034 
00035   MsgStream log(msgSvc(), name());
00036   log << MSG::INFO << "in execute()" << endreq;
00037 
00038   // Part 1: Get the event header, print out event and run number
00039   SmartDataPtr<Event::EventHeader> eventHeader(eventSvc(),"/Event/EventHeader");
00040   if (!eventHeader) {
00041     log << MSG::FATAL << "Could not find Event Header" << endreq;
00042     return StatusCode::FAILURE;
00043   }
00044 
00045   int eventNo=eventHeader->eventNumber();
00046   int runNo=eventHeader->runNumber();
00047 
00048 
00049   if(runNo>0){
00050     log<<MSG::FATAL<<" Run No:"<<runNo<<" > 0"<<endreq;
00051     return StatusCode::FAILURE;
00052   }
00053 
00054   SmartDataPtr<Event::McParticleCol> mcParticleCol(eventSvc(),"/Event/MC/McParticleCol");
00055   if(!mcParticleCol){
00056     log<<MSG::FATAL<<"Could not retrieve McParticelCol"<<endreq;
00057     return StatusCode::FAILURE;
00058   }
00059 
00060   double mcTestime=-999.;
00061   Event::McParticleCol::iterator iter_mc = mcParticleCol->begin();
00062   for (;iter_mc != mcParticleCol->end(); iter_mc++){
00063     if((*iter_mc)->primaryParticle()){
00064       mcTestime=(*iter_mc)->initialPosition().t();
00065     }
00066   }
00067 
00068   //clear RecEsTimeCol
00069   IDataManagerSvc *dataManSvc = dynamic_cast<IDataManagerSvc*> (eventSvc());
00070   DataObject *aRecEsTime;
00071   eventSvc()->findObject("/Event/Recon/RecEsTimeCol",aRecEsTime);
00072   if(aRecEsTime!=NULL){
00073     dataManSvc->clearSubTree("/Event/Recon/RecEsTimeCol");
00074     eventSvc()->unregisterObject("/Event/Recon/RecEsTimeCol");
00075   }
00076 
00077   // register event start time to TDS
00078   RecEsTimeCol *aRecEsTimeCol = new RecEsTimeCol;
00079   StatusCode sc = eventSvc()->registerObject("/Event/Recon/RecEsTimeCol", aRecEsTimeCol);
00080   if(sc!=StatusCode::SUCCESS) {
00081     log << MSG::ERROR << "Could not register RecEsTimeCol" << endreq;
00082     return StatusCode::FAILURE;
00083   }
00084 
00085   RecEsTime *arecestime = new RecEsTime;
00086   arecestime->setTest(mcTestime);
00087   arecestime->setStat(-999);
00088 
00089   //std::cout<< " T0Dummy: "<< mcTestime<< std::endl;
00090   aRecEsTimeCol->push_back(arecestime);
00091 
00092   return StatusCode::SUCCESS;
00093 }

StatusCode T0Dummy::finalize  ) 
 

StatusCode T0Dummy::finalize  ) 
 

00095                              {
00096 
00097   MsgStream log(msgSvc(), name());
00098   log << MSG::INFO << "in finalize()" << endreq;
00099 
00100   return StatusCode::SUCCESS;
00101 
00102 }

StatusCode T0Dummy::initialize  ) 
 

StatusCode T0Dummy::initialize  ) 
 

00025                               {
00026 
00027   MsgStream log(msgSvc(), name());
00028   log << MSG::INFO << "in initialize()" << endreq;
00029 
00030   return StatusCode::SUCCESS;
00031 }


The documentation for this class was generated from the following files:
Generated on Wed Feb 2 18:50:14 2011 for BOSS6.5.5 by  doxygen 1.3.9.1