Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DApplication Class Reference

#include <DApplication.h>

+ Inheritance diagram for DApplication:

Public Member Functions

 DApplication (int narg, char *argv[])
 The DApplication class extends the JApplication class by adding the default event source generators and factory generators that are HAll-D specific. More...
 
virtual ~DApplication ()
 
virtual const char * className (void)
 
jerror_t Init (void)
 
DMagneticFieldMapGetBfield (unsigned int run_number=1)
 
DLorentzDeflectionsGetLorentzDeflections (unsigned int run_number=1)
 
DGeometryGetDGeometry (unsigned int run_number)
 
DRootGeomGetRootGeom (unsigned int run_number)
 
void CopySQLiteToLocalDisk (void)
 
DDIRCLutReaderGetDIRCLut (unsigned int run_number)
 
pthread_rwlock_t * GetReadWriteLock (string &name)
 
pthread_rwlock_t * GetRootReadWriteLock ()
 
pthread_rwlock_t * GetRootFillLock (JEventProcessor *proc)
 

Static Public Member Functions

static const char * static_className (void)
 

Protected Attributes

DMagneticFieldMapbfield
 
DLorentzDeflectionslorentz_def
 
JEventSourceGenerator * event_source_generator
 
JFactoryGenerator * factory_generator
 
DRootGeomRootGeom
 
vector< DGeometry * > geometries
 
DDIRCLutReaderdircLut
 
pthread_mutex_t mutex
 

Detailed Description

Definition at line 33 of file DApplication.h.

Constructor & Destructor Documentation

DApplication::DApplication ( int  narg,
char *  argv[] 
)

The DApplication class extends the JApplication class by adding the default event source generators and factory generators that are HAll-D specific.

Add DEventSourceHDDMGenerator and DFactoryGenerator, which adds the default list of Hall-D factories

Definition at line 43 of file DApplication.cc.

References bfield, CopySQLiteToLocalDisk(), dircLut, event_source_generator, factory_generator, Init(), lorentz_def, mutex, and RootGeom.

DApplication::~DApplication ( )
virtual

Definition at line 196 of file DApplication.cc.

References bfield, geometries, and lorentz_def.

Member Function Documentation

virtual const char* DApplication::className ( void  )
inlinevirtual

Definition at line 42 of file DApplication.h.

void DApplication::CopySQLiteToLocalDisk ( void  )

Definition at line 431 of file DApplication.cc.

Referenced by DApplication().

DGeometry * DApplication::GetDGeometry ( unsigned int  run_number)

Get the DGeometry object for the specified run number. The DGeometry class is Hall-D specific. It uses the JGeometry class from JANA to access values in the HDDS XML files. However, it supplies some useful and more user friendly methods for getting at some of the values.

This will first look for the DGeometry object in a list kept internal to DApplication and return a pointer to the object if found there. If it is not found there, then a new DGeometry object will be created and added to the internal list before returning a pointer to it.

Note that since this method can change internal data members, a mutex is locked to ensure integrity. This means that it is NOT efficient to call this method for every event. The pointer should be obtained in a brun() method and kept in a local variable if needed outside of brun().

Definition at line 219 of file DApplication.cc.

References _DBG_, DGeometry::className(), geometries, and string.

