stream  0.10.0
stream analysis framework
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Friends
base::Processor Class Reference

Abstract processor. More...

#include <base/Processor.h>

Inheritance diagram for base::Processor:
base::EventProc base::StreamProc hadaq::HldFilter THookProc base::OpticSplitter base::SysCoreProc hadaq::HldProcessor hadaq::SpillProcessor hadaq::StartProcessor hadaq::SubProcessor hadaq::TrbProcessor mbs::Processor

Public Member Functions

virtual ~Processor ()
 destructor
 
ProcMgrmgr () const
 Return manager instance.
 
const char * GetName () const
 Get processor name.
 
unsigned GetID () const
 Get processor ID.
 
void SetHistFilling (int lvl=99)
 Set histogram filling level.
 
bool IsHistFilling () const
 Is histogram filling enabled.
 
int HistFillLevel () const
 Get histogram filling level.
 
unsigned GetStoreKind () const
 Get store kind.
 
bool IsStoreEnabled () const
 Is store enabled.
 
virtual void SetStoreKind (unsigned kind=1)
 Set store kind.
 
void SetStoreEnabled (bool on=true)
 Enable store - set store kind 1.
 
virtual void UserPreLoop ()
 pre loop
 
virtual void UserPostLoop ()
 post loop
 

Protected Types

enum  { DummyBrdId = 0xffffffff }
 

Protected Member Functions

 Processor (const char *name="", unsigned brdid=DummyBrdId)
 Make constructor protected - no way to create base class instance. More...
 
void SetBoardId (unsigned id)
 Set board id.
 
void SetPathPrefix (const std::string &prefix)
 Set path prefix for histogramsid.
 
void SetSubPrefix (const char *subname="", int indx=-1, const char *subname2="", int indx2=-1)
 Set subprefix for histograms and conditions. More...
 
void SetSubPrefix2 (const char *subname="", int indx=-1, const char *subname2="", int indx2=-1)
 Set subprefix for histograms and conditions, index uses 2 symbols. More...
 
H1handle MakeH1 (const char *name, const char *title, int nbins, double left, double right, const char *xtitle=0)
 Adds processor prefix to histogram name and calls base::ProcMgr::MakeH1 method.
 
void FillH1 (H1handle h1, double x, double weight=1.)
 Fill 1-D histogram.
 
void FastFillH1 (H1handle h1, int x, double weight=1.)
 Fast fill 1-D histogram. More...
 
double GetH1Content (H1handle h1, int nbin)
 Get bin content of 1-D histogram.
 
void SetH1Content (H1handle h1, int nbin, double v=0.)
 Set bin content of 1-D histogram.
 
int GetH1NBins (H1handle h1)
 Get bins numbers for 1-D histogram.
 
void ClearH1 (H1handle h1)
 Clear 1-D histogram.
 
void CopyH1 (H1handle tgt, H1handle src)
 Copy 1-D histogram from src to tgt.
 
void SetH1Title (H1handle h1, const char *title)
 Set 1-D histogram title.
 
H2handle MakeH2 (const char *name, const char *title, int nbins1, double left1, double right1, int nbins2, double left2, double right2, const char *options=0)
 Adds processor prefix to histogram name and calls base::ProcMgr::MakeH2 method.
 
void FillH2 (H1handle h2, double x, double y, double weight=1.)
 Fill 2-D histogram.
 
void FastFillH2 (H1handle h2, int x, int y)
 Fast fill 2-D histogram. More...
 
void SetH2Content (H2handle h2, int nbin1, int nbin2, double v=0.)
 Set bin content of 2-D histogram.
 
double GetH2Content (H2handle h2, int bin1, int bin2)
 Get bin content of 2-D histogram.
 
bool GetH2NBins (H2handle h2, int &nBins1, int &nBins2)
 Get number of bins for 2-D histogram.
 
void ClearH2 (base::H2handle h2)
 Clear 2-D histogram.
 
void SetH2Title (H2handle h2, const char *title)
 Change title of 2-D histogram.
 
C1handle MakeC1 (const char *name, double left, double right, H1handle h1=0)
 Create condition.
 
void ChangeC1 (C1handle c1, double left, double right)
 Change condition limits.
 
int TestC1 (C1handle c1, double value, double *dist=0)
 Test condition.
 
double GetC1Limit (C1handle c1, bool isleft=true)
 Get condition limit.
 
virtual void CreateBranch (TTree *)
 Create branch.
 
virtual bool RegisterObject (TObject *tobj, const char *subfolder=0)
 Register object.
 

Protected Attributes

std::string fName
 processor name, used for event naming
 
unsigned fID
 identifier, used mostly for debugging
 
ProcMgrfMgr
 direct pointer on manager
 
std::string fPathPrefix
 histogram path prefix, used for histogram folder name
 
std::string fPrefix
 prefix, used for histogram names
 
std::string fSubPrefixD
 sub-prefix for histogram directory
 
std::string fSubPrefixN
 sub-prefix for histogram names
 
int fHistFilling
 level of histogram filling
 
unsigned fStoreKind
 if >0, store will be enabled for processor
 
bool fIntHistFormat
 if true, internal histogram format is used
 

Friends

class ProcMgr
 

Detailed Description

Abstract processor.

Class base::Processor is abstract processor. Provides service functions to create histograms and conditions

Constructor & Destructor Documentation

◆ Processor()

base::Processor::Processor ( const char *  name = "",
unsigned  brdid = DummyBrdId 
)
protected

Make constructor protected - no way to create base class instance.

constructor

Member Function Documentation

◆ FastFillH1()

void base::Processor::FastFillH1 ( H1handle  h1,
int  x,
double  weight = 1. 
)
inlineprotected

Fast fill 1-D histogram.

Can only be used where index is same as x itself, no range checks are performed

◆ FastFillH2()

void base::Processor::FastFillH2 ( H1handle  h2,
int  x,
int  y 
)
inlineprotected

Fast fill 2-D histogram.

Can only be used where index is same as x and y themself, no range checks are performed

◆ SetSubPrefix()

void base::Processor::SetSubPrefix ( const char *  subname = "",
int  indx = -1,
const char *  subname2 = "",
int  indx2 = -1 
)
protected

Set subprefix for histograms and conditions.

set sub-prefixes

◆ SetSubPrefix2()

void base::Processor::SetSubPrefix2 ( const char *  subname = "",
int  indx = -1,
const char *  subname2 = "",
int  indx2 = -1 
)
protected

Set subprefix for histograms and conditions, index uses 2 symbols.

Set sub-prefixes, use 2 digits for indicies.


The documentation for this class was generated from the following files: