GSI Object Oriented Online Offline (Go4) GO4-6.4.0
Loading...
Searching...
No Matches
TMeshAnalysis Class Reference

#include <TMeshAnalysis.h>

+ Inheritance diagram for TMeshAnalysis:

Public Member Functions

 TMeshAnalysis ()
 
 TMeshAnalysis (int argc, char **argv)
 
virtual ~TMeshAnalysis ()
 
Int_t UserEventFunc () override
 User defined function which processes the actual analysis.
 
Int_t UserPostLoop () override
 User defined function called once after processing the main event loop.
 
Int_t UserPreLoop () override
 User defined function called once before processing the main event loop.
 
- Public Member Functions inherited from TGo4Analysis
virtual ~TGo4Analysis ()
 destructor
 
Bool_t AddAnalysisCondition (TGo4Condition *con, const char *subfolder=nullptr)
 Puts a new analysis condition object in corresponding list.
 
Bool_t AddAnalysisStep (TGo4AnalysisStep *next)
 Method for user analysis constructor to setup the list of analysis steps.
 
Bool_t AddCanvas (TCanvas *can, const char *subfolder=nullptr)
 Puts a new TCanvas in corresponding folder.
 
Bool_t AddDynamicEntry (TGo4DynamicEntry *entry)
 Set dynamic entry of name "name" to the values specified by external dynamic entry status "state".
 
Bool_t AddDynamicHistogram (const char *name, const char *histo, const char *hevx, const char *hmemx, const char *hevy=nullptr, const char *hmemy=nullptr, const char *hevz=nullptr, const char *hmemz=nullptr, const char *condition=nullptr, const char *cevx=nullptr, const char *cmemx=nullptr, const char *cevy=nullptr, const char *cmemy=nullptr)
 Add (create) new dynamic histogram entry which connects an existing histogram with existing condition and data.
 
Bool_t AddHistogram (TH1 *his, const char *subfolder=nullptr, Bool_t replace=kTRUE)
 Add external histogram to go4 histogram directory.
 
Bool_t AddObject (TNamed *anything, const char *subfolder=nullptr, Bool_t replace=kTRUE)
 Add any external object to the user object folder.
 
Bool_t AddParameter (TGo4Parameter *par, const char *subfolder=nullptr)
 Puts a new parameter object in corresponding folder.
 
Bool_t AddPicture (TGo4Picture *pic, const char *subfolder=nullptr)
 Puts a new picture object in corresponding folder.
 
Bool_t AddTree (TTree *tree, const char *subfolder=nullptr)
 Add reference to a tree in the go4 folder structure.
 
Bool_t AddTreeHistogram (const char *hisname, const char *treename, const char *varexp, const char *cutexp)
 Add Histogram into the dynamic list which is linked to a tree.
 
void AutoSave ()
 Perform autosave of all active stores, save existing calibration objects, write known objects into user file.
 
Bool_t ClearObjects (const char *name)
 Clear (reset) the specified objects.
 
virtual void CloseAnalysis ()
 Finish the analysis run and close all event sources/storages.
 
TGo4AnalysisObjectNamesCreateNamesList ()
 Creates a list of names (keys) of all objects in analysis directories.
 
TGo4ObjectStatusCreateObjectStatus (const char *name, const char *folder=nullptr)
 Find Object of name in the folder structure and create a complete status object of it.
 
TGo4AnalysisStatusCreateStatus ()
 Create a copy of the analysis internal state.
 
TGo4TreeStructureCreateTreeStructure (const char *treename)
 Create a tree structure for a certain tree by name.
 
TGo4AnalysisWebStatusCreateWebStatus ()
 Create a copy of the analysis internal state.
 
void DefineServerPasswords (const char *admin, const char *controller, const char *observer)
 Define passwords, which should be used for analysis access when analysis runs in server mode.
 
Bool_t DeleteObjects (const char *name)
 Delete object of name, or all objects in folder name, respectively.
 
Long64_t ExecuteLine (const char *command, Int_t *errcode=nullptr)
 Process ROOT command line.
 
Long64_t ExecutePython (const char *script_name, Int_t *errcode=nullptr)
 Executes Python script in ROOT interpreter.
 
Long64_t ExecuteScript (const char *script_name)
 Executes ROOT script.
 
TGo4AnalysisClientGetAnalysisClient () const
 Returns pointer on analysis client.
 
TGo4ConditionGetAnalysisCondition (const char *name, const char *cond_cl=nullptr)
 Retrieves an analysis condition from list by name.
 
TGo4AnalysisStepGetAnalysisStep (const char *name)
 Access to certain analysis step by name.
 
TGo4AnalysisStepGetAnalysisStepNum (Int_t number)
 Access to certain analysis step by number.
 
TCanvas * GetCanvas (const char *name)
 Retrieves a TCanvas by name from the Canvases folder.
 
const char * GetDefaultTestFileName () const
 Returns default lmd test file name (in GO4SYS installation directory)
 
Int_t GetDynListInterval () const
 Returns current dynamic list interval.
 
TGo4EventElementGetEventStructure (const char *name) const
 Search reference to event structure in folder.
 
TH1 * GetHistogram (const char *name)
 Search histogram in histogram list (directory).
 
TGo4EventElementGetInputEvent (const char *stepname) const
 Returns the input event structure of analysis step.
 
TGo4EventElementGetInputEvent (Int_t stepindex) const
 Returns the input event structure of analysis step.
 
const char * GetInputFileName () const
 Returns current input file name.
 
const char * GetName () const override
 Return analysis name.
 
TNamed * GetObject (const char *name, const char *folder=nullptr)
 Searches for object by name in all directories.
 
TFolder * GetObjectFolder ()
 Access to top level go4 folder.
 
TGo4EventElementGetOutputEvent () const
 Returns the output event (detector) structure of analysis step.
 
TGo4EventElementGetOutputEvent (const char *stepname) const
 Returns the output event (detector) structure of analysis step.
 
TGo4EventElementGetOutputEvent (Int_t stepindex) const
 Returns the output event (detector) structure of analysis step.
 
TGo4ParameterGetParameter (const char *name, const char *parameter_class=nullptr)
 Retrieves a parameter object by name from the object folder.
 
TGo4PictureGetPicture (const char *name)
 Retrieves a picture object by name from the object folder.
 
TGo4AnalysisSnifferGetSniffer () const
 Returns pointer on current sniffer.
 
TTree * GetTree (const char *name)
 Search tree in tree folder.
 
virtual Bool_t InitEventClasses ()
 Initialization of the event class plugins which are delivered from the user defined event factory.
 
Bool_t IsAutoSaveFileChange () const
 True if autosave file is changed according to the current input file of lmd file list.
 
Bool_t IsAutoSaveFileName () const
 Return kTRUE, if autosave file name set.
 
Bool_t IsAutoSaveOn () const
 True if autosaving is enabled.
 
Int_t IsErrorStopEnabled () const
 True if current analysis step allows stop on error.
 
Bool_t IsInitDone () const
 True if the analysis steps are initialized.
 
Bool_t IsNewInputFile () const
 True if input filelist has changed to a new lmd file.
 
Bool_t IsObjMade () const
 Returns kTRUE if object in last Make... call was created, kFALSE when object was retrieved from autosavefile.
 
Bool_t IsRunning () const
 True if the analysis as controlled by slave process is running.
 
Bool_t IsSortedOrder () const
 Returns true if sub-folders will be created in sorted order.
 
Bool_t LoadObjects (const char *filename=nullptr)
 Load analysis objects from file.
 
Bool_t LoadStatus (const char *filename=nullptr)
 Load Analysis Status from file and set analysis to these settings.
 
Int_t LockAutoSave ()
 Lock the autosave mutex.
 
Int_t MainCycle ()
 The main analysis event cycle.
 
TGo4ShapedCondMakeBoxCond (const char *fullname, Double_t cx, Double_t cy, Double_t a1, Double_t a2, Double_t theta, const char *HistoName=nullptr)
 Create tilted rectangular box shaped polygon condition.
 
