next up previous
Next: About this document ... Up: Instruction Previous: Set parameters ; Constructor

Spring

To use the fortran subroutine, SPEVNT, in JSF, basically two member functions, XXSpringBuf::SetPartons() and XXSpring::Initialize(), must be added to the template code. An example is shown below.

extern "C" {
extern void spevnt_(Int_t *nret);
};

//_____________________________________________________________________________
Bool_t XXSpringBuf::SetPartons()
{
  Int_t iret;
  spevnt_(&iret);
  return kTRUE ;
}
//_____________________________________________________________________________
Bool_t XXSpring::Initialize()
{
  // Make sure to set JSFHadronize::fCopySpringClassDataToBank = kFALSE
  JSFSpring::Initialize();
  JSFHadronizer *had=(JSFHadronizer*)gJSF->FindModule("JSFHadronizer");
  if(had) had->SetCopySpringClassDataToBank(kFALSE);
  return kTRUE;
}

XXSpringBuf::SetPartons() is called at every event to create JSFSpringParton class. In the example above, we call spevnt_ instead, where TBS Bank Spring:Parton_List and Spring:Header is created.

The JSFHadronizer class is to hadronize partons of class JSFSpring. But, if it is called with fCopySpringClassDataToBank=FALSE, it uses the data in the TBS bank as an input data.



Miyamoto AKiya
1998-12-13