Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Static Protected Attributes

base::ProcMgr Class Reference

#include <ProcMgr.h>

Inheritance diagram for base::ProcMgr:
Inheritance graph
[legend]
Collaboration diagram for base::ProcMgr:
Collaboration graph
[legend]

Public Member Functions

 ProcMgr ()
virtual ~ProcMgr ()
bool RegisterProc (StreamProc *proc, unsigned kind, unsigned brdid)
unsigned NumProc () const
StreamProcGetProc (unsigned n) const
virtual H1handle MakeH1 (const char *name, const char *title, int nbins, double left, double right, const char *xtitle=0)
virtual void FillH1 (H1handle h1, double x, double weight=1.)
virtual H2handle MakeH2 (const char *name, const char *title, int nbins1, double left1, double right1, int nbins2, double left2, double right2, const char *options=0)
virtual void FillH2 (H1handle h2, double x, double y, double weight=1.)
virtual C1handle MakeC1 (const char *name, double left, double right, base::H1handle h1=0)
virtual void ChangeC1 (C1handle c1, double left, double right)
virtual int TestC1 (C1handle c1, double value, double *dist=0)
virtual double GetC1Limit (C1handle c1, bool isleft=true)
bool IsRawAnalysis () const
void SetRawAnalysis (bool on)
void SetTimeSorting (bool on)
void SetTimeMasterIndex (unsigned indx)
void ProvideRawData (const Buffer &buf)
void ScanNewData ()
bool SkipAllData ()
bool AnalyzeSyncMarkers ()
bool CollectNewTriggers ()
bool ScanDataForNewTriggers ()
bool ProduceNextEvent (base::Event *&evt)

Static Public Member Functions

static ProcMgrinstance ()
static ProcMgrAddProc (StreamProc *proc)

Protected Types

enum  { MaxBrdId = 256 }
enum  { NoSyncIndex = 0xfffffffe, DummyIndex = 0xffffffff }
typedef std::vector< StreamProc * > ProcessorsVect
typedef std::map< unsigned,
StreamProc * > 
ProcessorsMap

Protected Member Functions

virtual unsigned SyncIdRange () const
int SyncIdDiff (unsigned id1, unsigned id2) const

Protected Attributes

ProcessorsVect fProc
ProcessorsMap fMap
GlobalTriggerMarksQueue fTriggers
 list of current triggers
unsigned fTimeMasterIndex
 processor index, which time is used for all other subsystems
bool fRawAnalysisOnly
 ignore all events, only single scan, not ouput events

Static Protected Attributes

static ProcMgrfInstance = 0

Detailed Description

Class base::ProcMgr is central manager of processors and interface to any external frameworks like ROOT or Go4 or ... It is singleton - the only instance for whole system

Definition at line 17 of file ProcMgr.h.


Member Typedef Documentation

typedef std::map<unsigned,StreamProc*> base::ProcMgr::ProcessorsMap [protected]

Definition at line 28 of file ProcMgr.h.

typedef std::vector<StreamProc*> base::ProcMgr::ProcessorsVect [protected]

Definition at line 27 of file ProcMgr.h.


Member Enumeration Documentation

anonymous enum [protected]
Enumerator:
MaxBrdId 

Definition at line 20 of file ProcMgr.h.

anonymous enum [protected]
Enumerator:
NoSyncIndex 
DummyIndex 

Definition at line 22 of file ProcMgr.h.


Constructor & Destructor Documentation

base::ProcMgr::ProcMgr (  ) 

Definition at line 9 of file ProcMgr.cxx.

References fInstance.

base::ProcMgr::~ProcMgr (  )  [virtual]

Definition at line 19 of file ProcMgr.cxx.

References fInstance, and fProc.


Member Function Documentation

base::ProcMgr * base::ProcMgr::AddProc ( StreamProc proc  )  [static]

Definition at line 40 of file ProcMgr.cxx.

References fInstance, and fProc.

Referenced by base::StreamProc::StreamProc().

bool base::ProcMgr::AnalyzeSyncMarkers (  ) 
virtual void base::ProcMgr::ChangeC1 ( C1handle  c1,
double  left,
double  right 
) [inline, virtual]

Reimplemented in TCBMFirstProc.

Definition at line 69 of file ProcMgr.h.

Referenced by base::StreamProc::ChangeC1().

bool base::ProcMgr::CollectNewTriggers (  ) 

Method to collect triggers

Definition at line 265 of file ProcMgr.cxx.

References fProc, fTimeMasterIndex, and fTriggers.

Referenced by TCBMFirstProc::BuildEvent().

virtual void base::ProcMgr::FillH1 ( H1handle  h1,
double  x,
double  weight = 1. 
) [inline, virtual]

Reimplemented in TCBMFirstProc.

Definition at line 63 of file ProcMgr.h.

Referenced by base::StreamProc::FillH1().

virtual void base::ProcMgr::FillH2 ( H1handle  h2,
double  x,
double  y,
double  weight = 1. 
) [inline, virtual]

Reimplemented in TCBMFirstProc.

Definition at line 66 of file ProcMgr.h.

Referenced by base::StreamProc::FillH2().

virtual double base::ProcMgr::GetC1Limit ( C1handle  c1,
bool  isleft = true 
) [inline, virtual]

Reimplemented in TCBMFirstProc.

Definition at line 73 of file ProcMgr.h.

Referenced by base::StreamProc::GetC1Limit().

StreamProc* base::ProcMgr::GetProc ( unsigned  n  )  const [inline]

Definition at line 60 of file ProcMgr.h.

References fProc, and NumProc().

base::ProcMgr * base::ProcMgr::instance (  )  [static]

Definition at line 34 of file ProcMgr.cxx.