TGo4ShapedCondMakeCircleCond (const char *fullname, Int_t npoints, Double_t cx, Double_t cy, Double_t r, const char *HistoName=nullptr)
 Create circular shaped polygon condition.
 
TGo4ShapedCondMakeEllipseCond (const char *fullname, Int_t npoints, Double_t cx, Double_t cy, Double_t a1, Double_t a2, Double_t theta=0., const char *HistoName=nullptr)
 Create ellipse shaped polygon condition.
 
TGo4ShapedCondMakeFreeShapeCond (const char *fullname, Int_t npoints, Double_t(*points)[2], const char *HistoName=nullptr)
 Create free shaped (polygon) condition.
 
TGraph * MakeGraph (const char *fullname, const char *title, Int_t points=0, Double_t *xvalues=nullptr, Double_t *yvalues=nullptr)
 Create a TGraph with initial values as specified by points, xvalues and yvalues.
 
TGraph * MakeGraph (const char *fullname, const char *title, TF1 *function)
 Create a TGraph with values initialized by a function object TF1l.
 
TGo4ListCondMakeListCond (const char *fullname, const char *title, const char *HistoName=nullptr)
 Create "whitlelist" condition with separate values to tes against condition is true if any of the values matches.
 
TGo4ListCondMakeListCond (const char *fullname, const Int_t num, const Int_t *values, const char *HistoName=nullptr)
 Create "whitlelist" condition with separate values to test against condition is true if any of the values matches.
 
TGo4ListCondMakeListCond (const char *fullname, const Int_t start, const Int_t stop, const Int_t step=1, const char *HistoName=nullptr)
 Create "whitlelist" condition with separate values to test against condition is true if any of the values matches.
 
TGo4ParameterMakeParameter (const char *fullname, const char *classname, const char *cmd=nullptr)
 Create parameter of specified class,.
 
TGo4PolyCondMakePolyCond (const char *fullname, Int_t npoints, Double_t(*points)[2], const char *HistoName=nullptr, Bool_t shapedcond=kFALSE)
 Create polygon condition.
 
TGo4RollingGraphMakeRollingGraph (const char *fullname, const char *title, Int_t points=0, Int_t average=1)
 Create a go4 rolling graph (generic trending plot) with properties points and average.
 
TH1 * MakeTH1 (char type, const char *fullname, const char *title, Int_t nbinsx, Double_t xlow, Double_t xup, const char *xtitle=nullptr, const char *ytitle=nullptr)
 Create one dimensional histogram of specified type.
 
TH2 * MakeTH2 (char type, const char *fullname, const char *title, Int_t nbinsx, Double_t xlow, Double_t xup, Int_t nbinsy, Double_t ylow, Double_t yup, const char *xtitle=nullptr, const char *ytitle=nullptr, const char *ztitle=nullptr)
 Create two dimensional histogram of specified type.
 
TGo4WinCondMakeWinCond (const char *fullname, Double_t xmin, Double_t xmax, const char *HistoName=nullptr)
 Create 1D window condition.
 
TGo4WinCondMakeWinCond (const char *fullname, Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax, const char *HistoName=nullptr)
 Create 2D window condition.
 
void Message (Int_t prio, const char *text,...)
 Display a user message.
 
Bool_t NewStepProcessor (const char *name, TGo4EventProcessorParameter *par)
 Shuts down the old analysis step processor and creates a new one specified by parameter par.
 
Bool_t NewStepSource (const char *name, TGo4EventSourceParameter *par)
 Shuts down the old analysis step event source and creates a new one specified by parameter par.
 
Bool_t NewStepStore (const char *name, TGo4EventStoreParameter *par)
 Shuts down the old analysis step storage and creates a new one specified by parameter par.
 
TObject * NextMatchingObject (const char *expr=nullptr, const char *folder=nullptr, Bool_t reset=kFALSE)
 Delivers pointer to next object of the Go4 folder structure with a name matching the expression expr.
 
TGo4AnalysisObjectManagerObjectManager () const
 Returns pointer on analysis object manager.
 
Int_t PostLoop ()
 Method executed once after the main analysis event loop.
 
Int_t PreLoop ()
 Method executed once before the main analysis event loop.
 
