Analysis  version 7.0 - august 2014
RunBase Class Referenceabstract

#include <RunBase.hh>

Inheritance diagram for RunBase:
EventManager GanilRun GEVRunBase SimulRun TreeRun GuiGanilRun GEVSimulRun GEVTreeRun GuiGanilRun GEVSimulRun GEVTreeRun RGuiGanilRun RGuiTreeRun RGuiGanilRun RGuiTreeRun

Public Member Functions

 RunBase ()
 
virtual ~RunBase ()
 
virtual int Open ()=0
 
virtual int Open (const string &f_name)
 
virtual int Open (const u_int f_num, u_int f_sub=0)
 
virtual bool IsOpen ()=0
 
virtual int Close ()=0
 
virtual int RunInit ()=0
 
virtual int ClearEvent ()
 
virtual int ReadEvent ()=0
 
virtual int AnalyseEvent ()
 
virtual int AnalyseEvents (const u_int n)
 
virtual int Init ()
 
virtual void Run ()
 
virtual void Reset ()
 
virtual void FullReset ()
 
string GetWorkDirectory () const
 
void SetWorkDirectory (const string &wd)
 
virtual Int_t GetTotalEventCount () const
 
virtual Int_t GetEventCount () const
 
virtual Int_t GetFileCount () const
 
virtual bool IsRunInit () const
 
virtual bool IsRunStarted () const
 
virtual bool IsRunStopped () const
 
virtual void SetFileMode (const Int_t mode)
 
virtual void SetFileName (const string &f_name)
 
virtual void SetFilePattern (const string &pattern)
 
virtual void SetFilePatternLen (const u_int len)
 
virtual void SetFileNumbers (const string &f_num)
 
virtual Int_t SetFileListNames ()
 
virtual Int_t GetFileMode () const
 
virtual string GetFileName () const
 
virtual string GetFilePattern () const
 
virtual Int_t GetFilePatternLen () const
 
virtual string GetFileNumbers () const
 
virtual Int_t GetFileNumber () const
 
virtual Int_t TapeRewind ()
 
virtual Int_t TapeForward (const Int_t n=1)
 
virtual Int_t TapeBackward (const Int_t n=1)
 
virtual int UserEventDefine ()
 
virtual int UserRunStart ()
 
virtual int UserEvent ()
 
virtual int UserUpdate ()
 
virtual int UserRunStop ()
 
 ClassDef (RunBase, 0)
 
- Public Member Functions inherited from EventManager
 EventManager ()
 
virtual ~EventManager ()
 
u_int ParamNumber () const
 
u_int SpecNumber () const
 
u_int TreeNumber () const
 
u_int ContourNumber () const
 
u_int FilterNumber () const
 
const EventGetEventPtr () const
 
const TreeListGetTreeListPtr () const
 
const SpectrumListGetSpectrumListPtr () const
 
const FilterListGetFilterListPtr () const
 
const RContourList * GetContourListPtr () const
 
EventGetEventPtr ()
 
TreeListGetTreeListPtr ()
 
SpectrumListGetSpectrumListPtr ()
 
FilterListGetFilterListPtr ()
 
RContourList * GetContourListPtr ()
 
virtual const ParamGetParamPtr (const u_int n) const
 
virtual const ParamGetParamPtr (const string &par_name) const
 
virtual string GetParamName (const u_int n) const
 
virtual int GetParamIndex (const string &par_name) const
 
virtual int GetParamDimension (const u_int n) const
 
virtual int GetParamDimension (const string &par_name) const
 
virtual TreeInfoGetTreePtr (const u_int t_num) const
 
virtual TreeInfoGetTreePtr (const string &t_name) const
 
virtual int GetTreeIndex (const string &t_name) const
 
virtual SpectrumGetSpectrumPtr (const u_int num) const
 
virtual SpectrumGetSpectrumPtr (const string &spec_name) const
 
virtual int GetSpectrumIndex (const string &spec_name) const
 
virtual string GetSpectrumName (const u_int spec_num) const
 
TH1 * GetHistoPtr (const u_int num) const
 
TH1 * GetHistoPtr (const string &spec_name) const
 
virtual RContour * GetContourPtr (const string &cname) const
 
virtual RContour * GetContourPtr (const u_int cnum) const
 
virtual int GetContourIndex (const string &cname) const
 
virtual string GetContourName (const u_int cnum) const
 
virtual FilterGetFilterPtr (const string &fname) const
 
virtual FilterGetFilterPtr (const u_int fnum) const
 
virtual int GetFilterIndex (const string &fname) const
 
virtual string GetFilterName (const u_int fnum) const
 
virtual int AddParam (const Param &par)
 
virtual int AddParamSingle (const string &par_name, const Data &d=DataUI2(0))
 
virtual int AddParamArray (const string &par_name, const u_int dim, const Data &d=DataUI2(0))
 
virtual int AddParamMultihit (const string &par_name, const Data &d=DataUI2(0))
 
const DataGetParamDefaultValue (const u_int num)
 
const DataGetParamDefaultValue (const string &par_name)
 
bool SetParamDefaultValue (const u_int num, const Data &d)
 
bool SetParamDefaultValue (const string &par_name, const Data &d)
 