Referenced by DBCALShower_factory_CURVATURE::brun(), JEventProcessor_BCAL_TDC_Timing::brun(), DFDCIntersection_factory::brun(), DBeamPhoton_factory_TRUTH::brun(), DTrackTimeBased_factory_StraightLine::brun(), JEventProcessor_dumpcandidates::brun(), DTOFGeometry_factory::brun(), DFCALCluster_factory::brun(), JEventProcessor_FCALpedestals::brun(), JEventProcessor_CCAL_online::brun(), JEventProcessor_FCAL_online::brun(), DCCALShower_factory::brun(), DBCALCluster_factory_SINGLE::brun(), DCDCTrackHit_factory::brun(), DTrackTimeBased_factory_THROWN::brun(), DTrackWireBased_factory_THROWN::brun(), JEventProcessor_BCAL_attenlength_gainratio::brun(), DBCALCluster_factory::brun(), DFCALShower_factory::brun(), DEventProcessor_coherent_peak_skim::brun(), DNeutralShower_factory::brun(), DVertex_factory::brun(), DBCALShower_factory_IU::brun(), JEventProcessor_FCAL_invmass::brun(), JEventProcessor_FCALgains::brun(), DTrackTimeBased_factory::brun(), DEventProcessor_fdc_covariance_hists::brun(), DBeamPhoton_factory::brun(), DBCALShower_factory_KLOE::brun(), JEventProcessor_FCAL_TimingOffsets::brun(), JEventProcessor_FDC_Efficiency::brun(), JEventProcessor_CDC_Efficiency::brun(), JEventProcessor_FDCProjectionResiduals::brun(), DMCThrownMatching_factory::brun(), JEventProcessor_BCAL_Hadronic_Eff::brun(), DTrackCandidate_factory_FDCCathodes::brun(), JEventProcessor_ST_online_Tresolution::brun(), JEventProcessor_ST_Propagation_Time::brun(), JEventProcessor_ST_Tresolution::brun(), DBCALPoint_factory::brun(), DNeutralParticleHypothesis_factory::brun(), DTrackWireBased_factory::brun(), DSCHit_factory::brun(), DTrackCandidate_factory::brun(), DFDCPseudo_factory::brun(), DEventRFBunch_factory_Calibrations::brun(), DEventProcessor_trackeff_hists2::brun(), DEventRFBunch_factory_CalorimeterOnly::brun(), DEventProcessor_pid_dirc::brun(), JEventProcessor_ST_online_efficiency::brun(), DFDCSegment_factory::brun(), DEventRFBunch_factory::brun(), JEventProcessor_ST_ZEff::brun(), DEventProcessor_fdc_hists::brun(), DTrackCandidate_factory_CDC::brun(), DEventProcessor_dc_alignment::brun(), DCDCHit_factory_Calib::CalcNstraws(), DAnalysisUtilities::DAnalysisUtilities(), DMagneticFieldMapPS2DMap::DMagneticFieldMapPS2DMap(), DAnalysis::DParticleComboCreator::DParticleComboCreator(), DParticleID::DParticleID(), DAnalysis::DSourceComboer::DSourceComboer(), DAnalysis::DSourceComboTimeHandler::DSourceComboTimeHandler(), DAnalysis::DSourceComboVertexer::DSourceComboVertexer(), DTrackFitter::DTrackFitter(), DTrackFitterStraightTrack::DTrackFitterStraightTrack(), JEventProcessor_FCAL_TimingOffsets::evnt(), DEventSourceEVIO::GetObjects(), DEventSourceREST::GetObjects(), DEventSourceHDDM::GetObjects(), hdv_mainframe::hdv_mainframe(), DEventWriterROOT::Initialize(), DHistogramAction_ParticleComboGenReconComparison::Initialize(), DBCALGeometry::Initialize(), DHistogramAction_Reconstruction::Initialize(), DHistogramAction_ParticleComboKinematics::Initialize(), DHistogramAction_GenReconTrackComparison::Initialize(), DHistogramAction_Neutrals::Initialize(), DHistogramAction_DetectorMatchParams::Initialize(), and main().

DDIRCLutReader * DApplication::GetDIRCLut ( unsigned int  run_number)

Definition at line 514 of file DApplication.cc.

References dircLut, and mutex.

Referenced by DDIRCLut::brun().

DLorentzDeflections * DApplication::GetLorentzDeflections ( unsigned int  run_number = 1)
pthread_rwlock_t* DApplication::GetReadWriteLock ( string name)
inline

Definition at line 54 of file DApplication.h.

pthread_rwlock_t* DApplication::GetRootFillLock ( JEventProcessor *  proc)
inline

Definition at line 60 of file DApplication.h.

pthread_rwlock_t* DApplication::GetRootReadWriteLock ( )
inline

Definition at line 57 of file DApplication.h.

jerror_t DApplication::Init ( void  )
static const char* DApplication::static_className ( void  )
inlinestatic

Definition at line 43 of file DApplication.h.

Member Data Documentation

DMagneticFieldMap* DApplication::bfield
protected

Definition at line 66 of file DApplication.h.

Referenced by DApplication(), GetBfield(), and ~DApplication().

DDIRCLutReader* DApplication::dircLut
protected

Definition at line 72 of file DApplication.h.

Referenced by DApplication(), and GetDIRCLut().

JEventSourceGenerator* DApplication::event_source_generator
protected

Definition at line 68 of file DApplication.h.

Referenced by DApplication().

JFactoryGenerator* DApplication::factory_generator
protected

Definition at line 69 of file DApplication.h.

Referenced by DApplication().

vector<DGeometry*> DApplication::geometries
protected

Definition at line 71 of file DApplication.h.

Referenced by GetDGeometry(), and ~DApplication().

DLorentzDeflections* DApplication::lorentz_def
protected

Definition at line 67 of file DApplication.h.

Referenced by DApplication(), GetLorentzDeflections(), and ~DApplication().

pthread_mutex_t DApplication::mutex
protected
DRootGeom* DApplication::RootGeom
protected

Definition at line 70 of file DApplication.h.

Referenced by DApplication(), and GetRootGeom().


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