stream  0.10.0
stream analysis framework
Public Member Functions
TRootProcMgr Class Reference

Processors manager for using in ROOT environment. More...

#include <root/TRootProcMgr.h>

Inheritance diagram for TRootProcMgr:
base::ProcMgr TFirstStepProcessor

Public Member Functions

 TRootProcMgr ()
 constructor
 
virtual ~TRootProcMgr ()
 destructor
 
virtual bool CreateStore (const char *storename)
 create store
 
virtual bool CloseStore ()
 close store
 
virtual bool CreateBranch (const char *name, const char *class_name, void **obj)
 create branch
 
virtual bool CreateBranch (const char *name, void *member, const char *kind)
 create branch
 
virtual bool StoreEvent ()
 store event
 
bool CallFunc (const char *funcname, void *arg)
 call function
 
- Public Member Functions inherited from base::ProcMgr
 ProcMgr ()
 constructor
 
virtual ~ProcMgr ()
 destructor
 
ProcMgrAddProcessor (Processor *proc)
 add processor
 
void SetSecondName (const std::string &name="second.C")
 Set name of second macro, which executed after first.C. More...
 
void ClearSecondName ()
 Clear name of second macro, will not be executed at all.
 
const std::string & GetSecondName () const
 Returns number of second macro.
 
bool RegisterProc (StreamProc *proc, unsigned kind, unsigned brdid)
 Enter processor for processing data of specified kind.
 
unsigned NumProc () const
 Get number of registered processors.
 
StreamProcGetProc (unsigned n) const
 Get processor by sequence number.
 
StreamProcFindProc (const char *name) const
 Find processor by name. More...
 
void SetHistFilling (int lvl)
 Set histogram fill level for all processors. More...
 
void SetDebug (int lvl=0)
 Set debug level.
 
int GetDebug () const
 Returns debug level.
 
virtual void SetStoreKind (unsigned kind=1)
 Set store kind for all processors. More...
 
virtual bool InternalHistFormat () const
 When returns true, indicates that simple histogram format is used.
 
virtual void AddRunLog (const char *msg)
 Add run log.
 
virtual void AddErrLog (const char *msg)
 Add error log.
 
virtual bool DoLog ()
 Returns true if logging is enabled.
 
virtual void PrintLog (const char *msg)
 print log message
 
virtual void SetSortedOrder (bool=true)
 Set if histograms folders should be created in sorted alphabetical order, default false.
 
virtual bool IsSortedOrder ()
 Returns true if histograms folders created in sorted alphabetical order.
 
virtual H1handle MakeH1 (const char *name, const char *title, int nbins, double left, double right, const char *xtitle=0)
 Creates 1-dimensional histogram. More...
 
virtual bool GetH1NBins (H1handle h1, int &nbins)
 get number of histogram bins
 
virtual void FillH1 (H1handle h1, double x, double weight=1.)
 Fill histogram.
 
virtual double GetH1Content (H1handle h1, int bin)
 get histogram context
 
virtual void SetH1Content (H1handle h1, int bin, double v=0.)
 set histogram content
 
virtual void ClearH1 (H1handle h1)
 Clear 1D histogram.
 
virtual void CopyH1 (H1handle tgt, H1handle src)
 Copy 1D histogram.
 
virtual void SetH1Title (H1handle h1, const char *title)
 Set histogram title.
 
virtual void TagH1Time (H1handle h1)
 Tag histogram time.
 
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)
 Creates 2-dimensional histogram. More...
 
virtual bool GetH2NBins (H2handle h2, int &nbins1, int &nbins2)
 get number of bins for 2D histogram
 
virtual void FillH2 (H2handle h2, double x, double y, double weight=1.)
 Fill 2D histogram.
 
virtual double GetH2Content (H2handle h2, int bin1, int bin2)
 Get content for 2D histogram.
 
virtual void SetH2Content (H2handle h2, int bin1, int bin2, double v=0.)
 Set content for 2D histogram.
 
virtual void ClearH2 (H2handle h2)
 Clear 2D histogram.
 
virtual void SetH2Title (H2handle h1, const char *title)
 Set histogram title.
 
virtual void TagH2Time (H2handle h2)
 Tag histogram time.
 
virtual void ClearAllHistograms ()
 Clear all histograms.
 
virtual C1handle MakeC1 (const char *name, double left, double right, base::H1handle h1=nullptr)
 create condition
 
virtual void ChangeC1 (C1handle c1, double left, double right)
 change condition limits
 
