RawDataProviderSvc Class Reference

#include <RawDataProviderSvc.h>

Inheritance diagram for RawDataProviderSvc:

IRawDataProviderSvc List of all members.

Public Member Functions

 RawDataProviderSvc (const std::string &name, ISvcLocator *svcloc)
 ~RawDataProviderSvc ()
virtual StatusCode initialize ()
virtual StatusCode finalize ()
virtual StatusCode queryInterface (const InterfaceID &riid, void **ppvInterface)
void handle (const Incident &)
MdcDigiVecgetMdcDigiVec (uint32_t control=0)
TofDataMaptofDataMapOnlineMode (uint32_t control=1)
TofDataVectortofDataVectorOnlineMode (uint32_t control=1)
TofDataMaptofDataMapEstime ()
TofDataVectortofDataVectorEstime ()
TofDataMaptofDataMapTof (double estime=0.0)
TofDataVectortofDataVectorTof (double estime=0.0)
TofDataMaptofDataMapEmc (double estime=0.0)
TofDataVectortofDataVectorEmc (double estime=0.0)
EmcDigiColgetEmcDigiVec (uint32_t control)
MdcRawDataProvidergetMdcProvider ()
TofRawDataProvidergetTofProvider ()
EmcRawDataProvidergetEmcProvider ()
bool isOnlineMode ()

Static Public Member Functions

static const InterfaceID & interfaceID ()

Private Attributes

MdcRawDataProviderm_mdcProvider
TofRawDataProviderm_tofProvider
EmcRawDataProviderm_emcProvider
std::vector< int > m_skipLayers
float m_effThreshold
float m_elow
uint32_t m_tlow
uint32_t m_thigh
std::vector< uint32_t > m_hotVec
std::vector< uint32_t > m_deadVec
bool m_onlineMode

Detailed Description

Definition at line 16 of file RawDataProviderSvc.h.


Constructor & Destructor Documentation

RawDataProviderSvc::RawDataProviderSvc ( const std::string name,
ISvcLocator *  svcloc 
)

RawDataProviderSvc::~RawDataProviderSvc (  ) 

Definition at line 43 of file RawDataProviderSvc.cxx.

References m_emcProvider, m_mdcProvider, and m_tofProvider.

00043                                         {
00044   if(m_mdcProvider) delete m_mdcProvider;
00045   if(m_tofProvider) delete m_tofProvider;
00046   if(m_emcProvider) delete m_emcProvider;
00047 }


Member Function Documentation

StatusCode RawDataProviderSvc::finalize (  )  [virtual]

Definition at line 92 of file RawDataProviderSvc.cxx.

References Bes_Common::INFO.

00092                                        {
00093      MsgStream log(messageService(), name());
00094      log << MSG::INFO << "RawDataProviderSvc::finalize()" << endreq;
00095 
00096      return StatusCode::SUCCESS;
00097 }

EmcDigiCol& RawDataProviderSvc::getEmcDigiVec ( uint32_t  control  )  [inline, virtual]

Implements IRawDataProviderSvc.

Definition at line 40 of file RawDataProviderSvc.h.

References EmcRawDataProvider::getEmcDigiVec(), and m_emcProvider.

00040 {return m_emcProvider->getEmcDigiVec(control); }

EmcRawDataProvider* RawDataProviderSvc::getEmcProvider (  )  [inline, virtual]

Implements IRawDataProviderSvc.

Definition at line 44 of file RawDataProviderSvc.h.

References m_emcProvider.

00044 { return m_emcProvider; }

MdcDigiVec& RawDataProviderSvc::getMdcDigiVec ( uint32_t  control = 0  )  [inline, virtual]

Implements IRawDataProviderSvc.

Definition at line 29 of file RawDataProviderSvc.h.

References MdcRawDataProvider::getMdcDigiVec(), and m_mdcProvider.

Referenced by MdcHoughFinder::digiToHots(), MdcHoughFinder::digiToHots2(), MdcTrkRecon::dumpDigi(), TrkReco::execute(), MdcxTrackFinder::execute(), MdcxCosmicSewer::execute(), MdcMakeHits::execute(), MdcHoughFinder::execute(), HoughValidUpdate::execute(), MdcTrkRecon::fillEvent(), MdcNavigation::fillEvent(), MdcNavigation::fillInit(), MdcTrkRecon::fillMcTruth(), MdcNavigation::fillRecTrack(), TTrackManager::makeTds(), MdcxCosmicSewer::MdcxHitsToHots(), MdcPrintSvc::printDigi(), and MdcPrintSvc::printRecMdcTrack().

00029 { return m_mdcProvider->getMdcDigiVec(control); }

MdcRawDataProvider* RawDataProviderSvc::getMdcProvider (  )  [inline, virtual]

Implements IRawDataProviderSvc.

Definition at line 42 of file RawDataProviderSvc.h.

References m_mdcProvider.

00042 { return m_mdcProvider; }

TofRawDataProvider* RawDataProviderSvc::getTofProvider (  )  [inline, virtual]

Implements IRawDataProviderSvc.

Definition at line 43 of file RawDataProviderSvc.h.