References fInstance.

bool base::ProcMgr::IsRawAnalysis (  )  const [inline]

Definition at line 77 of file ProcMgr.h.

References fRawAnalysisOnly.

Referenced by TCBMFirstProc::BuildEvent(), and ProduceNextEvent().

virtual C1handle base::ProcMgr::MakeC1 ( const char *  name,
double  left,
double  right,
base::H1handle  h1 = 0 
) [inline, virtual]

Reimplemented in TCBMFirstProc.

Definition at line 68 of file ProcMgr.h.

Referenced by base::StreamProc::MakeC1().

virtual H1handle base::ProcMgr::MakeH1 ( const char *  name,
const char *  title,
int  nbins,
double  left,
double  right,
const char *  xtitle = 0 
) [inline, virtual]

Reimplemented in TCBMFirstProc.

Definition at line 62 of file ProcMgr.h.

Referenced by base::StreamProc::MakeH1(), and base::SysCoreProc::SysCoreProc().

virtual H2handle base::ProcMgr::MakeH2 ( const char *  name,
const char *  title,
int  nbins1,
double  left1,
double  right1,
int  nbins2,
double  left2,
double  right2,
const char *  options = 0 
) [inline, virtual]

Reimplemented in TCBMFirstProc.

Definition at line 65 of file ProcMgr.h.

Referenced by base::StreamProc::MakeH2().

unsigned base::ProcMgr::NumProc (  )  const [inline]

Definition at line 59 of file ProcMgr.h.

References fProc.

Referenced by GetProc().

bool base::ProcMgr::ProduceNextEvent ( base::Event *&  evt  ) 

Very central method - select if possible data for next event Only can be done that each processor is agree to deliver data within trigger interval. It may not be a case when messages from future buffers may be required

Definition at line 326 of file ProcMgr.cxx.

References base::Event::DestroyEvents(), fProc, fTriggers, IsRawAnalysis(), and base::Event::SetTriggerTime().

Referenced by TCBMFirstProc::BuildEvent().

void base::ProcMgr::ProvideRawData ( const Buffer buf  ) 

Method to provide raw data on base of data kind to the processor

Definition at line 78 of file ProcMgr.cxx.

References fMap, MaxBrdId, and base::Buffer::null().

Referenced by TCBMFirstProc::BuildEvent().

bool base::ProcMgr::RegisterProc ( StreamProc proc,
unsigned  kind,
unsigned  brdid 
)

Enter processor for processing data of specified kind

Definition at line 47 of file ProcMgr.cxx.

References fMap, fProc, and MaxBrdId.

bool base::ProcMgr::ScanDataForNewTriggers (  ) 

Method to produce data for new triggers

Definition at line 313 of file ProcMgr.cxx.

References fProc.

Referenced by TCBMFirstProc::BuildEvent().

void base::ProcMgr::ScanNewData (  ) 

Let scan new data of all processors

Definition at line 98 of file ProcMgr.cxx.

References fProc.

Referenced by TCBMFirstProc::BuildEvent().

void base::ProcMgr::SetRawAnalysis ( bool  on  )  [inline]

Definition at line 78 of file ProcMgr.h.

References fRawAnalysisOnly.

void base::ProcMgr::SetTimeMasterIndex ( unsigned  indx  )  [inline]

Specify processor index, which is used as time reference for all others

Definition at line 84 of file ProcMgr.h.

References fTimeMasterIndex.

void base::ProcMgr::SetTimeSorting ( bool  on  ) 

Set sorting flag for all registered processors

Definition at line 69 of file ProcMgr.cxx.

References fProc.

bool base::ProcMgr::SkipAllData (  ) 

Method cleanup all queues, used in case of raw analysis

Definition at line 104 of file ProcMgr.cxx.

References fProc.

Referenced by TCBMFirstProc::BuildEvent().

int base::ProcMgr::SyncIdDiff ( unsigned  id1,
unsigned  id2 
) const [protected]

Method calculated difference id2-id1, used for sync markers identification Sync ID overflow is taken into account

Definition at line 111 of file ProcMgr.cxx.

References SyncIdRange().

Referenced by AnalyzeSyncMarkers().

virtual unsigned base::ProcMgr::SyncIdRange (  )  const [inline, protected, virtual]

Definition at line 41 of file ProcMgr.h.

Referenced by SyncIdDiff().

virtual int base::ProcMgr::TestC1 ( C1handle  c1,
double  value,
double *  dist = 0 
) [inline, virtual]

Condition check 0 - inside, -1 left , +1 - right If variable dist specified, will contain distance to left (-1) or right (+1) boundary

Reimplemented in TCBMFirstProc.

Definition at line 72 of file ProcMgr.h.

Referenced by base::StreamProc::TestC1().


Field Documentation

base::ProcMgr * base::ProcMgr::fInstance = 0 [static, protected]

Definition at line 39 of file ProcMgr.h.

Referenced by AddProc(), instance(), ProcMgr(), and ~ProcMgr().

Definition at line 31 of file ProcMgr.h.

Referenced by ProvideRawData(), and RegisterProc().

ignore all events, only single scan, not ouput events

Definition at line 37 of file ProcMgr.h.

Referenced by IsRawAnalysis(), and SetRawAnalysis().

unsigned base::ProcMgr::fTimeMasterIndex [protected]

processor index, which time is used for all other subsystems

Definition at line 35 of file ProcMgr.h.

Referenced by AnalyzeSyncMarkers(), CollectNewTriggers(), and SetTimeMasterIndex().

list of current triggers

Definition at line 33 of file ProcMgr.h.

Referenced by CollectNewTriggers(), and ProduceNextEvent().


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