const DataGetParam (const u_int num)
 
const DataGetParam (const string &par_name)
 
const DataGetParam (const u_int num, const u_int index)
 
const DataGetParam (const string &par_name, const u_int index)
 
template<class T >
const DataSetParam (const u_int num, const T &val)
 
template<class T >
const DataSetParam (const string &par_name, const T &val)
 
template<class T >
const DataSetParam (const u_int num, const u_int index, const T &val)
 
template<class T >
const DataSetParam (const string &par_name, const u_int index, const T &val)
 
virtual int AddTree (const string &t_name, const string &f_name="", const UInt_t n_max=0)
 
virtual int InitTree (const string &t_name)
 
virtual int InitTree (const int t_num=-1)
 
virtual bool RemoveTree (const TreeInfo *t_ptr)
 
virtual bool RemoveTree (const u_int t_num)
 
virtual bool RemoveTree (const string &t_name)
 
virtual void RemoveAllTrees ()
 
virtual Int_t SetTreeFile (const int t_num, const string &f_name, const UInt_t n_max=0)
 
virtual string GetTreeFile (const int t_num) const
 
virtual string GetTreeFileName (const int t_num) const
 
virtual UInt_t GetTreeFileMode (const int t_num) const
 
virtual Int_t SetTreeFile (const string &t_name, const string &f_name, const UInt_t n_max=0)
 
virtual string GetTreeFile (const string &t_name) const
 
virtual string GetTreeFileName (const string &t_name) const
 
virtual UInt_t GetTreeFileMode (const string &t_name) const
 
virtual Bool_t AddTreeParam (const int t_num, const Param *p_ptr)
 
virtual Bool_t AddTreeParam (const int t_num, const string &p_name)
 
virtual Bool_t AddTreeParam (const int t_num, const Int_t p_num)
 
virtual Int_t AddTreeParamRange (const int t_num, const Int_t p1, const Int_t p2)
 
virtual Int_t AddTreeAllParam (const int t_num)
 
virtual Bool_t AddTreeParam (const string &t_name, const Param *p_ptr)
 
virtual Bool_t AddTreeParam (const string &t_name, const string &p_name)
 
virtual Bool_t AddTreeParam (const string &t_name, const Int_t p_num)
 
virtual Int_t AddTreeParamRange (const string &t_name, const Int_t p1, const Int_t p2)
 
virtual Int_t AddTreeAllParam (const string &t_name)
 
virtual void OpenTreeList (const Int_t m=-1) const
 
virtual void CloseTreeList (const Int_t m=-1) const
 
virtual Bool_t OpenTree (const int t_num) const
 
virtual Bool_t OpenTree (const string &t_name) const
 
virtual Bool_t CloseTree (const int t_num) const
 
virtual Bool_t CloseTree (const string &t_name) const
 
virtual Bool_t IsTreeOpen (const int t_num) const
 
virtual Bool_t IsTreeOpen (const string &t_name) const
 
virtual Bool_t IsTreeClosed (const int t_num) const
 
virtual Bool_t IsTreeClosed (const string &t_name) const
 
bool StartTree (const int t_num=-1) const
 
bool StopTree (const int t_num=-1) const
 
bool SuspendTree (const int t_num=-1) const
 
bool StartTree (const string &t_name) const
 
bool StopTree (const string &t_name) const
 
bool SuspendTree (const string &t_name) const
 
virtual int LoadTreeList (const string &filename, const bool append=true)
 
virtual int SaveTreeList (const string &filename) const
 
int AddSpecMono (const string &spec_name, const u_int par_num, const u_int nx, const double x1, const double x2, const string &family_name="")
 
int AddSpecMono (const string &spec_name, const string &par_name, const u_int nx, const double x1, const double x2, const string &family_name="")
 
int AddSpecBidim (const string &spec_name, const u_int par_num_x, const u_int nx, const double x1, const double x2, const u_int par_num_y, const u_int ny, const double y1, const double y2, const string &family_name="")
 
int AddSpecBidim (const string &spec_name, const string &par_name_x, const u_int nx, const double x1, const double x2, const string &par_name_y, const u_int ny, const double y1, const double y2, const string &family_name="")
 
int AddSpecTridim (const string &spec_name, const u_int par_num_x, const u_int nx, const double x1, const double x2, const u_int par_num_y, const u_int ny, const double y1, const double y2, const u_int par_num_z, const u_int nz, const double z1, const double z2, const string &family_name="")
 
int AddSpecTridim (const string &spec_name, const string &par_name_x, const u_int nx, const double x1, const double x2, const string &par_name_y, const u_int ny, const double y1, const double y2, const string &par_name_z, const u_int nz, const double z1, const double z2, const string &family_name="")
 
int AddSpecDistrib (const string &spec_name, const u_int par_num, const double x1, const double x2, const string &family_name="")
 
int AddSpecDistrib (const string &spec_name, const string &par_name, const double x1, const double x2, const string &family_name="")
 
int AddSpecTrace (const string &spec_name, const u_int par_num, const double x1, const double x2, const string &family_name="")
 
int AddSpecTrace (const string &spec_name, const string &par_name, const double x1, const double x2, const string &family_name="")
 