virtual int TestC1 (C1handle c1, double value, double *dist=nullptr)
 Condition check 0 - inside, -1 left , +1 - right If variable dist specified, will contain distance to left (-1) or right (+1) boundary *‍/.
 
virtual double GetC1Limit (C1handle c1, bool isleft=true)
 get condition limit
 
virtual bool RegisterObject (TObject *tobj, const char *subfolder=nullptr)
 method to register ROOT objects, object should be derived from TObject class if returns true, object is registered and will be owned by framework
 
bool IsRawAnalysis () const
 Returns true if raw analysis is configured.
 
void SetRawAnalysis (bool on=true)
 Enable/disable raw analysis. More...
 
bool IsTriggeredAnalysis () const
 Returns true if triggered analysis is configured.
 
void SetTriggeredAnalysis (bool on=true)
 Enabled/disable triggered analysis is configured. More...
 
bool IsStreamAnalysis () const
 Returns true if full timed stream analysis is configured.
 
void SetTimeSorting (bool on)
 Set sorting flag for all registered processors. More...
 
void SetTimeMasterIndex (unsigned indx)
 Specify processor index, which is used as time reference for all others.
 
void ProvideRawData (const Buffer &buf)
 Method to provide raw data on base of data kind to the processor.
 
bool AnalyzeSyncMarkers ()
 Check current sync markers TODO: configure which processor is time master TODO: work with unsynchronized SYNC messages - not always the same id in the front TODO: process not only last sync message.
 
bool CollectNewTriggers ()
 Method to collect triggers. More...
 
bool ScanDataForNewTriggers ()
 Method to produce data for new triggers. More...
 
bool AnalyzeNewData (base::Event *&evt)
 Analyze new data, if triggered analysis configured - immediately produce new event.
 
bool HasTrigEvent () const
 Returns true if trigger even exists.
 
bool AddToTrigEvent (const std::string &name, base::SubEvent *sub)
 add subevent with the name to the trigger event More...
 
bool ProduceNextEvent (base::Event *&evt)
 Very central method - select if possible data for next event. More...
 
virtual bool ProcessEvent (base::Event *evt)
 Process event - consequently calls all event processors.
 
void UserPreLoop (Processor *only_proc=nullptr, bool call_when_running=false)
 pre-loop
 
void UserPostLoop (Processor *only_proc=nullptr)
 post-loop
 

Additional Inherited Members

- Static Public Member Functions inherited from base::ProcMgr
static ProcMgrinstance ()
 Return global instance of processor manager, provided by framework.
 
static void ClearInstancePointer (ProcMgr *mgr=nullptr)
 clear instance pointer
 
static ProcMgrAddProc (Processor *proc)
 add processor to instance
 
- Protected Types inherited from base::ProcMgr
enum  { MaxBrdId = 256 }
 
enum  { NoSyncIndex = 0xfffffffe , DummyIndex = 0xffffffff }
 
typedef std::map< unsigned, StreamProc * > StreamProcMap
 map of stream processors
 
- Protected Member Functions inherited from base::ProcMgr
virtual unsigned SyncIdRange () const
 range for sync messages
 
int SyncIdDiff (unsigned id1, unsigned id2) const
 Method calculated difference id2-id1, used for sync markers identification Sync ID overflow is taken into account. More...
 
void DeleteAllProcessors ()
 Delete all processors.
 
- Protected Attributes inherited from base::ProcMgr
std::string fSecondName
 ! name of second.C script
 
std::vector< StreamProc * > fProc
 ! all stream processors
 
StreamProcMap fMap
 ! map for fast access
 
std::vector< EventProc * > fEvProc
 ! all event processors
 
GlobalMarksQueue fTriggers
 !< list of current triggers
 
unsigned fTimeMasterIndex
 ! processor index, which time is used for all other subsystems
 
AnalysisKind fAnalysisKind
 ! ignore all events, only single scan, not output events
 
TTree * fTree {nullptr}
 ! abstract tree pointer, will be used in ROOT implementation
 
int fDfltHistLevel
 ! default histogram fill level for any new created processor
 
int fDfltStoreKind
 ! default store kind for any new created processor
 
base::EventfTrigEvent {nullptr}
 ! current event, filled when performing triggered analysis
 
int fDebug {0}
 ! debug level
 
- Static Protected Attributes inherited from base::ProcMgr
static ProcMgrfInstance = 0
 ! instance
 

Detailed Description

Processors manager for using in ROOT environment.


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