29 #ifndef GFRECOHITPRODUCER_H 30 #define GFRECOHITPRODUCER_H 35 #include "TClonesArray.h" 50 virtual GFAbsRecoHit*
produce(
int index)=0;
77 template <
class hit_T,
class recoHit_T>
93 virtual GFAbsRecoHit*
produce(
int index);
97 template <
class hit_T,
class recoHit_T>
99 hitArrayTClones = theArr;
110 template <
class hit_T,
class recoHit_T>
116 template <
class hit_T,
class recoHit_T>
118 if (!hitArrayTClones)
119 throw GFException(
"GFRecoHitProducer(): no hit set up", __LINE__, __FILE__);
124 if(hitArrayTClones->At(index) == 0) {
125 throw GFException(
"In GFRecoHitProducer: index for hit in TClonesArray out of bounds",__LINE__,__FILE__).
setFatal();
127 return (
new recoHit_T( (hit_T*) hitArrayTClones->At(index) ) );
virtual GFAbsRecoHit * produce(int index)=0
Virtual abstract method to produce a RecoHit. Implemented in GFRecoHitProducer.
virtual GFAbsRecoHit * produce(int index)
Create a RecoHit from the cluster at position index in TClonesArray.
Template class for a hit producer module.
virtual ~GFRecoHitProducer()
virtual ~GFAbsRecoHitProducer()
Abstract interface class for GFRecoHitProducer.
Exception class for error handling in GENFIT (provides storage for diagnostic information) ...
TClonesArray * hitArrayTClones
pointer to array with cluster data
GFException & setFatal(bool b=true)
set fatal flag. if this is true, the fit stops for this current track repr.
GFRecoHitProducer(TClonesArray *)
Constructor takes pointer to the cluster array.