34 #include "StEventTypes.h"
36 #include "Sti/Base/Factory.h"
37 #include "StiSsd/StiSstHitLoader.h"
38 #include "Sti/StiHit.h"
39 #include "Sti/StiTrack.h"
40 #include "Sti/StiHitContainer.h"
41 #include "Sti/StiDetector.h"
42 #include "Sti/StiDetectorBuilder.h"
43 #include "Sti/StiDetector.h"
45 StiSstHitLoader::StiSstHitLoader()
55 StiSstHitLoader::~StiSstHitLoader()
58 void StiSstHitLoader::loadHits(
StEvent* source,
60 Filter<StiHit> * hitFilter)
63 throw runtime_error(
"StiSstHitLoader::loadHits() - FATAL - source==0 ");
75 throw runtime_error(
"StiSstHitLoader::loadHits() - FATAL - _hitContainer==0 ");
78 for (
unsigned int ladder = 0; ladder< ssthits->numberOfLadders(); ++ladder)
81 if (!ladderhits)
break;
83 for (
unsigned int wafer = 0; wafer< ladderhits->numberOfWafers(); ++wafer)
87 if (!waferhits)
break;
88 const StSPtrVecSstHit& hits = waferhits->hits();
90 for (const_StSstHitIterator it=hits.begin(); it!=hits.end(); ++it)
92 if (!*it)
throw runtime_error(
"StiSstHitLoader::loadHits() - WARNING - *it==0");
95 if (!hit)
throw runtime_error(
"StiSstHitLoader::loadHits() - WARNING - hit==0");
97 detector = _detector->getDetector(layer, hit->ladder() - 1);
108 _hitContainer->
add( stiHit );
virtual void add(StiHit *)
void setGlobal(const StiDetector *detector, const StMeasuredPoint *stHit, Float_t x, Float_t y, Float_t z, Float_t energy)
virtual Abstract * getInstance()=0
Get a pointer to instance of objects served by this factory.