int AddSpecCumul (const string &spec_name, const u_int par_num_x, const double x1, const double x2, const u_int ny, const double y1, const double y2, const string &family_name="")
 
int AddSpecCumul (const string &spec_name, const string &par_name_x, const double x1, const double x2, const u_int ny, const double y1, const double y2, const string &family_name="")
 
int AddSpecHisto (TH1 &h, const string &family_name="")
 
int AddSpecExtern (const string &h_name, const string &f_name, const string &s_name="", const string &family_name="")
 
int AddSpecUser1D (const string &spec_name, const u_int nx, const double x1, const double x2, const string &family_name="")
 
int AddSpecUser2D (const string &spec_name, const u_int nx, const double x1, const double x2, const u_int ny, const double y1, const double y2, const string &family_name="")
 
int AddSpecNorm (const string &spec_name, const string &oper_name, const double norm=1., const string &family_name="")
 
int AddSpecSqrt (const string &spec_name, const string &oper_name, const double c0=1., const double c1=0., const string &family_name="")
 
int AddSpecInv (const string &spec_name, const string &oper_name, const double c0=1., const double c1=0., const double c2=0., const string &family_name="")
 
int AddSpecSum (const string &spec_name, const string &oper0_name, const string &oper1_name, const double c0=1., const double c1=1., const double c2=0., const string &family_name="")
 
int AddSpecProd (const string &spec_name, const string &oper0_name, const string &oper1_name, const double c0=1., const double c1=1., const string &family_name="")
 
int AddSpecDiv (const string &spec_name, const string &oper0_name, const string &oper1_name, const double c0=1., const double c1=1., const double c2=0., const string &family_name="")
 
int AddSpecSumN (const string &spec_name, const Int_t oper_num, Spectrum **oper_tab, const string &family_name="")
 
int AddSpecSumN (const string &spec_name, const string &oper_names, const string &family_name="")
 
int AddSpecHSum (const string &spec_name, const string &src_name, const string &family_name="")
 
int AddSpecHSum (const string &spec_name, const Int_t src_num, const string &family_name="")
 
int AddSpecHSum (const string &spec_name, const TH1 *src_histo, const string &family_name="")
 
int AddSpecHMean (const string &spec_name, const string &src_name, const string &family_name="")
 
int AddSpecHMean (const string &spec_name, const Int_t src_num, const string &family_name="")
 
int AddSpecHMean (const string &spec_name, const TH1 *src_histo, const string &family_name="")
 
int AddSpecHCumul (const string &spec_name, const string &src_name, const u_int ny, const double y1, const double y2, const string &family_name="")
 
int AddSpecHCumul (const string &spec_name, const Int_t src_num, const u_int ny, const double y1, const double y2, const string &family_name="")
 
int AddSpecHCumul (const string &spec_name, const TH1 *src_histo, const u_int ny, const double y1, const double y2, const string &family_name="")
 
virtual bool User1DIncrement (const string &spec_name, const Double_t x, const Double_t incr=1.)
 
virtual bool User1DSetValue (const string &spec_name, const Double_t x, const Double_t val)
 
virtual bool User1DIncrement (const u_int spec_num, const Double_t x, const Double_t incr=1.)
 
virtual bool User1DSetValue (const u_int spec_num, const Double_t x, const Double_t val)
 
virtual bool User1DIncrement (const string &spec_name, const Int_t ix, const Double_t incr=1.)
 
virtual bool User1DSetValue (const string &spec_name, const Int_t ix, const Double_t val)
 
virtual bool User1DIncrement (const u_int spec_num, const Int_t ix, const Double_t incr=1.)
 
virtual bool User1DSetValue (const u_int spec_num, const Int_t ix, const Double_t val)
 
virtual bool User2DIncrement (const string &spec_name, const Double_t x, const Double_t y, const Double_t incr=1.)
 
virtual bool User2DSetValue (const string &spec_name, const Double_t x, const Double_t y, const Double_t val)
 
virtual bool User2DIncrement (const u_int spec_num, const Double_t x, const Double_t y, const Double_t incr=1.)
 
virtual bool User2DSetValue (const u_int spec_num, const Double_t x, const Double_t y, const Double_t val)
 
virtual bool User2DIncrement (const string &spec_name, const Int_t ix, const Int_t iy, const Double_t incr=1.)
 
virtual bool User2DSetValue (const string &spec_name, const Int_t ix, const Int_t iy, const Double_t val)
 
virtual bool User2DIncrement (const u_int spec_num, const Int_t ix, const Int_t iy, const Double_t incr=1.)
 
virtual bool User2DSetValue (const u_int spec_num, const Int_t ix, const Int_t iy, const Double_t val)
 
virtual bool RemoveSpectrum (const Spectrum *spec_ptr, const bool force=true)
 
virtual bool RemoveSpectrum (const u_int spec_num, const bool force=true)
 
virtual bool RemoveSpectrum (const string &spec_name, const bool force=true)
 
virtual void RemoveAllSpectra (const bool force=false)
 
virtual bool SetSpectrumSaveProtection (Spectrum *spec_ptr, const bool b=true)
 
virtual bool SetSpectrumSaveProtection (const string &spec_name, const bool b=true)
 