void Print (Option_t *opt="") const override
 Printout the analysis (step-) setup.
 
void PrintConditions (const char *expression=nullptr)
 Print all condition counters to the terminal.
 
void PrintDynamicList ()
 Print entries of current dynamic list.
 
void PrintHistograms (const char *expression=nullptr)
 Printout of all histogram statistic counters on the terminal.
 
void PrintParameters (const char *expression=nullptr)
 Printout of all parameters on the terminal.
 
Int_t Process ()
 This method is meant to be called from a go4 cintserver macro in an explicit event loop.
 
void ProcessCrtlCSignal ()
 Method called from Ctrl-C handler.
 
void ProcessEvents ()
 Method should be called to process extra events in the analysis thread context.
 
Bool_t ProtectObjects (const char *name, const Option_t *flags)
 Change protection properties of object name as specified.
 
Bool_t RemoveAnalysisCondition (const char *name)
 Removes analysis condition from list by name.
 
Bool_t RemoveCanvas (const char *name)
 Removes TCanvas by name.
 
Bool_t RemoveDynamicEntry (const char *entryname, const char *listname=nullptr)
 Remove entry of that name from dynamic list of listname.
 
Bool_t RemoveHistogram (const char *name, Bool_t del=kTRUE)
 Removes histogram from histogram dir by name.
 
Bool_t RemoveObject (const char *name, Bool_t del=kTRUE)
 Removes object from user object folder by name.
 
Bool_t RemoveParameter (const char *name)
 Removes parameter by name.
 
Bool_t RemovePicture (const char *name)
 Removes picture by name.
 
Bool_t RemoveTree (TTree *tree, const char *stepname=nullptr)
 Remove reference to a tree in the go4 folder structure.
 
Bool_t ResetBackStores (Bool_t clearflag=kFALSE)
 Clear previous events of backstore tree.
 
Int_t RunImplicitLoop (Int_t times, Bool_t showrate=kFALSE, Double_t process_event_interval=-1., Bool_t iswebserver=kFALSE)
 Processes the UserEventFunc in an implicit loop for "times" times.
 
Bool_t SaveStatus (const char *filename=nullptr)
 Save current analysis settings into file of given name.
 
void SendObjectToGUI (TObject *ob)
 User May send any named object via data channel to the gui.
 
void SetAdministratorPassword (const char *passwd)
 Specify password for administrator account.
 
Bool_t SetAnalysisCondition (const char *name, TGo4Condition *con, Bool_t counter=kTRUE)
 Set existing analysis condition of name to the values of external condition object con.
 
void SetAnalysisName (const char *name)
 Set analysis name.
 
void SetAutoSave (Bool_t on=kTRUE)
 Enable/disable functionality of AutoSave method.
 
void SetAutoSaveFile (const char *filename=nullptr, Bool_t overwrite=kFALSE, Int_t compression=5)
 Set file for autosave action.
 
void SetAutoSaveFileChange (Bool_t on=kTRUE)
 Set analysis in mode where autosave file switches for each new input file.
 
void SetAutoSaveInterval (Int_t interval=0)
 Set time interval (in s) for autosave action.
 
void SetBatchLoopCount (Int_t cnt=-1)
 Set number of event loop count, executed in batch mode.
 
void SetControllerPassword (const char *passwd)
 Specify password for controller account.
 
void SetDynListInterval (Int_t val)
 Set current dynamic list interval.
 
Bool_t SetFirstStep (const char *name)
 Sets analysis step name as first one to be processed in the chain of steps.
 
void SetInputFileName (const char *fname)
 Set current input file name.
 
Bool_t SetLastStep (const char *name)
 Sets analysis step name as last one to be processed in the chain of steps.
 
void SetMakeWithAutosave (Bool_t on=kTRUE)
 Set flag to use data from autosave file in Make... methods (default true)
 
void SetNewInputFile (Bool_t on=kTRUE)
 Set flag that input file has changed.
 
void SetObserverPassword (const char *passwd)
 Specify password for observer account.
 
