#include <TCBMFirstProc.h>
Public Member Functions | |
TCBMFirstProc () | |
TCBMFirstProc (const char *name) | |
virtual | ~TCBMFirstProc () |
virtual Bool_t | BuildEvent (TGo4EventElement *) |
virtual base::H1handle | MakeH1 (const char *name, const char *title, int nbins, double left, double right, const char *xtitle=0) |
virtual void | FillH1 (base::H1handle h1, double x, double weight=1.) |
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) |
virtual void | FillH2 (base::H1handle h2, double x, double y, double weight=1.) |
virtual base::C1handle | MakeC1 (const char *name, double left, double right, base::H1handle h1=0) |
virtual void | ChangeC1 (base::C1handle c1, double left, double right) |
virtual int | TestC1 (base::C1handle c1, double value, double *dist=0) |
virtual double | GetC1Limit (base::C1handle c1, bool isleft=true) |
bool | RegisterProc (StreamProc *proc, unsigned kind, unsigned brdid) |
unsigned | NumProc () const |
StreamProc * | GetProc (unsigned n) const |
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 void | SetDfltScript (const char *name) |
static ProcMgr * | instance () |
static ProcMgr * | AddProc (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 | |
long | fTotalDataSize |
long | fNumMbsBufs |
long | fNumCbmEvents |
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 TString | fDfltSetupScript = "setup.C" |
static ProcMgr * | fInstance = 0 |
Definition at line 7 of file TCBMFirstProc.h.
typedef std::map<unsigned,StreamProc*> base::ProcMgr::ProcessorsMap [protected, inherited] |
typedef std::vector<StreamProc*> base::ProcMgr::ProcessorsVect [protected, inherited] |
anonymous enum [protected, inherited] |
TCBMFirstProc::TCBMFirstProc | ( | ) |
Definition at line 22 of file TCBMFirstProc.cxx.
TCBMFirstProc::TCBMFirstProc | ( | const char * | name | ) |
Definition at line 29 of file TCBMFirstProc.cxx.
References fDfltSetupScript, fNumCbmEvents, fNumMbsBufs, and fTotalDataSize.
TCBMFirstProc::~TCBMFirstProc | ( | ) | [virtual] |
Definition at line 45 of file TCBMFirstProc.cxx.
References fNumCbmEvents, fNumMbsBufs, and fTotalDataSize.
base::ProcMgr * base::ProcMgr::AddProc | ( | StreamProc * | proc | ) | [static, inherited] |
Definition at line 40 of file ProcMgr.cxx.
References base::ProcMgr::fInstance, and base::ProcMgr::fProc.
Referenced by base::StreamProc::StreamProc().
bool base::ProcMgr::AnalyzeSyncMarkers | ( | ) | [inherited] |
Check current sync markers
Definition at line 132 of file ProcMgr.cxx.
References base::ProcMgr::DummyIndex, base::StreamProc::eraseSyncAt(), base::ProcMgr::fProc, base::StreamProc::fSyncFlag, base::StreamProc::fSyncScanIndex, base::ProcMgr::fTimeMasterIndex, base::StreamProc::getSync(), base::SyncMarker::globaltm, base::StreamProc::IsSynchronisationRequired(), base::SyncMarker::localtm, base::ProcMgr::NoSyncIndex, base::StreamProc::numSyncs(), base::ProcMgr::SyncIdDiff(), and base::SyncMarker::uniqueid.
Referenced by BuildEvent().
Bool_t TCBMFirstProc::BuildEvent | ( | TGo4EventElement * | outevnt | ) | [virtual] |
Definition at line 50 of file TCBMFirstProc.cxx.
References base::ProcMgr::AnalyzeSyncMarkers(), base::ProcMgr::CollectNewTriggers(), fNumCbmEvents, fNumMbsBufs, fTotalDataSize, base::ProcMgr::IsRawAnalysis(), base::Buffer::makecopyof(), base::ProcMgr::ProduceNextEvent(), base::ProcMgr::ProvideRawData(), base::ProcMgr::ScanDataForNewTriggers(), base::ProcMgr::ScanNewData(), and base::ProcMgr::SkipAllData().
void TCBMFirstProc::ChangeC1 | ( | base::C1handle | c1, | |
double | left, | |||
double | right | |||
) | [virtual] |
Reimplemented from base::ProcMgr.
Definition at line 240 of file TCBMFirstProc.cxx.
bool base::ProcMgr::CollectNewTriggers | ( | ) | [inherited] |
Method to collect triggers
Definition at line 265 of file ProcMgr.cxx.
References base::ProcMgr::fProc, base::ProcMgr::fTimeMasterIndex, and base::ProcMgr::fTriggers.
Referenced by BuildEvent().
void TCBMFirstProc::FillH1 | ( | base::H1handle | h1, | |
double | x, | |||
double | weight = 1. | |||
) | [virtual] |
Reimplemented from base::ProcMgr.
Definition at line 206 of file TCBMFirstProc.cxx.
void TCBMFirstProc::FillH2 | ( | base::H1handle | h2, | |
double | x, | |||
double | y, | |||
double | weight = 1. | |||
) | [virtual] |
Reimplemented from base::ProcMgr.
Definition at line 218 of file TCBMFirstProc.cxx.
double TCBMFirstProc::GetC1Limit | ( | base::C1handle | c1, | |
bool | isleft = true | |||
) | [virtual] |
Reimplemented from base::ProcMgr.
Definition at line 262 of file TCBMFirstProc.cxx.
StreamProc* base::ProcMgr::GetProc | ( | unsigned | n | ) | const [inline, inherited] |
Definition at line 60 of file ProcMgr.h.
References base::ProcMgr::fProc, and base::ProcMgr::NumProc().
base::ProcMgr * base::ProcMgr::instance | ( | ) | [static, inherited] |
Definition at line 34 of file ProcMgr.cxx.
References base::ProcMgr::fInstance.
bool base::ProcMgr::IsRawAnalysis | ( | ) | const [inline, inherited] |
Definition at line 77 of file ProcMgr.h.
References base::ProcMgr::fRawAnalysisOnly.
Referenced by BuildEvent(), and base::ProcMgr::ProduceNextEvent().
base::C1handle TCBMFirstProc::MakeC1 | ( | const char * | name, | |
double | left, | |||
double | right, | |||
base::H1handle | h1 = 0 | |||
) | [virtual] |
Reimplemented from base::ProcMgr.
Definition at line 231 of file TCBMFirstProc.cxx.
base::H1handle TCBMFirstProc::MakeH1 | ( | const char * | name, | |
const char * | title, | |||
int | nbins, | |||
double | left, | |||
double | right, | |||
const char * | xtitle = 0 | |||
) | [virtual] |
Reimplemented from base::ProcMgr.
Definition at line 135 of file TCBMFirstProc.cxx.
base::H2handle TCBMFirstProc::MakeH2 | ( | const char * | name, | |
const char * | title, | |||
int | nbins1, | |||
double | left1, | |||
double | right1, | |||
int | nbins2, | |||
double | left2, | |||
double | right2, | |||
const char * | options = 0 | |||
) | [virtual] |
Reimplemented from base::ProcMgr.
Definition at line 166 of file TCBMFirstProc.cxx.
unsigned base::ProcMgr::NumProc | ( | ) | const [inline, inherited] |
Definition at line 59 of file ProcMgr.h.
References base::ProcMgr::fProc.
Referenced by base::ProcMgr::GetProc().
bool base::ProcMgr::ProduceNextEvent | ( | base::Event *& | evt | ) | [inherited] |
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(), base::ProcMgr::fProc, base::ProcMgr::fTriggers, base::ProcMgr::IsRawAnalysis(), and base::Event::SetTriggerTime().
Referenced by BuildEvent().
void base::ProcMgr::ProvideRawData | ( | const Buffer & | buf | ) | [inherited] |
Method to provide raw data on base of data kind to the processor
Definition at line 78 of file ProcMgr.cxx.
References base::ProcMgr::fMap, base::ProcMgr::MaxBrdId, and base::Buffer::null().
Referenced by BuildEvent().
bool base::ProcMgr::RegisterProc | ( | StreamProc * | proc, | |
unsigned | kind, | |||
unsigned | brdid | |||
) | [inherited] |
Enter processor for processing data of specified kind
Definition at line 47 of file ProcMgr.cxx.
References base::ProcMgr::fMap, base::ProcMgr::fProc, and base::ProcMgr::MaxBrdId.
bool base::ProcMgr::ScanDataForNewTriggers | ( | ) | [inherited] |
Method to produce data for new triggers
Definition at line 313 of file ProcMgr.cxx.
References base::ProcMgr::fProc.
Referenced by BuildEvent().
void base::ProcMgr::ScanNewData | ( | ) | [inherited] |
Let scan new data of all processors
Definition at line 98 of file ProcMgr.cxx.
References base::ProcMgr::fProc.
Referenced by BuildEvent().
static void TCBMFirstProc::SetDfltScript | ( | const char * | name | ) | [inline, static] |
Definition at line 24 of file TCBMFirstProc.h.
References fDfltSetupScript.
Referenced by TCBMAnalysis::TCBMAnalysis().
void base::ProcMgr::SetRawAnalysis | ( | bool | on | ) | [inline, inherited] |
Definition at line 78 of file ProcMgr.h.
References base::ProcMgr::fRawAnalysisOnly.
void base::ProcMgr::SetTimeMasterIndex | ( | unsigned | indx | ) | [inline, inherited] |
Specify processor index, which is used as time reference for all others
Definition at line 84 of file ProcMgr.h.
References base::ProcMgr::fTimeMasterIndex.
void base::ProcMgr::SetTimeSorting | ( | bool | on | ) | [inherited] |
Set sorting flag for all registered processors
Definition at line 69 of file ProcMgr.cxx.
References base::ProcMgr::fProc.
bool base::ProcMgr::SkipAllData | ( | ) | [inherited] |
Method cleanup all queues, used in case of raw analysis
Definition at line 104 of file ProcMgr.cxx.
References base::ProcMgr::fProc.
Referenced by BuildEvent().
int base::ProcMgr::SyncIdDiff | ( | unsigned | id1, | |
unsigned | id2 | |||
) | const [protected, inherited] |
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 base::ProcMgr::SyncIdRange().
Referenced by base::ProcMgr::AnalyzeSyncMarkers().
virtual unsigned base::ProcMgr::SyncIdRange | ( | ) | const [inline, protected, virtual, inherited] |
Definition at line 41 of file ProcMgr.h.
Referenced by base::ProcMgr::SyncIdDiff().
int TCBMFirstProc::TestC1 | ( | base::C1handle | c1, | |
double | value, | |||
double * | dist = 0 | |||
) | [virtual] |
Condition check 0 - inside, -1 left , +1 - right If variable dist specified, will contain distance to left (-1) or right (+1) boundary
Reimplemented from base::ProcMgr.
Definition at line 246 of file TCBMFirstProc.cxx.
TString TCBMFirstProc::fDfltSetupScript = "setup.C" [static, protected] |
Definition at line 16 of file TCBMFirstProc.h.
Referenced by SetDfltScript(), and TCBMFirstProc().
base::ProcMgr * base::ProcMgr::fInstance = 0 [static, protected, inherited] |
Definition at line 39 of file ProcMgr.h.
Referenced by base::ProcMgr::AddProc(), base::ProcMgr::instance(), base::ProcMgr::ProcMgr(), and base::ProcMgr::~ProcMgr().
ProcessorsMap base::ProcMgr::fMap [protected, inherited] |
Definition at line 31 of file ProcMgr.h.
Referenced by base::ProcMgr::ProvideRawData(), and base::ProcMgr::RegisterProc().
long TCBMFirstProc::fNumCbmEvents [protected] |
Definition at line 14 of file TCBMFirstProc.h.
Referenced by BuildEvent(), TCBMFirstProc(), and ~TCBMFirstProc().
long TCBMFirstProc::fNumMbsBufs [protected] |
Definition at line 13 of file TCBMFirstProc.h.
Referenced by BuildEvent(), TCBMFirstProc(), and ~TCBMFirstProc().
ProcessorsVect base::ProcMgr::fProc [protected, inherited] |
Definition at line 30 of file ProcMgr.h.
Referenced by base::ProcMgr::AddProc(), base::ProcMgr::AnalyzeSyncMarkers(), base::ProcMgr::CollectNewTriggers(), base::ProcMgr::GetProc(), base::ProcMgr::NumProc(), base::ProcMgr::ProduceNextEvent(), base::ProcMgr::RegisterProc(), base::ProcMgr::ScanDataForNewTriggers(), base::ProcMgr::ScanNewData(), base::ProcMgr::SetTimeSorting(), base::ProcMgr::SkipAllData(), and base::ProcMgr::~ProcMgr().
bool base::ProcMgr::fRawAnalysisOnly [protected, inherited] |
ignore all events, only single scan, not ouput events
Definition at line 37 of file ProcMgr.h.
Referenced by base::ProcMgr::IsRawAnalysis(), and base::ProcMgr::SetRawAnalysis().
unsigned base::ProcMgr::fTimeMasterIndex [protected, inherited] |
processor index, which time is used for all other subsystems
Definition at line 35 of file ProcMgr.h.
Referenced by base::ProcMgr::AnalyzeSyncMarkers(), base::ProcMgr::CollectNewTriggers(), and base::ProcMgr::SetTimeMasterIndex().
long TCBMFirstProc::fTotalDataSize [protected] |
Definition at line 12 of file TCBMFirstProc.h.
Referenced by BuildEvent(), TCBMFirstProc(), and ~TCBMFirstProc().
GlobalTriggerMarksQueue base::ProcMgr::fTriggers [protected, inherited] |
list of current triggers
Definition at line 33 of file ProcMgr.h.
Referenced by base::ProcMgr::CollectNewTriggers(), and base::ProcMgr::ProduceNextEvent().