Hall-D Software
alpha
|
Implements JEventSource for REST files. More...
#include <DEventSourceREST.h>
Public Member Functions | |
DEventSourceREST (const char *source_name) | |
virtual | ~DEventSourceREST () |
virtual const char * | className (void) |
jerror_t | GetEvent (JEvent &event) |
void | FreeEvent (JEvent &event) |
jerror_t | GetObjects (JEvent &event, JFactory_base *factory) |
jerror_t | Extract_DMCReaction (hddm_r::HDDM *record, JFactory< DMCReaction > *factory, JEventLoop *locEventLoop) |
jerror_t | Extract_DRFTime (hddm_r::HDDM *record, JFactory< DRFTime > *factory, JEventLoop *locEventLoop) |
jerror_t | Extract_DBeamPhoton (hddm_r::HDDM *record, JFactory< DBeamPhoton > *factory, JEventLoop *eventLoop) |
jerror_t | Extract_DMCThrown (hddm_r::HDDM *record, JFactory< DMCThrown > *factory) |
jerror_t | Extract_DSCHit (hddm_r::HDDM *record, JFactory< DSCHit > *factory) |
jerror_t | Extract_DTOFPoint (hddm_r::HDDM *record, JFactory< DTOFPoint > *factory) |
jerror_t | Extract_DFCALShower (hddm_r::HDDM *record, JFactory< DFCALShower > *factory) |
jerror_t | Extract_DBCALShower (hddm_r::HDDM *record, JFactory< DBCALShower > *factory) |
jerror_t | Extract_DTrackTimeBased (hddm_r::HDDM *record, JFactory< DTrackTimeBased > *factory, JEventLoop *locEventLoop) |
jerror_t | Extract_DTrigger (hddm_r::HDDM *record, JFactory< DTrigger > *factory) |
jerror_t | Extract_DDetectorMatches (JEventLoop *locEventLoop, hddm_r::HDDM *record, JFactory< DDetectorMatches > *factory) |
jerror_t | Extract_DDIRCPmtHit (hddm_r::HDDM *record, JFactory< DDIRCPmtHit > *factory, JEventLoop *locEventLoop) |
void | Get7x7ErrorMatrix (double mass, const double vec[5], const TMatrixFSym *C5x5, TMatrixFSym *loc7x7ErrorMatrix) |
Static Public Member Functions | |
static const char * | static_className (void) |
Private Types | |
enum | dirc_status_state { GOOD, BAD, NOISY } |
Private Member Functions | |
uint32_t | Convert_SignedIntToUnsigned (int32_t locSignedInt) const |
Private Attributes | |
bool | USE_CCDB_BCAL_COVARIANCE |
bool | USE_CCDB_FCAL_COVARIANCE |
bool | PRUNE_DUPLICATE_TRACKS |
bool | RECO_DIRC_CALC_LUT |
int | dDIRCMaxChannels |
map< unsigned int, vector < vector< int > > > | dDIRCChannelStatusMap |
DFCALShower_factory * | dFCALShowerFactory |
DBCALShower_factory_IU * | dBCALShowerFactory |
map< unsigned int, double > | dTargetCenterZMap |
map< unsigned int, double > | dBeamBunchPeriodMap |
std::ifstream * | ifs |
hddm_r::istream * | fin |
Static Private Attributes | |
static thread_local shared_ptr < DResourcePool< TMatrixFSym > > | dResourcePool_TMatrixFSym = std::make_shared<DResourcePool<TMatrixFSym>>(10, 10, 50) |
Implements JEventSource for REST files.
Definition at line 47 of file DEventSourceREST.h.
|
private |
Enumerator | |
---|---|
GOOD | |
BAD | |
NOISY |
Definition at line 106 of file DEventSourceREST.h.
DEventSourceREST::DEventSourceREST | ( | const char * | source_name | ) |
Constructor for DEventSourceREST object
Definition at line 24 of file DEventSourceREST.cc.
References dDIRCMaxChannels, fin, ifs, PRUNE_DUPLICATE_TRACKS, and RECO_DIRC_CALC_LUT.
|
virtual |
Definition at line 53 of file DEventSourceREST.cc.
|
inlinevirtual |
Definition at line 52 of file DEventSourceREST.h.
References static_className().
|
private |
Definition at line 1453 of file DEventSourceREST.cc.
References min.
Referenced by Extract_DTrigger().
jerror_t DEventSourceREST::Extract_DBCALShower | ( | hddm_r::HDDM * | record, |
JFactory< DBCALShower > * | factory | ||
) |
Copies the data from the bcalShower hddm record. This is call from JEventSourceREST::GetObjects. If factory is NULL, this returns OBJECT_NOT_AVAILABLE immediately.
Definition at line 863 of file DEventSourceREST.cc.
References DBCALShower::E, DBCALShower::E_preshower, DBCALShower::E_raw, DBCALShower::ExyztCovariance, DBCALShower::Q, DBCALShower::t, DBCALShower::x, DBCALShower::y, and DBCALShower::z.
Referenced by GetObjects().
jerror_t DEventSourceREST::Extract_DBeamPhoton | ( | hddm_r::HDDM * | record, |
JFactory< DBeamPhoton > * | factory, | ||
JEventLoop * | eventLoop | ||
) |
This is called from JEventSourceREST::GetObjects. If factory is NULL, return OBJECT_NOT_AVAILABLE immediately. If factory tag="MCGEN" then copy the beam photon data from the Reaction hddm class.
Definition at line 454 of file DEventSourceREST.cc.
References DBeamPhoton::dCounter, dResourcePool_TMatrixFSym, DBeamPhoton::dSystem, dTargetCenterZMap, DTAGMGeometry::E_to_column(), DTAGHGeometry::E_to_counter(), DKinematicData::energy(), Gamma, DKinematicData::setErrorMatrix(), DKinematicData::setMomentum(), DKinematicData::setPID(), DKinematicData::setPosition(), DKinematicData::setTime(), SYS_NULL, SYS_TAGH, and SYS_TAGM.
Referenced by GetObjects().
jerror_t DEventSourceREST::Extract_DDetectorMatches | ( | JEventLoop * | locEventLoop, |
hddm_r::HDDM * | record, | ||
JFactory< DDetectorMatches > * | factory | ||
) |
Copies the data from the detectorMatches hddm record. This is called from JEventSourceREST::GetObjects. If factory is NULL, this returns OBJECT_NOT_AVAILABLE immediately.
Definition at line 1199 of file DEventSourceREST.cc.
References DDetectorMatches::Add_Match(), DDIRCLut::CalcLUT(), DParticleID::Get_DIRCLut(), DDetectorMatches::Get_DIRCTrackMatchParamsMap(), RECO_DIRC_CALC_LUT, DDetectorMatches::Set_DistanceToNearestTrack(), and DDetectorMatches::Set_FlightTimePCorrelation().
Referenced by GetObjects().
jerror_t DEventSourceREST::Extract_DDIRCPmtHit | ( | hddm_r::HDDM * | record, |
JFactory< DDIRCPmtHit > * | factory, | ||
JEventLoop * | locEventLoop | ||
) |
Copies the data from the fcalShower hddm record. This is call from JEventSourceREST::GetObjects. If factory is NULL, this returns OBJECT_NOT_AVAILABLE immediately.
Definition at line 1470 of file DEventSourceREST.cc.
References BAD, dDIRCChannelStatusMap, dDIRCMaxChannels, NOISY, DDIRCPmtHit::setChannel(), DDIRCPmtHit::setTime(), and DDIRCPmtHit::setTOT().
Referenced by GetObjects().
jerror_t DEventSourceREST::Extract_DFCALShower | ( | hddm_r::HDDM * | record, |
JFactory< DFCALShower > * | factory | ||
) |
Copies the data from the fcalShower hddm record. This is call from JEventSourceREST::GetObjects. If factory is NULL, this returns OBJECT_NOT_AVAILABLE immediately.
Definition at line 776 of file DEventSourceREST.cc.
References DFCALShower::ExyztCovariance, DFCALShower::setDocaTrack(), DFCALShower::setE1E9(), DFCALShower::setE9E25(), DFCALShower::setEnergy(), DFCALShower::setNumBlocks(), DFCALShower::setPosition(), DFCALShower::setSumU(), DFCALShower::setSumV(), DFCALShower::setTime(), and DFCALShower::setTimeTrack().
Referenced by GetObjects().
jerror_t DEventSourceREST::Extract_DMCReaction | ( | hddm_r::HDDM * | record, |
JFactory< DMCReaction > * | factory, | ||
JEventLoop * | locEventLoop | ||
) |
Copies the data from the Reaction hddm class. This is called from JEventSourceREST::GetObjects. If factory is NULL, this returns OBJECT_NOT_AVAILABLE immediately.
Definition at line 312 of file DEventSourceREST.cc.
References DMCReaction::beam, dTargetCenterZMap, Gamma, DKinematicData::setMomentum(), DKinematicData::setPID(), DKinematicData::setPosition(), DKinematicData::setTime(), string, DMCReaction::target, DMCReaction::type, and DMCReaction::weight.
Referenced by GetObjects().
jerror_t DEventSourceREST::Extract_DMCThrown | ( | hddm_r::HDDM * | record, |
JFactory< DMCThrown > * | factory | ||
) |
Copies the data from the hddm vertex records. This is called from JEventSourceREST::GetObjects. If factory is NULL, this returns OBJECT_NOT_AVAILABLE immediately.
Definition at line 579 of file DEventSourceREST.cc.
References DMCThrown::mech, DMCThrown::myid, DMCThrown::parentid, PDGtoPType(), DMCThrown::pdgtype, py, DKinematicData::setMomentum(), DKinematicData::setPID(), DKinematicData::setPosition(), DKinematicData::setTime(), sqrt(), and DMCThrown::type.
Referenced by GetObjects().
jerror_t DEventSourceREST::Extract_DRFTime | ( | hddm_r::HDDM * | record, |
JFactory< DRFTime > * | factory, | ||
JEventLoop * | locEventLoop | ||
) |
Definition at line 372 of file DEventSourceREST.cc.
References dBeamBunchPeriodMap, DRFTime::dTime, and DRFTime::dTimeVariance.
Referenced by GetObjects().
jerror_t DEventSourceREST::Extract_DSCHit | ( | hddm_r::HDDM * | record, |
JFactory< DSCHit > * | factory | ||
) |
Copies the data from the startHit hddm record. This is called from JEventSourceREST::GetObjects. If factory is NULL, this returns OBJECT_NOT_AVAILABLE immediately.
Definition at line 704 of file DEventSourceREST.cc.
References DSCHit::dE, DSCHit::sector, and DSCHit::t.
Referenced by GetObjects().
jerror_t DEventSourceREST::Extract_DTOFPoint | ( | hddm_r::HDDM * | record, |
JFactory< DTOFPoint > * | factory | ||
) |
Copies the data from the tofPoint hddm record. This is called from JEventSourceREST::GetObjects. If factory is NULL, this returns OBJECT_NOT_AVAILABLE immediately.
Definition at line 641 of file DEventSourceREST.cc.
References DTOFPoint::dE, DTOFPoint::dHorizontalBar, DTOFPoint::dHorizontalBarStatus, DTOFPoint::dVerticalBar, DTOFPoint::dVerticalBarStatus, DTOFPoint::pos, DTOFPoint::t, and DTOFPoint::tErr.
Referenced by GetObjects().
jerror_t DEventSourceREST::Extract_DTrackTimeBased | ( | hddm_r::HDDM * | record, |
JFactory< DTrackTimeBased > * | factory, | ||
JEventLoop * | locEventLoop | ||
) |
Copies the data from the chargedTrack hddm record. This is call from JEventSourceREST::GetObjects. If factory is NULL, this returns OBJECT_NOT_AVAILABLE immediately.
Definition at line 985 of file DEventSourceREST.cc.
References DTrackTimeBased::candidateid, DKinematicData::charge(), DTrackTimeBased::chisq, DTrackTimeBased::dCDCRings, DTrackTimeBased::ddEdx_CDC, DTrackTimeBased::ddEdx_CDC_amp, DTrackTimeBased::ddEdx_FDC, DTrackTimeBased::ddx_CDC, DTrackTimeBased::ddx_CDC_amp, DTrackTimeBased::ddx_FDC, DTrackTimeBased::dFDCPlanes, DTrackTimeBased::dMCThrownMatchMyID, DTrackTimeBased::dNumHitsMatchedToThrown, DTrackTimeBased::dNumHitsUsedFordEdx_CDC, DTrackTimeBased::dNumHitsUsedFordEdx_FDC, dResourcePool_TMatrixFSym, DTrackTimeBased::FOM, Get7x7ErrorMatrix(), DKinematicData::mass(), DTrackTimeBased::measured_cdc_hits_on_track, DTrackTimeBased::measured_fdc_hits_on_track, DTrackTimeBased::Ndof, DTrackTimeBased::potential_cdc_hits_on_track, DTrackTimeBased::potential_fdc_hits_on_track, PRUNE_DUPLICATE_TRACKS, DKinematicData::setErrorMatrix(), DKinematicData::setMomentum(), DKinematicData::setPID(), DKinematicData::setPosition(), DKinematicData::setTime(), DTrackingData::setTrackingErrorMatrix(), DTrackingData::setTrackingStateVector(), sin(), and DTrackTimeBased::trackid.
Referenced by GetObjects().
jerror_t DEventSourceREST::Extract_DTrigger | ( | hddm_r::HDDM * | record, |
JFactory< DTrigger > * | factory | ||
) |
Copies the data from the trigger hddm record. This is call from JEventSourceREST::GetObjects. If factory is NULL, this returns OBJECT_NOT_AVAILABLE immediately.
Definition at line 741 of file DEventSourceREST.cc.
References Convert_SignedIntToUnsigned(), DTrigger::Set_L1FrontPanelTriggerBits(), and DTrigger::Set_L1TriggerBits().
Referenced by GetObjects().
void DEventSourceREST::FreeEvent | ( | JEvent & | event | ) |
Definition at line 184 of file DEventSourceREST.cc.
void DEventSourceREST::Get7x7ErrorMatrix | ( | double | mass, |
const double | vec[5], | ||
const TMatrixFSym * | C5x5, | ||
TMatrixFSym * | loc7x7ErrorMatrix | ||
) |
Definition at line 1415 of file DEventSourceREST.cc.
References sin().
Referenced by Extract_DTrackTimeBased().
jerror_t DEventSourceREST::GetEvent | ( | JEvent & | event | ) |
Implementation of JEventSource virtual function
Definition at line 66 of file DEventSourceREST.cc.
References _DBG__, e, fin, ifs, kSTATUS_FROM_FILE, kSTATUS_PHYSICS_EVENT, and kSTATUS_REST.
jerror_t DEventSourceREST::GetObjects | ( | JEvent & | event, |
JFactory_base * | factory | ||
) |
This gets called through the virtual method of the JEventSource base class. It creates the objects of the type on which factory is based. It uses the HDDM_Element object kept in the ref field of the JEvent object passed.
Definition at line 193 of file DEventSourceREST.cc.
References dapp, dBeamBunchPeriodMap, dDIRCChannelStatusMap, dDIRCMaxChannels, dTargetCenterZMap, Extract_DBCALShower(), Extract_DBeamPhoton(), Extract_DDetectorMatches(), Extract_DDIRCPmtHit(), Extract_DFCALShower(), Extract_DMCReaction(), Extract_DMCThrown(), Extract_DRFTime(), Extract_DSCHit(), Extract_DTOFPoint(), Extract_DTrackTimeBased(), Extract_DTrigger(), DApplication::GetDGeometry(), DGeometry::GetTargetZ(), and RECO_DIRC_CALC_LUT.
|
inlinestatic |
Definition at line 55 of file DEventSourceREST.h.
Referenced by className().
|
private |
Definition at line 110 of file DEventSourceREST.h.
|
private |
Definition at line 113 of file DEventSourceREST.h.
Referenced by Extract_DRFTime(), and GetObjects().
|
private |
Definition at line 107 of file DEventSourceREST.h.
Referenced by Extract_DDIRCPmtHit(), and GetObjects().
|
private |
Definition at line 105 of file DEventSourceREST.h.
Referenced by DEventSourceREST(), Extract_DDIRCPmtHit(), and GetObjects().
|
private |
Definition at line 109 of file DEventSourceREST.h.
|
staticprivate |
Definition at line 114 of file DEventSourceREST.h.
Referenced by Extract_DBeamPhoton(), and Extract_DTrackTimeBased().
|
private |
Definition at line 112 of file DEventSourceREST.h.
Referenced by Extract_DBeamPhoton(), Extract_DMCReaction(), and GetObjects().
|
private |
Definition at line 117 of file DEventSourceREST.h.
Referenced by DEventSourceREST(), GetEvent(), and ~DEventSourceREST().
|
private |
Definition at line 116 of file DEventSourceREST.h.
Referenced by DEventSourceREST(), GetEvent(), and ~DEventSourceREST().
|
private |
Definition at line 103 of file DEventSourceREST.h.
Referenced by DEventSourceREST(), and Extract_DTrackTimeBased().
|
private |
Definition at line 104 of file DEventSourceREST.h.
Referenced by DEventSourceREST(), Extract_DDetectorMatches(), and GetObjects().
|
private |
Definition at line 100 of file DEventSourceREST.h.
|
private |
Definition at line 101 of file DEventSourceREST.h.