Bool_t SetParameter (const char *name, TGo4Parameter *par)
 Set existing parameter of name to the values of external parameter object par.
 
Bool_t SetParameterStatus (const char *name, TGo4ParameterStatus *par)
 Set existing parameter of name to the values of external parameter status object.
 
Bool_t SetPicture (const char *name, TGo4Picture *pic)
 Set existing picture of name to the values of external picture object pic.
 
void SetRunning (Bool_t on=kTRUE)
 Switch slave process into running state.
 
void SetSniffer (TGo4AnalysisSniffer *sniff)
 Set pointer on sniffer object.
 
void SetSortedOrder (Bool_t on=kTRUE)
 Configure sorting order for newly created sub-folders.
 
void SetStatus (TGo4AnalysisStatus *state)
 Set all analysis parameters to that of given status object.
 
void SetStepChecking (Bool_t on=kTRUE)
 Enable or disable check of subsequent analysis step for io consistency.
 
Bool_t SetStepStorage (const char *name, Bool_t on)
 Enables analysis step of name to write its output event into its event store.
 
void ShowEvent (const char *stepname, Bool_t isoutput=kTRUE)
 Printout event content of single current event to analysis terminal (using ROOT TTree::Show method).
 
void StartAnalysis ()
 (Re)Start analysis event loop, works in both batch and gui-controlled mode
 
void StartObjectServer (const char *basename, const char *passwd)
 Start the object (histogram) server.
 
void StopAnalysis ()
 Stop analysis event loop, works in both batch and gui-controlled mode.
 
void StopObjectServer ()
 Stop the object (histogram) server.
 
Int_t StoreCondition (const char *name, TGo4Condition *con)
 Write condition con into eventstore of the step specified by name.
 
Int_t StoreFitter (const char *name, TGo4Fitter *fit)
 Write fitter fit into eventstore of the step specified by name.
 
Int_t StoreFolder (const char *stepname, const char *foldername)
 Write registered folder of foldername to the step store of stepname.
 
Int_t StoreFolder (const char *stepname, TFolder *folder)
 Write folder into eventstore of the step specified by name.
 
Int_t StoreParameter (const char *name, TGo4Parameter *par)
 Write object obj into eventstore of the step specified by name.
 
Int_t UnLockAutoSave ()
 UnLock the autosave mutex.
 
void UpdateStatus (TGo4AnalysisStatus *state)
 Create a copy of the analysis internal state.
 
Int_t WaitForStart ()
 Poll on the IsRunning state with sleep delay, returns number of wait cycles.
 
- Public Member Functions inherited from TGo4CommandReceiver
 TGo4CommandReceiver ()
 
virtual ~TGo4CommandReceiver ()
 

Private Attributes

Int_t fEvents {0}
 
Int_t fLastEvent {0}
 
TGo4MbsEventfMbsEvent {nullptr}
 
TMeshParameterfPar {nullptr}
 
TH1D * fSize {nullptr}
 

Additional Inherited Members

- Static Public Member Functions inherited from TGo4Analysis
static Bool_t Exists ()
 check if analysis instance exists
 
static TGo4AnalysisInstance ()
 return analysis instance
 
static Bool_t IsBatchMode ()
 is batch mode
 
static Bool_t IsClientMode ()
 is client mode
 
static Bool_t IsServerMode ()
 is server mode
 
static void SetRunningMode (int mode)
 Set analysis running mode.
 
- Static Public Attributes inherited from TGo4Analysis
static const char * fgcDEFAULTFILENAME = "Go4AutoSave.root"
 standard file name
 
static const char * fgcDEFAULTFILESUF = ".root"
 filename suffix for object file
 
static const char * fgcDEFAULTSTATUSFILENAME = "Go4AnalysisPrefs.root"
 standard file name for analysis settings
 
static const char * fgcPYINIT = "python/go4init.py"
 default name of go4 python init script
 
static const char fgcPYPROMPT = '$'
 leading character indicating python script execution
 
static const Int_t fgiAUTOSAVECOUNTS = 500
 Definition of default autosave interval.
 
static const Int_t fgiDYNLISTINTERVAL = 1000
 This value is the number of events in between subsequent dynamic list processing.
 