References m_tofProvider.

00043 { return m_tofProvider; }

void RawDataProviderSvc::handle ( const Incident &   ) 

Definition at line 110 of file RawDataProviderSvc.cxx.

References Bes_Common::DEBUG, MdcRawDataProvider::handle(), EmcRawDataProvider::handle(), TofRawDataProvider::handle(), m_emcProvider, m_mdcProvider, and m_tofProvider.

00110                                                   {
00111   MsgStream log( messageService(), name() );
00112   log << MSG::DEBUG << "handle: " << inc.type() << endreq;
00113   if ( inc.type() == "BeginEvent" ){
00114     log << MSG::DEBUG << "Begin Event" << endreq;
00115     m_tofProvider->handle( inc );
00116     m_emcProvider->handle( inc );
00117     m_mdcProvider->handle( inc );
00118   } 
00119 }

StatusCode RawDataProviderSvc::initialize (  )  [virtual]

Definition at line 50 of file RawDataProviderSvc.cxx.

References RawDataUtil::EmcChargeChannel(), Bes_Common::INFO, EmcRawDataProvider::initialize(), TofRawDataProvider::initialize(), MdcRawDataProvider::initialize(), m_deadVec, m_effThreshold, m_elow, m_emcProvider, m_hotVec, m_mdcProvider, m_onlineMode, m_skipLayers, m_thigh, m_tlow, m_tofProvider, MdcRawDataProvider::setEffThreshold(), EmcRawDataProvider::setELowThreshold(), EmcRawDataProvider::setHotCrystals(), MdcRawDataProvider::setSkipLayers(), EmcRawDataProvider::setTHighThreshold(), EmcRawDataProvider::setTLowThreshold(), and deljobs::string.

00050                                          {
00051      MsgStream log(messageService(), name());
00052      log << MSG::INFO << "RawDataProviderSvc::initialize()" << endreq;
00053 
00054      StatusCode sc = Service::initialize();
00055      if( sc.isFailure() ) return sc;
00056 
00057   // tianhl for mt
00058   std::string incidentSvc_name("IncidentSvc");
00059   //if(isGaudiThreaded(name())){
00060   //   incidentSvc_name += getGaudiThreadIDfromName(name());
00061   //}
00062   // tianhl for mt
00063      IIncidentSvc* incsvc;
00064      sc = service(incidentSvc_name.c_str(), incsvc);
00065      int priority = 100;
00066      if( sc.isSuccess() ){
00067        incsvc -> addListener(this, "BeginEvent", priority);
00068      }
00069 
00070      sc = m_mdcProvider->initialize();
00071      if( sc.isFailure() ) return sc;
00072      
00073      
00074      sc = m_tofProvider->initialize(m_onlineMode);
00075      if( sc.isFailure() ) return sc;
00076 
00077      if( m_skipLayers.size()>0 ) m_mdcProvider->setSkipLayers( m_skipLayers ); 
00078      m_mdcProvider->setEffThreshold( m_effThreshold ); 
00079 
00080      if(m_elow>0) m_emcProvider->setELowThreshold(RawDataUtil::EmcChargeChannel(m_elow));
00081      if(m_tlow>0) m_emcProvider->setTLowThreshold(m_tlow);
00082      if(m_thigh>0&&m_thigh<60) m_emcProvider->setTHighThreshold(m_thigh);
00083      if(m_hotVec.size()>0)     m_emcProvider->setHotCrystals(m_hotVec);
00084      if(m_deadVec.size()>0)     m_emcProvider->setHotCrystals(m_deadVec);
00085      sc = m_emcProvider->initialize(m_onlineMode,serviceLocator());
00086      if( sc.isFailure() ) return sc;
00087 
00088      //log << MSG::INFO << "finish initializing..." << endreq;
00089      return StatusCode::SUCCESS;
00090 }

static const InterfaceID& IRawDataProviderSvc::interfaceID (  )  [inline, static, inherited]

Definition at line 19 of file IRawDataProviderSvc.h.

References IID_IRawDataProviderSvc().

Referenced by queryInterface().

00019 { return IID_IRawDataProviderSvc; };

bool RawDataProviderSvc::isOnlineMode (  )  [inline, virtual]

Implements IRawDataProviderSvc.

Definition at line 45 of file RawDataProviderSvc.h.

References m_onlineMode.

00045 { return m_onlineMode;  }

StatusCode RawDataProviderSvc::queryInterface ( const InterfaceID &  riid,
void **  ppvInterface 
) [virtual]

Definition at line 99 of file RawDataProviderSvc.cxx.

References IRawDataProviderSvc::interfaceID().

00100 {
00101   if ( IRawDataProviderSvc::interfaceID().versionMatch(riid) )    {
00102     *ppvInterface = (IRawDataProviderSvc*)this;
00103   }else{
00104     return Service::queryInterface(riid, ppvInterface);
00105   }
00106   addRef();
00107   return StatusCode::SUCCESS;
00108 }

TofDataMap& RawDataProviderSvc::tofDataMapEmc ( double  estime = 0.0  )  [inline, virtual]

Implements IRawDataProviderSvc.

