stream  0.10.0
stream analysis framework
TFirstStepProcessor.h
1 #ifndef TFIRSTSTEPPROCESSOR_H
2 #define TFIRSTSTEPPROCESSOR_H
3 
4 #include "TGo4EventProcessor.h"
5 #include "root/TRootProcMgr.h"
6 
9 class TFirstStepProcessor : public TGo4EventProcessor,
10  public TRootProcMgr {
11 
12  protected:
13 
15  long fNumInpBufs;
17 
18  public:
19 
21  TFirstStepProcessor(const char* name);
22  virtual ~TFirstStepProcessor();
23 
24  virtual Bool_t BuildEvent(TGo4EventElement*);
25 
26  virtual bool InternalHistFormat() const { return false; }
27 
28  virtual void SetSortedOrder(bool = true);
29  virtual bool IsSortedOrder();
30 
31  virtual base::H1handle MakeH1(const char* name, const char* title, int nbins, double left, double right, const char* xtitle = 0);
32  virtual bool GetH1NBins(base::H1handle h1, int &nbins);
33  virtual void FillH1(base::H1handle h1, double x, double weight = 1.);
34  virtual double GetH1Content(base::H1handle h1, int nbin);
35  virtual void SetH1Content(base::H1handle h1, int bin, double v = 0.);
36  virtual void ClearH1(base::H1handle h1);
37  virtual void CopyH1(base::H1handle tgt, base::H1handle src);
38  virtual void SetH1Title(base::H1handle h1, const char* title);
39 
40  virtual base::H2handle MakeH2(const char* name, const char* title, int nbins1, double left1, double right1, int nbins2, double left2, double right2, const char* options = 0);
41  virtual bool GetH2NBins(base::H2handle h2, int &nbins1, int &nbins2);
42  virtual void FillH2(base::H2handle h2, double x, double y, double weight = 1.);
43  virtual double GetH2Content(base::H2handle h2, int bin1, int bin2);
44  virtual void SetH2Content(base::H2handle h2, int bin1, int bin2, double v = 0.);
45  virtual void ClearH2(base::H2handle h2);
46  virtual void SetH2Title(base::H2handle h2, const char* title);
47 
48  virtual void ClearAllHistograms();
49 
50  virtual base::C1handle MakeC1(const char* name, double left, double right, base::H1handle h1 = 0);
51  virtual void ChangeC1(base::C1handle c1, double left, double right);
52  virtual int TestC1(base::C1handle c1, double value, double* dist = 0);
53  virtual double GetC1Limit(base::C1handle c1, bool isleft = true);
54 
55  virtual bool RegisterObject(TObject* tobj, const char* subfolder = 0);
56 
57  virtual void UserPreLoop();
58  virtual void UserPostLoop();
59 
60  ClassDef(TFirstStepProcessor,1)
61 };
62 
63 #endif
64 
Handler for first.C in go4.
Definition: TFirstStepProcessor.h:10
virtual void SetH1Title(base::H1handle h1, const char *title)
set h1 title
Definition: TFirstStepProcessor.cxx:330
virtual void ChangeC1(base::C1handle c1, double left, double right)
change condition
Definition: TFirstStepProcessor.cxx:490
long fNumOutEvents
created number of output events
Definition: TFirstStepProcessor.h:16
virtual void ClearH1(base::H1handle h1)
clear h1
Definition: TFirstStepProcessor.cxx:306
long fTotalDataSize
processed data size
Definition: TFirstStepProcessor.h:14
virtual void SetH1Content(base::H1handle h1, int bin, double v=0.)
set h1 content
Definition: TFirstStepProcessor.cxx:295
virtual void SetH2Content(base::H2handle h2, int bin1, int bin2, double v=0.)
set h2 content
Definition: TFirstStepProcessor.cxx:434
virtual ~TFirstStepProcessor()
destructor
Definition: TFirstStepProcessor.cxx:87
virtual bool GetH1NBins(base::H1handle h1, int &nbins)
Get H1 bins numbers.
Definition: TFirstStepProcessor.cxx:256
virtual void SetH2Title(base::H2handle h2, const char *title)
set h2 title
Definition: TFirstStepProcessor.cxx:457
virtual double GetC1Limit(base::C1handle c1, bool isleft=true)
get condition limit
Definition: TFirstStepProcessor.cxx:518
virtual bool GetH2NBins(base::H2handle h2, int &nbins1, int &nbins2)
get h2 bins number
Definition: TFirstStepProcessor.cxx:395
virtual void CopyH1(base::H1handle tgt, base::H1handle src)
copy h1
Definition: TFirstStepProcessor.cxx:317
long fNumInpBufs
processed number of buffers
Definition: TFirstStepProcessor.h:15
virtual void ClearH2(base::H2handle h2)
clear h2
Definition: TFirstStepProcessor.cxx:446
virtual void UserPostLoop()
post loop
Definition: TFirstStepProcessor.cxx:106
virtual void FillH1(base::H1handle h1, double x, double weight=1.)
fill H1
Definition: TFirstStepProcessor.cxx:268
virtual void SetSortedOrder(bool=true)
set sorted order for created histogram folders
Definition: TFirstStepProcessor.cxx:194
virtual int TestC1(base::C1handle c1, double value, double *dist=0)
test condition
Definition: TFirstStepProcessor.cxx:499
virtual double GetH2Content(base::H2handle h2, int bin1, int bin2)
get h2 content
Definition: TFirstStepProcessor.cxx:422
virtual bool RegisterObject(TObject *tobj, const char *subfolder=0)
register object
Definition: TFirstStepProcessor.cxx:528
virtual bool IsSortedOrder()
is sorted order for created histogram folders
Definition: TFirstStepProcessor.cxx:202
virtual void ClearAllHistograms()
clear all histograms
Definition: TFirstStepProcessor.cxx:468
virtual double GetH1Content(base::H1handle h1, int nbin)
get h1 content
Definition: TFirstStepProcessor.cxx:283
virtual void FillH2(base::H2handle h2, double x, double y, double weight=1.)
fill h2
Definition: TFirstStepProcessor.cxx:407
virtual base::C1handle MakeC1(const char *name, double left, double right, base::H1handle h1=0)
make condition
Definition: TFirstStepProcessor.cxx:478
virtual void UserPreLoop()
pre loop
Definition: TFirstStepProcessor.cxx:95
virtual bool InternalHistFormat() const
When returns true, indicates that simple histogram format is used.
Definition: TFirstStepProcessor.h:26
virtual Bool_t BuildEvent(TGo4EventElement *)
build event - main entry point
Definition: TFirstStepProcessor.cxx:116
TFirstStepProcessor()
constructor
Definition: TFirstStepProcessor.cxx:30
virtual base::H2handle MakeH2(const char *name, const char *title, int nbins1, double left1, double right1, int nbins2, double left2, double right2, const char *options=0)
make H2 see base::ProcMgr::MakeH2
Definition: TFirstStepProcessor.cxx:342
virtual base::H1handle MakeH1(const char *name, const char *title, int nbins, double left, double right, const char *xtitle=0)
make H1 see base::ProcMgr::MakeH1
Definition: TFirstStepProcessor.cxx:211
Processors manager for using in ROOT environment.
Definition: TRootProcMgr.h:8