static const Int_t fgiMACROSTARTPOLL = 1000
 Time in ms to sleep in the polling loop of the WaitForStart.
 
- Protected Member Functions inherited from TGo4Analysis
 TGo4Analysis (const char *name=nullptr)
 Protected constructor for singleton instance.
 
 TGo4Analysis (int argc, char **argv)
 Another variant for analysis constructor.
 
void Constructor ()
 Method to create all necessary object in the real constructor.
 
Int_t ProcessAnalysisSteps ()
 Process steps.
 
- Protected Attributes inherited from TGo4Analysis
Bool_t fbAutoSaveOn {kFALSE}
 True if Autosaving is enabled (default).
 
Bool_t fbInitIsDone {kFALSE}
 True if analysis framework has been initialized and the event classes are created.
 

Detailed Description

Definition at line 23 of file TMeshAnalysis.h.

Constructor & Destructor Documentation

◆ TMeshAnalysis() [1/2]

TMeshAnalysis::TMeshAnalysis ( )

Definition at line 24 of file TMeshAnalysis.cxx.

References TGo4Analysis::TGo4Analysis(), and TGo4Log::Error().

◆ TMeshAnalysis() [2/2]

TMeshAnalysis::TMeshAnalysis ( int argc,
char ** argv )

◆ ~TMeshAnalysis()

TMeshAnalysis::~TMeshAnalysis ( )
virtual

Definition at line 213 of file TMeshAnalysis.cxx.

References TGo4Log::Info().

Member Function Documentation

◆ UserEventFunc()

Int_t TMeshAnalysis::UserEventFunc ( )
overridevirtual

User defined function which processes the actual analysis.

May be called explicitly from analysis client thread, or may run in an implicit loop provided by method RunImplicit, if analysis works in a non threaded standalone mode. To be overridden in the user analysis class.

Reimplemented from TGo4Analysis.

Definition at line 265 of file TMeshAnalysis.cxx.

References fEvents, fLastEvent, fMbsEvent, fSize, TGo4Log::Info(), and TGo4Analysis::IsNewInputFile().

◆ UserPostLoop()

Int_t TMeshAnalysis::UserPostLoop ( )
overridevirtual

User defined function called once after processing the main event loop.

Optionally.

Reimplemented from TGo4Analysis.

Definition at line 240 of file TMeshAnalysis.cxx.

References fEvents, fLastEvent, fMbsEvent, and TGo4Log::Info().

◆ UserPreLoop()

Int_t TMeshAnalysis::UserPreLoop ( )
overridevirtual

User defined function called once before processing the main event loop.

Optionally.

Reimplemented from TGo4Analysis.

Definition at line 219 of file TMeshAnalysis.cxx.

References TGo4Analysis::AddHistogram(), fEvents, fLastEvent, fMbsEvent, fSize, TGo4Analysis::GetHistogram(), TGo4Analysis::GetInputEvent(), and TGo4Log::Info().

Field Documentation

◆ fEvents

Int_t TMeshAnalysis::fEvents {0}
private

Definition at line 36 of file TMeshAnalysis.h.

Referenced by UserEventFunc(), UserPostLoop(), and UserPreLoop().

◆ fLastEvent

Int_t TMeshAnalysis::fLastEvent {0}
private

Definition at line 37 of file TMeshAnalysis.h.

Referenced by UserEventFunc(), UserPostLoop(), and UserPreLoop().

◆ fMbsEvent

TGo4MbsEvent* TMeshAnalysis::fMbsEvent {nullptr}
private

Definition at line 34 of file TMeshAnalysis.h.

Referenced by UserEventFunc(), UserPostLoop(), and UserPreLoop().

◆ fPar

TMeshParameter* TMeshAnalysis::fPar {nullptr}
private

Definition at line 33 of file TMeshAnalysis.h.

Referenced by TMeshAnalysis().

◆ fSize

TH1D* TMeshAnalysis::fSize {nullptr}
private

Definition at line 35 of file TMeshAnalysis.h.

Referenced by UserEventFunc(), and UserPreLoop().


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