virtual bool SetSpectrumSaveProtection (const u_int spec_num, const bool b=true)
 
virtual bool SetSpectrumDeleteProtection (Spectrum *spec_ptr, const bool b=true)
 
virtual bool SetSpectrumDeleteProtection (const string &spec_name, const bool b=true)
 
virtual bool SetSpectrumDeleteProtection (const u_int spec_num, const bool b=true)
 
virtual bool RenameSpectrum (const u_int num, const string &name, const string &name_x="", const string &name_y="", const string &name_z="")
 
virtual bool RenameSpectrum (const string &spec_name, const string &name, const string &name_x="", const string &name_y="", const string &name_z="")
 
bool StartSpectrum (const int num=-1) const
 
bool StopSpectrum (const int num=-1) const
 
bool SuspendSpectrum (const int num=-1) const
 
bool ResetSpectrum (const int num=-1) const
 
bool StartSpectrum (const string &spec_name) const
 
bool StopSpectrum (const string &spec_name) const
 
bool SuspendSpectrum (const string &spec_name) const
 
bool ResetSpectrum (const string &spec_name) const
 
virtual void IncrementSpectra () const
 
bool SetSpectrumFamily (const string &spec_name, const string &family_name)
 
bool SetSpectrumFamily (const u_int spec_num, const string &family_name)
 
bool ResetSpectrumFamily (const string &spec_name)
 
bool ResetSpectrumFamily (const u_int spec_num)
 
bool StartFamily (const string &family_name)
 
bool StopFamily (const string &family_name)
 
bool SuspendFamily (const string &family_name)
 
bool ResetFamily (const string &family_name)
 
virtual void DumpEvent (const bool all=false, const u_int pmin=0, const u_int pmax=0) const
 
virtual void DumpEvent (const string &file_name, const bool all=false, const u_int pmin=0, const u_int pmax=0) const
 
virtual void DumpEvent (ostream &os, const bool all=false, const u_int pmin=0, const u_int pmax=0) const
 
virtual void PrintEvent () const
 
virtual void PrintEvent (const string &file_name) const
 
virtual void PrintEvent (ostream &os) const
 
virtual void PrintSpecList () const
 
virtual void PrintSpecList (const string &) const
 
virtual void PrintSpecList (ostream &os) const
 
virtual void PrintFamily (const string &family_name)
 
virtual void PrintFamily (ostream &os, const string &family_name)
 
virtual void PrintFamily (const string &file_name, const string &family_name)
 
virtual int LoadSpectraList (const string &filename, const bool append=true)
 
virtual int SaveSpectraList (const string &filename) const
 
virtual int SaveSelectedSpectra (const string &filename) const
 
virtual int SaveHistograms (const string &file_name) const
 
virtual int SaveSelectedHistograms (const string &file_name) const
 
virtual int SaveFamilyHistograms (const string &file_name, const string &family_name) const
 
virtual void RejectEvent ()
 
virtual int AddContour (const string &ct_name, RContourBase &ct)
 
virtual int AddContour (RContour &ct)
 
virtual bool RemoveContour (const string &ct_name, const bool force=true)
 
virtual bool RemoveContour (const int ct_num, const bool force=true)
 
virtual bool RemoveContour (const RContour *ct, const bool force=true)
 
virtual void RemoveAllContours ()
 
virtual int LoadContourList (const string &filename, const bool append=true)
 
virtual int SaveContourList (const string &filename) const
 
virtual int AddFilter (const string &f_name, FilterBase &f)
 
virtual int AddFilter (Filter *f)
 
virtual bool RemoveFilter (Filter *f, const bool force=true)
 
virtual bool RemoveFilter (const string &f_name, const bool force=true)
 
virtual bool RemoveFilter (const int f_num, const bool force=true)
 
virtual void RemoveAllFilters ()
 
virtual int AddFilterFalse (const char *f_name)
 
virtual int AddFilterTrue (const char *f_name)
 
virtual int AddFilterNot (const char *f_name, const char *fnot_name)
 
virtual int AddFilterAnd (const char *f_name, const char *f1_name, const char *f2_name)
 
virtual int AddFilterOr (const char *f_name, const char *f1_name, const char *f2_name)
 
virtual int AddFilterXOr (const char *f_name, const char *f1_name, const char *f2_name)
 
virtual int AddFilterMultiAnd (const char *f_name, const char *fl_names)
 
virtual int AddFilterMultiOr (const char *f_name, const char *fl_names)
 
virtual int AddFilterGate (const char *f_name, const char *p_name, const double pmin, const double pmax, const int mode=filterMultiParAnd)
 
virtual int AddFilterContour (const char *f_name, const char *c_name, const char *x_name, const char *y_name, const bool inv=false, const int mode=filterMultiParAnd)
 
virtual int AddFilterContour (const char *f_name, const char *c_name, const char *x_name, const bool inv=false, const int mode=filterMultiParAnd)
 
virtual int LoadFilterList (const string &filename, const bool append=true)
 
virtual int SaveFilterList (const string &filename) const
 
virtual bool FilterSpectrum (const int sp_num, const string &f_name="")
 
virtual bool FilterSpectrum (const string &sp_name, const string &f_name="")
 
virtual bool FilterFamily (const string &family_name, const string &f_name="")
 
