StIstRawHitMaker.peer.review

 Class - StIstRawHitMaker

  • There are non initialised variables. But here are some setters for them. But who will call them inside of BFC?                                                  These setters have default values. it is reasonable to set these values in constructor, like:                                                                                       setIsCalibrationMode( );
      setHitCut() ;
      setCmnCorrection( );
      setCmnCut();
     
  • If these default values are not good enough, setters should be called. But in BFC to call these setters very inconvenient. BFC can not know about all makers. It can not load all the star libraries. For this special method of StMaker is used. BFC can call                                                                 chain->SetAttr("CalibrationMode",2,"StIstRawMaker::")                                                                                                                                           and in Init()                                                                                                                                                                                                           if (SAttr("CalibrationMode")) setIsCalibrationMode(IAttr( "CalibrationMode"));
  • Now using of m_DataSet. Actiually user should not use this variable. How makers communicate between them is discribed in           https://drupal.star.bnl.gov/STAR/comp/sofi/tutorials/introduction-star-software-and-makers                                                                                      It is slightly outdated, but as it is described, it is working. In described cas user can use for communication named objects inherited from TDataSet only. It is not always convenient. Contemporary  approach allows also class inherited from TObject (Your case) or even arbitrary class. but for the last case user must provide method to delete it or delete it him/her self.  The example is:
  1.             mIstCollectionPtr = new StIstCollection();
  2.            ToWhiteBoard("istRawHit",mIstCollectionPtr, true) ;                  
  3.   And how to get it
  4.            StIstCollection *myIstCollectionPtr = 0;
  5.           WhiteBoard("istRawHit",&myIstCollectionPtr) ;    
  • As I see , in the cas of  StIstRawHitMaker, this data object created only once and then reused. Then you can use "WhiteConst" instead of "WhiteBoard" methods. It is the same, but objects are not deleted in Clear()
  •