MdcDummy Class Reference

#include <MdcDummy.h>

List of all members.

Public Member Functions

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

Private Attributes

int m_fittingMethod
std::string m_configFile


Detailed Description

Definition at line 4 of file MdcDummy.h.


Constructor & Destructor Documentation

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

Definition at line 28 of file MdcDummy.cxx.

References m_configFile, and m_fittingMethod.

00028                                                                   :
00029   Algorithm(name, pSvcLocator)
00030 {
00031   // Declare the properties  
00032   declareProperty("FittingMethod", m_fittingMethod = 2);
00033   declareProperty("ConfigFile",  m_configFile = "MDCConfig.xml");
00034 }


Member Function Documentation

StatusCode MdcDummy::execute (  ) 

Definition at line 47 of file MdcDummy.cxx.

References Bes_Common::FATAL, Bes_Common::INFO, msgSvc(), and delete_small_size::size.

00047                              {
00048 
00049   MsgStream log(msgSvc(), name());
00050   log << MSG::INFO << "in execute()" << endreq;
00051 
00052   // Part 1: Get the event header, print out event and run number
00053   int event, run;
00054   
00055   SmartDataPtr<Event::EventHeader> eventHeader(eventSvc(),"/Event/EventHeader");
00056   if (!eventHeader) {
00057     log << MSG::FATAL << "Could not find Event Header" << endreq;
00058     return( StatusCode::FAILURE);
00059   }
00060   log << MSG::INFO << "MdcDummy: retrieved event: " << eventHeader->eventNumber()  << "  run: " <<  eventHeader->runNumber() << endreq;
00061   
00062   int digiId;
00063 
00064   //Part 2: Retrieve MC truth 
00065   SmartDataPtr<DecayMode> decayMode(eventSvc(),"/Event/MC/DecayMode");
00066   if (!decayMode) {
00067     log << MSG::FATAL << "Could not find DecayMode" << endreq;
00068     return( StatusCode::FAILURE);
00069   }
00070   unsigned int size = 10;
00071   int decayId[10];
00072   decayMode->getData(decayId, size);
00073  
00074   for (unsigned int index =0; index<10; index++) {
00075     log << MSG::INFO 
00076         << " Decay Mode  = " << decayId[index]
00077         << endreq;   
00078   }
00079 
00080   //Part 3: Retrieve MDC digi 
00081   SmartDataPtr<MdcDigiCol> mdcDigiCol(eventSvc(),"/Event/Digi/MdcDigiCol");
00082   if (!mdcDigiCol) {
00083     log << MSG::FATAL << "Could not find MDC digi" << endreq;
00084     return( StatusCode::FAILURE);
00085   }
00086  
00087   MdcDigiCol::iterator iter1 = mdcDigiCol->begin();
00088   digiId = 0; 
00089   for (;iter1 != mdcDigiCol->end(); iter1++, digiId++) {
00090     log << MSG::INFO << "MDC digit No: " << digiId << endreq;
00091  
00092     log << MSG::INFO 
00093         << " time_channel = " << (*iter1)->getTimeChannel()
00094         << " charge_channel = " << (*iter1)->getChargeChannel() 
00095         << endreq;   
00096   }
00097  
00098  
00099   //Part 4: Retrieve TOF digi 
00100   SmartDataPtr<TofDigiCol> tofDigiCol(eventSvc(),"/Event/Digi/TofDigiCol");
00101   if (!tofDigiCol) {
00102     log << MSG::FATAL << "Could not find TOF digi" << endreq;
00103     return( StatusCode::FAILURE);
00104   }
00105  
00106   TofDigiCol::iterator iter2 = tofDigiCol->begin();
00107   digiId = 0; 
00108   for (;iter2 != tofDigiCol->end(); iter2++, digiId++) {
00109     log << MSG::INFO << "TOF digit No: " << digiId << endreq;
00110 
00111   }
00112   
00113   //Part 5: Retrieve EMC digi 
00114   SmartDataPtr<EmcDigiCol> emcDigiCol(eventSvc(),"/Event/Digi/EmcDigiCol");
00115   if (!emcDigiCol) {
00116     log << MSG::FATAL << "Could not find EMC digi" << endreq;
00117     return( StatusCode::FAILURE);
00118   }
00119  
00120   EmcDigiCol::iterator iter3 = emcDigiCol->begin();
00121   digiId = 0; 
00122   for (;iter3 != emcDigiCol->end(); iter3++, digiId++) {
00123     log << MSG::INFO << "Emc digit No: " << digiId << endreq;
00124  
00125     log << MSG::INFO 
00126         << " time_channel = " << (*iter3)->getTimeChannel()
00127         << " charge_channel = " << (*iter3)->getChargeChannel() 
00128         << endreq;   
00129   }
00130  
00131 
00132   return StatusCode::SUCCESS;
00133 }

StatusCode MdcDummy::finalize (  ) 

Definition at line 136 of file MdcDummy.cxx.

References Bes_Common::INFO, and msgSvc().

00136                               {
00137 
00138   MsgStream log(msgSvc(), name());
00139   log << MSG::INFO << "in finalize()" << endreq;
00140 
00141   return StatusCode::SUCCESS;
00142 }

StatusCode MdcDummy::initialize (  ) 

Definition at line 37 of file MdcDummy.cxx.

References Bes_Common::INFO, and msgSvc().

00037                                {
00038 
00039   MsgStream log(msgSvc(), name());
00040   log << MSG::INFO << "in initialize()" << endreq;
00041 
00042 
00043   return StatusCode::SUCCESS;
00044 }


Member Data Documentation

std::string MdcDummy::m_configFile [private]

Definition at line 13 of file MdcDummy.h.

Referenced by MdcDummy().

int MdcDummy::m_fittingMethod [private]

Definition at line 12 of file MdcDummy.h.

Referenced by MdcDummy().


Generated on Tue Nov 29 23:20:12 2016 for BOSS_7.0.2 by  doxygen 1.4.7