virtual bool FilterTree (const int t_num, const string &f_name="")
 
virtual bool FilterTree (const string &t_name, const string &f_name="")
 
virtual bool CheckFilter (const string &f_name)
 
virtual bool CheckFilter (const u_int f_num)
 
virtual bool CheckFilter (const Filter *f)
 
 ClassDef (EventManager, 0)
 

Protected Member Functions

 RunBase (const RunBase &original)
 
virtual int RunStart ()
 
virtual int RunStop ()
 
virtual void AnalysisStart ()
 
virtual void AnalysisStop ()
 
virtual void RunTape ()
 
virtual void RunFile ()
 
virtual void RunList ()
 
virtual void IncrementEventCount ()
 
virtual void IncrementFileCount ()
 
- Protected Member Functions inherited from EventManager
 EventManager (const EventManager &)
 

Protected Attributes

string work_dir
 répertoire de base du programme
 
bool run_init
 test si l'initialisation est effectuée
 
bool run_started
 test si un run est en cours
 
Int_t file_mode
 mode de sélection des fichiers
 
string file_name
 nom effectif du fichier d'entrée
 
string file_pattern
 format de recherche des fichiers runs par leur numéro
 
u_int file_pattern_len
 longueur du format de numéro de run
 
string file_numbers
 numéro des fichiers de runs
 
Int_t file_num
 numéro du fichier traité
 
Int_t file_sub_num
 numéro secondaire du fichier traité
 
GStringList file_list
 liste des fichiers validant le format
 
bool file_list_changed
 indique s'il faut redéterminer la liste de fichiers
 
Int_t file_count
 nombre de fichiers lus
 
Int_t event_count
 nombre d'événements lus dans le fichier
 
Int_t total_event_count
 nombre d'événements lus total
 
- Protected Attributes inherited from EventManager
Event event
 Structure physique de l'événement.
 
TreeList tree_list
 Liste des arbres de l'analyse.
 
SpectrumList spec_list
 Liste des spectres de l'analyse.
 
FilterList filter_list
 Liste des filtres de l'analyse.
 

Private Types

enum  FileMode { runTape = 0, runFile = 1, runList = 2 }
 Type de fichiers source.
 

Private Member Functions

 GObjectV (RunBase)
 

Detailed Description

Classe de base pour créer des analyses de données. Elle hérite d'un gestionnaire d'événements (EventManager) et définit les fonctions de base (le plus souvent purement virtuelles) liées à la lecture des événements.

Ces fonctions concernent l'analyse elle-même:

  • initialisation de la structure d'événement (RunInit)
  • ouverture et fermeture des flux d'entrée (Open, Close)
  • lecture d'événements (ReadEvent (abstraite) et AnalyseEvent)
  • analyse: ensemble d'événements dans un fichier (AnalyseEvents) ou ensemble de fichiers (Run)

et les fonctions utilisateur associées:

  • UserEventDefine: définition des paramètres utilisateur additionnels
  • UserRunStart: début d'analyse d'un nouveau fichier
  • UserEvent: traitement utilisateur d'un événement
  • UserUpdate: fonction après traitement de l'événement et mise à jour des spectres
  • UserRunStop: fin d'analyse d'un fichier

Le fonctions utilisateur doivent retourner une valeur nulle si tout va bien, une valeur négative en cas de problème et une valeur positive pour interrompre l'analyse.

Fonctions abstraites:

Les fonctions suivantes doivent impérativement être définies dans les classes dérivées:

  • int Open ( const string &f_name );
    elle doit appeler la fonction RunStart();
  • bool IsOpen ( );
  • int Close ( );
    elle doit appeler la fonction RunStop();
  • int RunInit ( );
  • int ReadEvent ( );
Squelette de l'analyse:

Traitement partiel d'événements

  • création d'une instance héritant de RunBase
  • initialisation avec Init
    • RunInit (fonction abstraite)
    • UserEventDefine
  • ouverture d'un fichier: Open (fonction abstraite)
    • appel à RunStart si nécessaire
      • IncrementFileCount
      • UserRunStart
  • traitement d'événements AnalyseEvents
    • traitement de chaque événement AnalyseEvent
      • ReadEvent
      • IncrementEventCount
      • UserEvent
      • IncrementSpectra
      • UserUpdate
  • fermeture du fichier: Close (fonction abstraite)
    • appel à RunStop
      • UserRunStop

Traitement d'une série de fichiers

  • préparation de l'analyse (détermination des fichiers d'entrée)
    • SetFileMode,
    • SetFileName,
    • SetFilePattern, SetFilePatternLen, SetFileNumbers,
  • execution
    • appel à Run, qui utilise:
      • Init
        • RunInit (fonction abstraite)
        • UserEventDefine
      • Open (fonction abstraite)
      • AnalyseEvents
      • Close (fonction abstraite)

Constructor & Destructor Documentation

RunBase::RunBase ( const RunBase original)
protected

Constructeur de recopie: il ne recopie pas (non implémenté)...

Parameters
originalinstance à recopier
RunBase::~RunBase ( )
virtual

Destructeur.

References file_list.

Member Function Documentation

RunBase::GObjectV ( RunBase  )
private