Definition at line 37 of file RawDataProviderSvc.h.

References m_tofProvider, and TofRawDataProvider::tofDataMapEmc().

00037 { return m_tofProvider->tofDataMapEmc(estime); }

TofDataMap& RawDataProviderSvc::tofDataMapEstime (  )  [inline, virtual]

Implements IRawDataProviderSvc.

Definition at line 33 of file RawDataProviderSvc.h.

References m_tofProvider, and TofRawDataProvider::tofDataMapEstime().

00033 { return m_tofProvider->tofDataMapEstime(); }

TofDataMap& RawDataProviderSvc::tofDataMapOnlineMode ( uint32_t  control = 1  )  [inline, virtual]

Implements IRawDataProviderSvc.

Definition at line 31 of file RawDataProviderSvc.h.

References m_tofProvider, and TofRawDataProvider::tofDataMapOnlineMode().

00031 { return m_tofProvider->tofDataMapOnlineMode(control); }

TofDataMap& RawDataProviderSvc::tofDataMapTof ( double  estime = 0.0  )  [inline, virtual]

Implements IRawDataProviderSvc.

Definition at line 35 of file RawDataProviderSvc.h.

References m_tofProvider, and TofRawDataProvider::tofDataMapTof().

00035 { return m_tofProvider->tofDataMapTof(estime); }

TofDataVector& RawDataProviderSvc::tofDataVectorEmc ( double  estime = 0.0  )  [inline, virtual]

Implements IRawDataProviderSvc.

Definition at line 38 of file RawDataProviderSvc.h.

References m_tofProvider, and TofRawDataProvider::tofDataVectorEmc().

00038 { return m_tofProvider->tofDataVectorEmc(estime); }

TofDataVector& RawDataProviderSvc::tofDataVectorEstime (  )  [inline, virtual]

Implements IRawDataProviderSvc.

Definition at line 34 of file RawDataProviderSvc.h.

References m_tofProvider, and TofRawDataProvider::tofDataVectorEstime().

00034 { return m_tofProvider->tofDataVectorEstime(); }

TofDataVector& RawDataProviderSvc::tofDataVectorOnlineMode ( uint32_t  control = 1  )  [inline, virtual]

Implements IRawDataProviderSvc.

Definition at line 32 of file RawDataProviderSvc.h.

References m_tofProvider, and TofRawDataProvider::tofDataVectorOnlineMode().

00032 { return m_tofProvider->tofDataVectorOnlineMode(control); }

TofDataVector& RawDataProviderSvc::tofDataVectorTof ( double  estime = 0.0  )  [inline, virtual]

Implements IRawDataProviderSvc.

Definition at line 36 of file RawDataProviderSvc.h.

References m_tofProvider, and TofRawDataProvider::tofDataVectorTof().

00036 { return m_tofProvider->tofDataVectorTof(estime); }


Member Data Documentation

std::vector<uint32_t> RawDataProviderSvc::m_deadVec [private]

Definition at line 59 of file RawDataProviderSvc.h.

Referenced by initialize().

float RawDataProviderSvc::m_effThreshold [private]

Definition at line 54 of file RawDataProviderSvc.h.

Referenced by initialize().

float RawDataProviderSvc::m_elow [private]

Definition at line 55 of file RawDataProviderSvc.h.

Referenced by initialize().

EmcRawDataProvider* RawDataProviderSvc::m_emcProvider [private]

Definition at line 51 of file RawDataProviderSvc.h.

Referenced by getEmcDigiVec(), getEmcProvider(), handle(), initialize(), and ~RawDataProviderSvc().

std::vector<uint32_t> RawDataProviderSvc::m_hotVec [private]

Definition at line 58 of file RawDataProviderSvc.h.

Referenced by initialize().

MdcRawDataProvider* RawDataProviderSvc::m_mdcProvider [private]

Definition at line 49 of file RawDataProviderSvc.h.

Referenced by getMdcDigiVec(), getMdcProvider(), handle(), initialize(), and ~RawDataProviderSvc().

bool RawDataProviderSvc::m_onlineMode [private]

Definition at line 60 of file RawDataProviderSvc.h.

Referenced by initialize(), and isOnlineMode().

std::vector<int> RawDataProviderSvc::m_skipLayers [private]

Definition at line 53 of file RawDataProviderSvc.h.

Referenced by initialize().

uint32_t RawDataProviderSvc::m_thigh [private]

Definition at line 57 of file RawDataProviderSvc.h.

Referenced by initialize().

uint32_t RawDataProviderSvc::m_tlow [private]

Definition at line 56 of file RawDataProviderSvc.h.

Referenced by initialize().

TofRawDataProvider* RawDataProviderSvc::m_tofProvider [private]

Definition at line 50 of file RawDataProviderSvc.h.

Referenced by getTofProvider(), handle(), initialize(), tofDataMapEmc(), tofDataMapEstime(), tofDataMapOnlineMode(), tofDataMapTof(), tofDataVectorEmc(), tofDataVectorEstime(), tofDataVectorOnlineMode(), tofDataVectorTof(), and ~RawDataProviderSvc().


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