// Logs:
//
//  $Log: LMonitor.h,v $
//  Revision 1.2  2003/06/26 11:24:25  cvs
//  modified particle moving with LMiki and faster LDisorder operations
//

#ifndef _L_MONITOR___
#define _L_MONITOR___

#include "Config.h"

#include <Rtypes.h>
#include "LSpace.h"
#include "LParticle.h"
#include <TView.h>
#include <TCanvas.h>
#include <TPolyLine3D.h>
#include <TH1.h>

class LMonitor{
 private:
  int feidx;
  TPolyLine3D *fline; //! particle track
  LSpace *fspace; //! pointer to lattice
  TView *fview;  //! pointer to view
  TCanvas* fcanvas; //link to display
  TCanvas* fcanvas2; //link to display for energy
  LParticle* fe; //link to particle
  TH1F* fenergy; //particle energy track
 public:
  LMonitor();
  LMonitor(LSpace* space);
  virtual ~LMonitor();
  
  void SetParticle(LParticle* e){fe=e;}
  void Position(LParticle *e,TCanvas* canvas){SetParticle(e);fcanvas=canvas;}
  void Energy(LParticle *e,TCanvas* canvas2){SetParticle(e);fcanvas2=canvas2;}
  void AddCurrent(void);
  void DrawProbability(float* prob,int n,int idx);
  ClassDef(LMonitor,0)  //visualize particle track
};

#endif //_L_MONITOR___




