HARPO  5.1.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
HarpoAnalyse.h
Go to the documentation of this file.
1 #ifndef HARPOANALYSE_H
2 #define HARPOANALYSE_H
3 
5 //
6 // HarpoAnalyse
7 //
8 // Virual analyse class, only define interface definition
9 // Analyse done by derivitive user class
10 //
11 
12 #include "TObject.h"
13 #include "HarpoEvent.h"
14 #include "HarpoRunHeader.h"
15 
16 class TGMainFrame;
17 class TRootEmbeddedCanvas;
18 class TGListBox;
19 
20 class TFile;
21 
23 {
24 
25  public:
26 
27  virtual ~HarpoHistManager(){}
28 
29  static HarpoHistManager* GetPointer();
30 
31  TFile* OpenHistFile(const char* ananame, HarpoRunHeader* rh);
32  void CloseHistFile();
33 
34  private:
36 
38 
39  TFile* fHistFile;
40 
41 
42  ClassDef(HarpoHistManager,1) //Run Analyse
43 
44 };
45 
46 
47 class HarpoAnalyse : public TObject {
48 
49 public:
50  virtual ~HarpoAnalyse() { }
51 
52  void Set(HarpoEvent *event);
53 
54  virtual void process() = 0;
55  // virtual void ProcScan(Int_t i, Int_t j, Int_t k);
56  virtual void Init() {}
57  virtual void ProcessEvent(HarpoEvent *event);
58  virtual void print();
59  virtual void Save(char * /* mode */ =NULL) {}
60  void SetRunHeader(HarpoRunHeader* hdr){fRunHeader = hdr; Info("SetRunHeader","%p",(void *)fRunHeader);}
61 
62  TFile* OpenHistFile(const char* ananame);
63 
64  virtual void DisplayAnalysis(TRootEmbeddedCanvas*, TGListBox*){}
65  // virtual TGFrame* ConfigFrame(TGFrame* f, UInt_t xsize, UInt_t ysize, TGMainFrame* fMain, Int_t id){return 0;}
66  virtual void ConfigFrame(TGMainFrame * , Int_t){}
67  virtual void SetConfig(){}
68 
69  // Data
71 
72 protected:
73  HarpoAnalyse() : fEvt(NULL), nEvents(0),fRunHeader(NULL)/*,fHistFile(NULL)*/ {}
74  // Data
75  ULong_t nEvents; // Number of processed Events
77 
78 private:
79 
80  ClassDef(HarpoAnalyse,1) //Run Analyse
81 };
82 
83 #endif
virtual void Init()
Definition: HarpoAnalyse.h:56
static HarpoHistManager * GetPointer()
A virtual class which define intrafece between HARPO Reader and Event Analysis code.
Definition: HarpoAnalyse.h:47
virtual ~HarpoHistManager()
Definition: HarpoAnalyse.h:27
virtual void print()
A class hold HARPO run iformation.
static HarpoHistManager * fManager
Definition: HarpoAnalyse.h:37
virtual ~HarpoAnalyse()
Definition: HarpoAnalyse.h:50
virtual void SetConfig()
Definition: HarpoAnalyse.h:67
virtual void process()=0
TFile * OpenHistFile(const char *ananame)
virtual void DisplayAnalysis(TRootEmbeddedCanvas *, TGListBox *)
Definition: HarpoAnalyse.h:64
void Set(HarpoEvent *event)
virtual void Save(char *=NULL)
Definition: HarpoAnalyse.h:59
virtual void ProcessEvent(HarpoEvent *event)
Set pointer to new event for analyse, anlyse event , and delete.
HarpoEvent * fEvt
Definition: HarpoAnalyse.h:70
ULong_t nEvents
Definition: HarpoAnalyse.h:75
A class store HARPO row event data and header. Provide access metods to the row event data...
Definition: HarpoEvent.h:29
HarpoRunHeader * fRunHeader
Definition: HarpoAnalyse.h:76
virtual void ConfigFrame(TGMainFrame *, Int_t)
Definition: HarpoAnalyse.h:66
void SetRunHeader(HarpoRunHeader *hdr)
Definition: HarpoAnalyse.h:60
TFile * OpenHistFile(const char *ananame, HarpoRunHeader *rh)