Macro from GCpp library that defines the following functions:

  • ClassName(): return the real class name of the object
  • StaticClassName(): return the used class name of the object (that may be a base class of the real object).
  • IsInstanceOf<T>(): return true if the current object is an instance of the template class name argument
  • Clone(): return an allocated copy of the object.
virtual int RunBase::Open ( )
pure virtual

Ouverture effective du fichier de run (file_name). La fonction retourne 0 si le fichier est ouvert, une valeur négative en cas de problème, et une valeur positive s'il faut interrompre l'exécution. La fonction doit appeler RunStart ( );

Implemented in SimulRun, GanilRun, and TreeRun.

Referenced by GEVRunBase::EventLoop(), GanilRun::Open(), Open(), GEVRunBase::OpenNext(), RunFile(), TreeRun::RunInit(), GanilRun::RunInit(), and RunList().

int RunBase::Open ( const string &  f_name)
virtual

Ouverture du fichier de run par son nom.

Parameters
f_namenom du fichier

Reimplemented in SimulRun, and GanilRun.

References file_name, file_num, Open(), and work_dir.

int RunBase::Open ( const u_int  f_num,
u_int  f_sub = 0 
)
virtual

Ouverture d'un fichier de run par son numéro de fichier. La fonction utilise les champs file_pattern et file_pattern_len pour générer le nom de fichier et l'ouvrir. La fonction retourne 0 si le fichier est ouvert, une valeur négative en cas de problème, et une valeur positive s'il faut interrompre l'exécution.

Parameters
f_numnuméro du fichier
f_subsous-numéro de fichier

References file_list, file_list_changed, file_name, file_num, file_pattern, file_pattern_len, file_sub_num, Open(), SetFileListNames(), and work_dir.

virtual bool RunBase::IsOpen ( )
pure virtual

Fonction qui retourne vrai si un fichier en cours d'analyse est ouvert.

Implemented in SimulRun, GanilRun, and TreeRun.

Referenced by AnalyseEvents(), GEVRunBase::EventLoop(), GEVRunBase::OpenNext(), GEVRunBase::ResetAnalButtonClicked(), GEVRunBase::ResetFileList(), and Run().

virtual int RunBase::Close ( )
pure virtual

Fermeture du fichier en cours d'analyse. La fonction retourne 0 si le fichier est fermé, une valeur négative en cas de problème, et une valeur positive s'il faut interrompre l'exécution. La fonction doit appeler RunStop ( );

Implemented in SimulRun, GanilRun, and TreeRun.

Referenced by GEVRunBase::EventLoop(), GEVRunBase::OpenNext(), GEVRunBase::ResetAnalButtonClicked(), GEVRunBase::ResetFileList(), RunFile(), and RunList().

virtual int RunBase::RunInit ( )
pure virtual

Initialisation de l'analyse: cette fonction a pour objectif de créer la structure d'événement. Elle doit ensuite faire appel à la fonction utilisateur UserEventDefine pour l'ajout de paramètres supplémentaires.

Implemented in SimulRun, GanilRun, and TreeRun.

Referenced by Init(), and GEVRunBase::MenuAnalysisInit().

int RunBase::ClearEvent ( )
virtual

Function that clears the event (before reading a new one)

References SpectrumList::ClearEvent(), and EventManager::spec_list.

Referenced by TreeRun::ReadEvent(), and GanilRun::ReadEvent().

virtual int RunBase::ReadEvent ( )
pure virtual

Lecture d'un événement: cette méthode doit être redéfinie dans les classes dérivées. La fonction mets à jour l'ensemble des paramètres de la structure d'événements à partir d'un événement lu dans le flux d'entrée. La fonction retourne 0 si la lecture s'est bien passée, et -1 en cas de fin de fichier.

Implemented in SimulRun, GanilRun, and TreeRun.

Referenced by AnalyseEvent().

int RunBase::AnalyseEvent ( )
virtual

Fonction de traitement complet d'un événement: lecture de l'événement, appel à la fonction utilisateur UserEvent, mise à jour des spectres et appel à la fonction UserUpdate. La fonction retourne 0 si tout s'est bien passé, -1 en cas de fin fichier.

References IncrementEventCount(), EventManager::IncrementSpectra(), ReadEvent(), run_started, UserEvent(), and UserUpdate().

Referenced by SimulRun::AnalyseEvents(), AnalyseEvents(), and GEVRunBase::EventLoop().

int RunBase::AnalyseEvents ( const u_int  n)
virtual

Lecture d'un ensemble d'événements dans le flux (qui doit être déjà ouvert). Si le nombre d'événements demandés est 0, tous les événements sont lus. La fonction retourne le nombre d'événements effectivement lus (positif), et une valeur négative en cas de problème. Si la valeur positive (ou nulle) retournée est inférieure à la valeur demandée, c'est qu'il n'a pas été possible d'en lire plus: fin de fichier ou d'analyse.

Parameters
nnombre d'événements à lire

Reimplemented in SimulRun.

References AnalyseEvent(), and IsOpen().

Referenced by RunFile(), and RunList().

int RunBase::Init ( )
virtual

Fonction d'initialisation. Cette fonction appelle l'initialisation générale et la fonction utilisateur UserEventDefine. Elle positionne la variable run_init. La fonction retourne 0 si l'initialisation s'est bien passée.

References EventManager::event, run_init, RunInit(), and UserEventDefine().

Referenced by Run().

void RunBase::Run ( )
virtual

Exécution d'une analyse complète à partir du type de fichiers source et des données associées (nom de fichier, liste de numéros de fichier, etc. ).

Reimplemented in GEVRunBase.

References file_mode, Init(), IsOpen(), EventManager::ParamNumber(), run_init, RunFile(), RunList(), and RunTape().

void RunBase::Reset ( )
virtual
void RunBase::FullReset ( )
virtual

Remise à zéro complète des structures de l'analyse: structure d'événement, spectres...

Reimplemented in GEVRunBase.

Referenced by GEVRunBase::FullReset().

int RunBase::RunStart ( )
protectedvirtual

Fonction générale appelée en début de fichier de run, après ouverture du fichier. Elle initialise les compeurs liés à chaque run. C'est cette fonction qui appelle la fonction utilsateur UserRunStart, dont elle renvoit le résultat.

References AnalysisStart(), event_count, file_name, file_num, file_sub_num, FileBaseName(), IncrementFileCount(), TreeList::OpenList(), run_started, TreeList::SetFileBase(), TreeList::SetFileNumber(), EventManager::tree_list, and UserRunStart().

Referenced by TreeRun::FileOpen(), GanilRun::FileOpen(), and SimulRun::FileOpen().

int RunBase::RunStop ( )
protectedvirtual

Fonction généraleappelée en fin de fichier de run, avant la fermeture du fichier. C'est cette fonction qui appelle la fonction utilsateur UserRunStop, dont elle renvoit le résultat.

References AnalysisStop(), TreeList::CloseList(), run_started, EventManager::tree_list, and UserRunStop().

Referenced by TreeRun::Close(), GanilRun::Close(), and SimulRun::Close().

void RunBase::AnalysisStart ( )
inlineprotectedvirtual

Function called at run start, before user function, for specific actions from derived classes.

Referenced by RunStart().

void RunBase::AnalysisStop ( )
inlineprotectedvirtual

Function called at run stop, after user function for specific actions from derived classes.

Referenced by RunStop().

void RunBase::RunTape ( )
protectedvirtual

Fonction de traitement d'une série de fichiers sur bande magnétique.

References file_num, and file_numbers.

Referenced by Run().

void RunBase::RunFile ( )
protectedvirtual

Fonction de traitement d'un fichier unique sur disque.

References AnalyseEvents(), Close(), file_name, file_num, and Open().

Referenced by Run().

void RunBase::RunList ( )
protectedvirtual

Fonction de traitement d'une série de fichiers sur disque.

cerr << "RunBase::RunList ( ): next: " << fnext << endl;

References AnalyseEvents(), Close(), file_numbers, file_sub_num, GetFileName(), and Open().

Referenced by Run().

void RunBase::IncrementEventCount ( )
inlineprotectedvirtual

Incrémente le nombre d'événements lus.

References event_count, and total_event_count.

Referenced by AnalyseEvent().

void RunBase::IncrementFileCount ( )
inlineprotectedvirtual

Incrémente le nombre de fichiers lus.

References file_count.

Referenced by RunStart().

string RunBase::GetWorkDirectory ( ) const
inline

Return the work directory.

References work_dir.

void RunBase::SetWorkDirectory ( const string &  wd)
inline

Set the working directory.

Parameters
wdname of the directory

References work_dir.

Int_t RunBase::GetTotalEventCount ( ) const
inlinevirtual

Retourne le nombre total d'événements lus.

References total_event_count.

Referenced by GEVRunBase::EventLoop(), RGuiTreeRun::UserRunStop(), and RGuiGanilRun::UserRunStop().

Int_t RunBase::GetEventCount ( ) const
inlinevirtual

Retourne le nombre d'événements lus dans le fichier.

References event_count.

Referenced by RGuiTreeRun::UserEvent(), RGuiGanilRun::UserEvent(), RGuiTreeRun::UserRunStop(), and RGuiGanilRun::UserRunStop().

Int_t RunBase::GetFileCount ( ) const
inlinevirtual

Retourne le nombre de fichiers lus.

References file_count.

bool RunBase::IsRunInit ( ) const
inlinevirtual

Retourne vrai si l'analyse est initialisée.

References run_init.

bool RunBase::IsRunStarted ( ) const
inlinevirtual

Retourne vrai si l'analyse est démarrée.

References run_started.

bool RunBase::IsRunStopped ( ) const
inlinevirtual

Retourne vrai si l'analyse est arrêtée.

References run_started.

void RunBase::SetFileMode ( const Int_t  mode)
inlinevirtual

Définit le type de source des fichiers run.

Parameters
modemode de lecture

Reimplemented in SimulRun.

References file_mode.

Referenced by RGuiGanilRun::RGuiGanilRun(), and RGuiTreeRun::RGuiTreeRun().

void RunBase::SetFileName ( const string &  f_name)
inlinevirtual

Définit le nom de fichier.

Parameters
f_namenom de fichier

References file_name.

void RunBase::SetFilePattern ( const string &  pattern)
inlinevirtual

Définit le patron pour la recherche des noms de fichiers.

Parameters
patternformat de la recherche

References file_list_changed, and file_pattern.

Referenced by GEVRunBase::ListPatternTextChanged(), RGuiGanilRun::RGuiGanilRun(), and RGuiTreeRun::RGuiTreeRun().

void RunBase::SetFilePatternLen ( const u_int  len)
inlinevirtual

Définit la longueur du format des numéros de run dans les fichiers.

Parameters
lenlongueur du format de numéro de run des fichiers

References file_list_changed, and file_pattern_len.

Referenced by GEVRunBase::ListPatternLenTextChanged(), GEVRunBase::ListPatternLenValueChanged(), RGuiGanilRun::RGuiGanilRun(), and RGuiTreeRun::RGuiTreeRun().

void RunBase::SetFileNumbers ( const string &  f_num)
inlinevirtual

Définit la liste des fichiers.

Parameters
f_numchaîne de définition de la liste

References file_list_changed, and file_numbers.

Referenced by GEVRunBase::ListNumbersTextChanged(), RGuiGanilRun::RGuiGanilRun(), and RGuiTreeRun::RGuiTreeRun().

Int_t RunBase::SetFileListNames ( )
virtual

Fonction qui lit la liste des fichiers correspondant au format demandé. Cette fonction crée une liste de noms de fichiers, qui sont gardés en mémoire afin d'éviter de refaire appel aux fonctions systèmes (commande ls) à chaque nouveau numéro de fichier. La fonction retourne le nombre de noms de fichiers placés dans la liste.

References file_list, file_list_changed, file_pattern, and file_pattern_len.

Referenced by Open().

Int_t RunBase::GetFileMode ( ) const
inlinevirtual

Retourne le mode de lecture des fichiers de runs.

References file_mode.

string RunBase::GetFileName ( ) const
inlinevirtual

Retourne le nom du fichier de runs en cours de traitement.

References file_name.

Referenced by GEVRunBase::EventLoop(), RunList(), RGuiTreeRun::UserRunStart(), RGuiTreeRun::UserRunStop(), and RGuiGanilRun::UserRunStop().

string RunBase::GetFilePattern ( ) const
inlinevirtual

Retourne le format pour listes de fichiers de runs.

References file_pattern.

Int_t RunBase::GetFilePatternLen ( ) const
inlinevirtual

Retourne la longueur du format pour listes de fichiers de runs.

References file_pattern_len.

string RunBase::GetFileNumbers ( ) const
inlinevirtual

Retourne la liste des numéros de fichiers de runs.

References file_numbers.

Int_t RunBase::GetFileNumber ( ) const
inlinevirtual

Retourne le numéro du fichier en cours de traitement.

References file_num.

Int_t RunBase::TapeRewind ( )
virtual

Rembobine la bande au début. La fonction n'est effective qu'en mode de sélection des fichiers sur bande magnétique.

References file_mode.

Referenced by GEVRunBase::TapeRewindButtonClicked().

Int_t RunBase::TapeForward ( const Int_t  n = 1)
virtual

Avance la bande d'un certain nombre de fichiers. La fonction n'est effective qu'en mode de sélection des fichiers sur bande magnétique.

References file_mode.

Referenced by GEVRunBase::TapeForwardButtonClicked().

Int_t RunBase::TapeBackward ( const Int_t  n = 1)
virtual

Recule la bande d'un certain nombre de fichiers. La fonction n'est effective qu'en mode de sélection des fichiers sur bande magnétique.

References file_mode.

Referenced by GEVRunBase::TapeBackwardButtonClicked().

int RunBase::UserEventDefine ( )
inlinevirtual

Fonction utilisateur par défaut pour la définitions des paramètres User de l'événement et la définition des spectres. Cette fonction est appelée une seule fois, lors de la première initialisation d'une instance RunBase. Lorsque plusieurs fichiers runs sont lus, elle n'est pas rappelée (la structure d'événement est censé rester la même).

Reimplemented in RGuiGanilRun, and RGuiTreeRun.

Referenced by Init(), and GEVRunBase::MenuAnalysisInit().

int RunBase::UserRunStart ( )
inlinevirtual

Fonction utilisateur par défaut d'initialisation d'un run. Cette fonction est appelée à chaque début de run.

Reimplemented in RGuiGanilRun, and RGuiTreeRun.

Referenced by RunStart().

int RunBase::UserEvent ( )
inlinevirtual

Fonction utilisateur par défaut de traitement de chaque événement.

Reimplemented in RGuiGanilRun, and RGuiTreeRun.

Referenced by AnalyseEvent().

int RunBase::UserUpdate ( )
inlinevirtual

Fonction utilisateur par défaut appelée après l'incrémentation des spectres, après le traitement d'un événement.

Reimplemented in RGuiGanilRun, and RGuiTreeRun.

Referenced by AnalyseEvent().

int RunBase::UserRunStop ( )
inlinevirtual

Fonction utilisateur par défaut appelée en fin de run.

Reimplemented in RGuiGanilRun, and RGuiTreeRun.

Referenced by RunStop().

RunBase::ClassDef ( RunBase  ,
 
)

Définition à usage de ROOT...


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