KaliVeda  1.13/01
Heavy-Ion Analysis Toolkit
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | Static Private Attributes | List of all members
KVDataAnalyser Class Reference

Manager class which sets up and runs data analysis tasks.

This can be used either 'interactively' or in menu-driven mode. In both cases, in order to run a data analysis task, the user must specify:

The role of this base class is to set up the environment necessary for the execution of a given data analysis task; the actual analysis will be performed by a specialised child class of KVDataAnalyser as specified by the task. See KVDataAnalysisTask.

Naming user files generated by analysis in batch mode

When running an analysis task using a batch system, the working directory where the analysis is executed may be different to the one where the job was submitted. The source files for any user-supplied analysis class are automatically copied to the working directory when execution of the task begins. Any files generated by the user's analysis are copied back to the original directory at the end of execution. In case several tasks are launched from the same directory, it is the user's responsibility to give unique names to the files generated by her analysis. One simple way to do this is to use the name of the batch job as a basis for naming such files:

-//- When running in batch/PROOF mode, we use the job name
SetCombinedOutputFile(Form("%s.root", gDataAnalyser->GetBatchSystem()->GetJobName()));
else
SetCombinedOutputFile(Form("Analysis_results.root"));
KVDataAnalyser * gDataAnalyser
char * Form(const char *fmt,...)
virtual const Char_t * GetJobName() const
virtual const KVBatchSystem * GetBatchSystem()

Definition at line 60 of file KVDataAnalyser.h.

Public Types

enum  EProofMode { None , Lite , Proof }
 
- Public Types inherited from TObject
enum  EDeprecatedStatusBits
 
enum  EStatusBits
 

Public Member Functions

 KVDataAnalyser ()
 Default constructor. More...
 
virtual ~ KVDataAnalyser ()
 
virtual void AddJobDescriptionList (TList *)
 
Bool_t BatchMode () const
 
virtual Bool_t CheckStatusUpdateInterval (Long64_t nevents) const
 
virtual Bool_t CheckTaskVariables ()
 
void ChooseNbEventToRead ()
 Ask user to set number of events to read. More...
 
void ChooseRunningMode ()
 
void ChooseUserClass ()
 Choose the user's analysis class. More...
 
void DeleteBatchStatusFile () const
 Delete batch status file (and backup - '.bak') for batch job. More...
 
void DoStatusUpdate (Long64_t nevents) const
 Print infos on events treated, disk usage, memory usage. More...
 
Bool_t DoUserClassFilesExist ()
 
virtual TString ExpandAutoBatchName (const Char_t *format) const
 
virtual KVDBRunGetAnalysedRun () const
 
virtual KVDBSystemGetAnalysedSystem () const
 
virtual TTreeGetAnalysedTree () const
 
KVDataAnalysisTaskGetAnalysisTask () const
 
const Char_tGetBatchName ()
 
const Char_tGetBatchStatusFileName () const
 Returns full path to file used to store status of running batch jobs. More...
 
virtual const KVBatchSystemGetBatchSystem ()
 
const KVStringGetDataType () const
 
virtual const KV2BodyGetKinematics () const
 
const Char_tGetLaunchDirectory () const
 
Long64_t GetNbEventToRead (void) const
 
virtual Int_t GetNumberOfFilesToAnalyse () const
 
KVDataAnalyserGetParent () const
 
TString GetPathToFileInLaunchDirectory (const TString &) const
 
EProofMode GetProofMode () const
 
virtual const Char_tGetRecognisedAutoBatchNameKeywords () const
 
virtual KVString GetRootDirectoryOfDataToAnalyse () const
 
Double_t GetStatusUpdateInterval () const
 
virtual Long64_t GetTotalEntriesToRead () const
 
const Char_tGetUserClass ()
 
const KVStringGetUserClassDec () const
 
const KVStringGetUserClassImp () const
 
const KVStringGetUserClassOptions () const
 
const KVStringGetUserIncludes () const
 
const KVStringGetUserLibraries () const
 
Bool_t IsMenus () const
 
Bool_t IsQuit () const
 
Bool_t IsSubmit () const
 
Bool_t IsUserClassValid () const
 
virtual void postAnalysis ()
 
virtual void postEndAnalysis ()
 
virtual void postEndRun ()
 
virtual void postInitAnalysis ()
 
virtual void postInitRun ()
 
virtual void preAnalysis ()
 
virtual void preEndAnalysis ()
 
virtual void preEndRun ()
 
virtual void preInitAnalysis ()
 
virtual void preInitRun ()
 
virtual Bool_t ReadBatchEnvFile (const Char_t *)
 
virtual void RegisterUserClass (TObject *)
 
virtual void Reset ()
 
virtual void Run ()
 Check all task variables, then run analyser. More...
 
virtual void RunMenus ()
 Run data analyser in menu-driven mode. More...
 
Bool_t RunningInLaunchDirectory ()
 
virtual void SetAnalysedTree (TTree *)
 
void SetAnalysisTask (KVDataAnalysisTask *at)
 
virtual void SetAuxFileList (TList *)
 
void SetBatchMode (Bool_t on=kTRUE)
 
void SetBatchName (const Char_t *batchname)
 
void SetBatchSystem (KVBatchSystem *bs)
 
void SetDataType (const Char_t *name)
 
virtual void SetFileList (TList *)
 
void SetMenus (Bool_t on=kTRUE)
 
void SetNbEventToRead (Long64_t nb=0)
 
void SetParent (KVDataAnalyser *da)
 
void SetProofMode (EProofMode e)
 
void SetQuit (Bool_t yes=kTRUE)
 
void SetStatusUpdateInterval (double t)
 
void SetSubmit (Bool_t yes=kTRUE)
 
virtual void SetTriggerConditionsForRun (int)
 
void SetUserClass (const Char_t *kvs, Bool_t check=kTRUE)
 
void SetUserClassOptions (const Char_t *o="")
 
void SetUserIncludes (const Char_t *incDirs=0)
 
void SetUserLibraries (const Char_t *libs=0)
 
virtual void SubmitTask ()
 
void UpdateBatchStatusFile (Int_t totev, Int_t evread, TString disk) const
 Update infos in batch status file. More...
 
void UseBaseClassSubmitTask ()
 
virtual void WriteBatchEnvFile (const Char_t *, Bool_t sav=kTRUE)
 
void WriteBatchInfo (TTree *)
 
- Public Member Functions inherited from TObject
 TObject ()
 
 TObject (const TObject &object)
 
virtual ~TObject ()
 
void AbstractMethod (const char *method) const
 
virtual void AppendPad (Option_t *option="")
 
virtual void Browse (TBrowser *b)
 
ULong_t CheckedHash ()
 
virtual const char * ClassName () const
 
virtual void Clear (Option_t *="")
 
virtual TObjectClone (const char *newname="") const
 
virtual Int_t Compare (const TObject *obj) const
 
virtual void Copy (TObject &object) const
 
virtual void Delete (Option_t *option="")
 
virtual Int_t DistancetoPrimitive (Int_t px, Int_t py)
 
virtual void Draw (Option_t *option="")
 
virtual void DrawClass () const
 
virtual TObjectDrawClone (Option_t *option="") const
 
virtual void Dump () const
 
virtual void Error (const char *method, const char *msgfmt,...) const
 
virtual void Execute (const char *method, const char *params, Int_t *error=0)
 
virtual void Execute (TMethod *method, TObjArray *params, Int_t *error=0)
 
virtual void ExecuteEvent (Int_t event, Int_t px, Int_t py)
 
virtual void Fatal (const char *method, const char *msgfmt,...) const
 
virtual TObjectFindObject (const char *name) const
 
virtual TObjectFindObject (const TObject *obj) const
 
virtual Option_tGetDrawOption () const
 
virtual const char * GetIconName () const
 
virtual const char * GetName () const
 
virtual char * GetObjectInfo (Int_t px, Int_t py) const
 
virtual Option_tGetOption () const
 
virtual const char * GetTitle () const
 
virtual UInt_t GetUniqueID () const
 
virtual Bool_t HandleTimer (TTimer *timer)
 
virtual ULong_t Hash () const
 
Bool_t HasInconsistentHash () const
 
virtual void Info (const char *method, const char *msgfmt,...) const
 
virtual Bool_t InheritsFrom (const char *classname) const
 
virtual Bool_t InheritsFrom (const TClass *cl) const
 
virtual void Inspect () const
 
void InvertBit (UInt_t f)
 
virtual Bool_t IsEqual (const TObject *obj) const
 
virtual Bool_t IsFolder () const
 
R__ALWAYS_INLINE Bool_t IsOnHeap () const
 
virtual Bool_t IsSortable () const
 
R__ALWAYS_INLINE Bool_t IsZombie () const
 
virtual void ls (Option_t *option="") const
 
void MayNotUse (const char *method) const
 
virtual Bool_t Notify ()
 
void Obsolete (const char *method, const char *asOfVers, const char *removedFromVers) const
 
void operator delete (void *ptr)
 
void operator delete[] (void *ptr)
 
voidoperator new (size_t sz)
 
voidoperator new (size_t sz, void *vp)
 
voidoperator new[] (size_t sz)
 
voidoperator new[] (size_t sz, void *vp)
 
TObjectoperator= (const TObject &rhs)
 
virtual void Paint (Option_t *option="")
 
virtual void Pop ()
 
virtual void Print (Option_t *option="") const
 
virtual Int_t Read (const char *name)
 
virtual void RecursiveRemove (TObject *obj)
 
void ResetBit (UInt_t f)
 
virtual void SaveAs (const char *filename="", Option_t *option="") const
 
virtual void SavePrimitive (std::ostream &out, Option_t *option="")
 
void SetBit (UInt_t f)
 
void SetBit (UInt_t f, Bool_t set)
 
virtual void SetDrawOption (Option_t *option="")
 
virtual void SetUniqueID (UInt_t uid)
 
virtual void SysError (const char *method, const char *msgfmt,...) const
 
R__ALWAYS_INLINE Bool_t TestBit (UInt_t f) const
 
Int_t TestBits (UInt_t f) const
 
virtual void UseCurrentStyle ()
 
virtual void Warning (const char *method, const char *msgfmt,...) const
 
virtual Int_t Write (const char *name=0, Int_t option=0, Int_t bufsize=0)
 
virtual Int_t Write (const char *name=0, Int_t option=0, Int_t bufsize=0) const
 

Static Public Member Functions

static Bool_t AbortProcessingLoop ()
 
static KVDataAnalyserGetAnalyser (const Char_t *plugin)
 
static Bool_t IsRunningBatchAnalysis ()
 
static void RunAnalyser (const Char_t *plugin="")
 
static void SetAbortProcessingLoop (Bool_t now=kTRUE)
 
- Static Public Member Functions inherited from TObject
static Longptr_t GetDtorOnly ()
 
static Bool_t GetObjectStat ()
 
static void SetDtorOnly (void *obj)
 
static void SetObjectStat (Bool_t stat)
 

Protected Member Functions

virtual Bool_t CheckIfUserClassIsValid (const KVString &alternative_base_class="")
 
virtual Bool_t CheckWhatToAnalyseAndHow ()
 
virtual void ChooseWhatToAnalyse ()
 TO IMPLEMENT ? More...
 
virtual void ChooseWhatToDo ()
 TO IMPLEMENT ? More...
 
void CopyAnalysisResultsToLaunchDirectory ()
 
const Char_tGetACliCMode ()
 
TEnvGetBatchInfoFile () const
 
TObjectGetInstanceOfUserClass (const KVString &alternative_base_class="")
 
virtual Bool_t NeedToChooseWhatToAnalyse () const
 
virtual Bool_t NeedToChooseWhatToDo () const
 
virtual void PostRunReset ()
 
virtual Bool_t PreSubmitCheck ()
 
void ScanWorkingDirectory (TList **)
 
virtual void set_up_analyser_for_task (KVDataAnalyser *the_analyser)
 
- Protected Member Functions inherited from TObject
virtual void DoError (int level, const char *location, const char *fmt, va_list va) const
 
void MakeZombie ()
 

Protected Attributes

TListfWorkDirInit
 list of files in working directory before task runs More...
 
- Protected Attributes inherited from TObject
 kOnlyPrepStep
 

Private Attributes

Bool_t fBatch
 set to kTRUE when used in a non-interactive environment More...
 
TEnvfBatchEnv
 batch environment file More...
 
KVString fBatchName
 name of batch job when used in a non-interactive environment More...
 
KVBatchSystemfBatchSystem
 batch system to use for submission of job More...
 
Bool_t fChoseRunMode
 set to kTRUE once running mode has been set/chosen More...
 
KVString fDataType
 datatype chosen by user More...
 
KVString fIncludes
 user's include directories More...
 
KVString fLibraries
 user's libraries More...
 
Bool_t fMenus
 set to kTRUE in menu-driven mode More...
 
KVDataAnalyserfParent
 holds address of parent analyser which created this one More...
 
EProofMode fProofMode
 
Bool_t fQuit
 set to kTRUE when user wants to quit More...
 
Double_t fStatusUpdateInterval
 
Bool_t fSubmit
 set to kTRUE when user wants to submit task More...
 
KVDataAnalysisTaskfTask
 task chosen by user More...
 
Bool_t fUseBaseClassSubmitTask
 
KVString fUserClass
 user's analysis class More...
 
KVString fUserClassAlternativeBaseClass
 alternative base class for user's analysis class More...
 
KVString fUserClassDec
 user's analysis class header file More...
 
KVString fUserClassImp
 user's analysis class implementation file More...
 
Bool_t fUserClassIsOK
 set once user class has been validated More...
 
KVString fUserClassOptions
 options to be passed to user analysis class More...
 
TListfWorkDirEnd
 list of files in working directory after task runs More...
 
Long64_t nbEventToRead
 

Static Private Attributes

static Bool_t fCleanAbort = kFALSE
 flag to force abort of processing More...
 

Additional Inherited Members

- Public Attributes inherited from TObject
 kBitMask
 
 kCanDelete
 
 kCannotPick
 
 kHasUUID
 
 kInconsistent
 
 kInvalidObject
 
 kIsOnHeap
 
 kIsReferenced
 
 kMustCleanup
 
 kNoContextMenu
 
 kNotDeleted
 
 kObjInCanvas
 
 kOverwrite
 
 kSingleKey
 
 kWriteDelete
 
 kZombie
 

#include <KVDataAnalyser.h>

Inheritance diagram for KVDataAnalyser:
Inheritance graph
[legend]

Member Enumeration Documentation

◆ EProofMode

Enumerator
None 
Lite 
Proof 

Definition at line 129 of file KVDataAnalyser.h.

Constructor & Destructor Documentation

◆ KVDataAnalyser()

KVDataAnalyser::KVDataAnalyser ( )

Default constructor.

Definition at line 35 of file KVDataAnalyser.cpp.

◆ ~ KVDataAnalyser()

virtual KVDataAnalyser::~ KVDataAnalyser ( )
virtual

Member Function Documentation

◆ AbortProcessingLoop()

static Bool_t KVDataAnalyser::AbortProcessingLoop ( )
inlinestatic

Definition at line 151 of file KVDataAnalyser.h.

◆ AddJobDescriptionList()

void KVDataAnalyser::AddJobDescriptionList ( TList l)
virtual

Create a KVNameValueList called "JobDescriptionList" and add it to the TList. The parameters in the list describe the properties of the current job. The TList pointer could be, for example, the address of the TSelector::fInput list used by PROOF.

Reimplemented in KVDataSetAnalyser.

Definition at line 1291 of file KVDataAnalyser.cpp.

◆ BatchMode()

Bool_t KVDataAnalyser::BatchMode ( ) const
inline

Definition at line 186 of file KVDataAnalyser.h.

◆ CheckIfUserClassIsValid()

Bool_t KVDataAnalyser::CheckIfUserClassIsValid ( const KVString alternative_base_class = "")
protectedvirtual

Return kTRUE if the name of the class given by the user (fUserClass) is valid for the analysis task. This is so if one of the following is true:

  • the class library has already been loaded. In this case the class will exist in the dictionary (gROOT->GetClass()); we check if it derived from the base class defined for the analysis task
  • a plugin exists defining this class as an extension of the base class defined for the analysis task (gROOT->GetPluginManager()->FindHandler(...): the URI for the plugin must be the same as the name of the class)
  • source files for the class are present in the working directory. In this case we can add a plugin handler for the class. In the latter two cases, the class is valid if compilation succeeds.

If the user's class may in fact be derived from an alternative base class, rather than the base class defined for this analysis task (see KVDataAnalysisTask::SetUserBaseClass) you can supply the name of this class (or a comma-separated list of base classes).

Reimplemented in KVINDRAReconDataAnalyser.

Definition at line 459 of file KVDataAnalyser.cpp.

◆ CheckStatusUpdateInterval()

Bool_t KVDataAnalyser::CheckStatusUpdateInterval ( Long64_t  nevents) const
virtual

Returns kTRUE if the number of events coincides with the interval set for status updates for the current data analysis task

Definition at line 1045 of file KVDataAnalyser.cpp.

◆ CheckTaskVariables()

Bool_t KVDataAnalyser::CheckTaskVariables ( void  )
virtual

Checks the task variables In batch mode, we first set the task variables by reading the batch env file associated with the name set for the batch job

Reimplemented in KVReconDataAnalyser, KVINDRAReconDataAnalyser, and KVOnlineReconDataAnalyser.

Definition at line 202 of file KVDataAnalyser.cpp.

◆ CheckWhatToAnalyseAndHow()

Bool_t KVDataAnalyser::CheckWhatToAnalyseAndHow ( )
protectedvirtual

Reimplemented in KVDataSetAnalyser.

Definition at line 239 of file KVDataAnalyser.cpp.

◆ ChooseNbEventToRead()

void KVDataAnalyser::ChooseNbEventToRead ( )

Ask user to set number of events to read.

Definition at line 361 of file KVDataAnalyser.cpp.

◆ ChooseRunningMode()

void KVDataAnalyser::ChooseRunningMode ( )

Ask user to choose between immediate or batch execution If the choice is batch, we ask to choose a batch system and whether or not to use the "multijobs" mode

Definition at line 1079 of file KVDataAnalyser.cpp.

◆ ChooseUserClass()

void KVDataAnalyser::ChooseUserClass ( )

Choose the user's analysis class.

Definition at line 413 of file KVDataAnalyser.cpp.

◆ ChooseWhatToAnalyse()

void KVDataAnalyser::ChooseWhatToAnalyse ( )
protectedvirtual

TO IMPLEMENT ?

Reimplemented in KVDataSetAnalyser.

Definition at line 1311 of file KVDataAnalyser.cpp.

◆ ChooseWhatToDo()

void KVDataAnalyser::ChooseWhatToDo ( )
protectedvirtual

TO IMPLEMENT ?

Reimplemented in KVDataSetAnalyser.

Definition at line 1321 of file KVDataAnalyser.cpp.

◆ CopyAnalysisResultsToLaunchDirectory()

void KVDataAnalyser::CopyAnalysisResultsToLaunchDirectory ( )
protected

Compare the two lists of files in the current working directory, before and after analysis; and copy any files which were created during the analysis to the launch directory. Files with the same names in the launch directory will be overwritten if they exist.

Definition at line 1133 of file KVDataAnalyser.cpp.

◆ DeleteBatchStatusFile()

void KVDataAnalyser::DeleteBatchStatusFile ( ) const

Delete batch status file (and backup - '.bak') for batch job.

Definition at line 1028 of file KVDataAnalyser.cpp.

◆ DoStatusUpdate()

void KVDataAnalyser::DoStatusUpdate ( Long64_t  nevents) const

Print infos on events treated, disk usage, memory usage.

Definition at line 1057 of file KVDataAnalyser.cpp.

◆ DoUserClassFilesExist()

Bool_t KVDataAnalyser::DoUserClassFilesExist ( )

Check if files containing user's class are present in the working directory. The names of the implementation and header files are stored in fUserClassImp and fUserClassDec.

Definition at line 431 of file KVDataAnalyser.cpp.

◆ ExpandAutoBatchName()

TString KVDataAnalyser::ExpandAutoBatchName ( const Char_t format) const
virtual

Replace any 'special' symbols in "format" with their current values

$Date : current date and time $User : name of user $UserClass : name of user's analysis class

Reimplemented in KVSimDirAnalyser, and KVDataSetAnalyser.

Definition at line 913 of file KVDataAnalyser.cpp.

◆ GetACliCMode()

const Char_t * KVDataAnalyser::GetACliCMode ( )
protected

Returns string to be appended to name of user class for compilation with ACliC in GetInstanceOfUserClass. This depends on the boolean resources:

KVDataAnalyser.UserClass.Debug: ( "yes" => "g" ) KVDataAnalyser.UserClass.Optimise: ( "yes" => "O" ) KVDataAnalyser.UserClass.ForceRecompile: ( "no" => "+"; "yes" => "++" )

Note that if both Debug and Optimise are set to "yes/true", we use Debug mode. (can't have BOTH debug & optimisation).

Definition at line 499 of file KVDataAnalyser.cpp.

◆ GetAnalysedRun()

virtual KVDBRun* KVDataAnalyser::GetAnalysedRun ( ) const
inlinevirtual

Reimplemented in KVSimDirFilterAnalyser, and KVDataSetAnalyser.

Definition at line 377 of file KVDataAnalyser.h.

◆ GetAnalysedSystem()

virtual KVDBSystem* KVDataAnalyser::GetAnalysedSystem ( ) const
inlinevirtual

Reimplemented in KVSimDirFilterAnalyser, and KVDataSetAnalyser.

Definition at line 373 of file KVDataAnalyser.h.

◆ GetAnalysedTree()

virtual TTree* KVDataAnalyser::GetAnalysedTree ( ) const
inlinevirtual

If data being analysed is contained in a ROOT TTree, return its address

Note
what is actually returned is the address of a TChain. Use GetTree()->GetTree() to access the currently analysed TTree.

Reimplemented in KVReconDataAnalyser, KVSimDirAnalyser, and KVINDRAReconDataAnalyser.

Definition at line 384 of file KVDataAnalyser.h.

◆ GetAnalyser()

KVDataAnalyser * KVDataAnalyser::GetAnalyser ( const Char_t plugin)
static

Creates an instance of a class derived from KVDataAnalyser defined as a plugin check and load plugin library

Definition at line 392 of file KVDataAnalyser.cpp.

◆ GetAnalysisTask()

KVDataAnalysisTask* KVDataAnalyser::GetAnalysisTask ( ) const
inline

Definition at line 231 of file KVDataAnalyser.h.

◆ GetBatchInfoFile()

TEnv* KVDataAnalyser::GetBatchInfoFile ( ) const
inlineprotected

Definition at line 104 of file KVDataAnalyser.h.

◆ GetBatchName()

const Char_t* KVDataAnalyser::GetBatchName ( )
inline

Definition at line 194 of file KVDataAnalyser.h.

◆ GetBatchStatusFileName()

const Char_t * KVDataAnalyser::GetBatchStatusFileName ( ) const

Returns full path to file used to store status of running batch jobs.

Definition at line 987 of file KVDataAnalyser.cpp.

◆ GetBatchSystem()

virtual const KVBatchSystem* KVDataAnalyser::GetBatchSystem ( )
inlinevirtual

Definition at line 204 of file KVDataAnalyser.h.

◆ GetDataType()

const KVString& KVDataAnalyser::GetDataType ( ) const
inline

Definition at line 235 of file KVDataAnalyser.h.

◆ GetInstanceOfUserClass()

TObject * KVDataAnalyser::GetInstanceOfUserClass ( const KVString alternative_base_class = "")
protected

Return an instance of the class given by the user (fUserClass), if it is valid. If the user class is given in the form of source code, it will be (re)compiled if it has not already been loaded and/or the source has changed since the last build, using ACliC. If the resource

KVDataAnalyser.UserClass.Debug: yes

is set, the user's class will be compiled with extra debugging information

Once compiled, we check that the user's class is indeed derived from the base class defined for this analysis task (see KVDataAnalysisTask::SetUserBaseClass). If the user's class may in fact be derived from an alternative base class, you can supply the name of this class (or comma-separated list of base classes). make sure any required plugin library defining base class for user's analysis class is loaded

Definition at line 547 of file KVDataAnalyser.cpp.

◆ GetKinematics()

virtual const KV2Body* KVDataAnalyser::GetKinematics ( ) const
inlinevirtual

◆ GetLaunchDirectory()

const Char_t * KVDataAnalyser::GetLaunchDirectory ( ) const

Returns full path to job submission directory for batch jobs. Returns current working directory for non-batch jobs.

Definition at line 951 of file KVDataAnalyser.cpp.

◆ GetNbEventToRead()

Long64_t KVDataAnalyser::GetNbEventToRead ( void  ) const
inline

Definition at line 261 of file KVDataAnalyser.h.

◆ GetNumberOfFilesToAnalyse()

virtual Int_t KVDataAnalyser::GetNumberOfFilesToAnalyse ( ) const
inlinevirtual

Reimplemented in KVSimDirAnalyser, and KVDataSetAnalyser.

Definition at line 169 of file KVDataAnalyser.h.

◆ GetParent()

KVDataAnalyser* KVDataAnalyser::GetParent ( ) const
inline

Definition at line 282 of file KVDataAnalyser.h.

◆ GetPathToFileInLaunchDirectory()

TString KVDataAnalyser::GetPathToFileInLaunchDirectory ( const TString f) const

Use this method to get the full path to a file in the directory where the job was launched.

When not using a batch system, this will just be the current working directory.

If the job is actually running elsewhere, use this method to access a file in the launch directory.

Definition at line 969 of file KVDataAnalyser.cpp.

◆ GetProofMode()

EProofMode KVDataAnalyser::GetProofMode ( ) const
inline

Definition at line 141 of file KVDataAnalyser.h.

◆ GetRecognisedAutoBatchNameKeywords()

const Char_t * KVDataAnalyser::GetRecognisedAutoBatchNameKeywords ( ) const
virtual

Reimplemented in KVDataSetAnalyser.

Definition at line 936 of file KVDataAnalyser.cpp.

◆ GetRootDirectoryOfDataToAnalyse()

virtual KVString KVDataAnalyser::GetRootDirectoryOfDataToAnalyse ( ) const
inlinevirtual

Reimplemented in KVSimDirAnalyser, and KVDataSetAnalyser.

Definition at line 359 of file KVDataAnalyser.h.

◆ GetStatusUpdateInterval()

Double_t KVDataAnalyser::GetStatusUpdateInterval ( ) const
inline

Definition at line 224 of file KVDataAnalyser.h.

◆ GetTotalEntriesToRead()

virtual Long64_t KVDataAnalyser::GetTotalEntriesToRead ( ) const
inlinevirtual

Reimplemented in KVReconDataAnalyser, KVRawDataAnalyser, and KVINDRAReconDataAnalyser.

Definition at line 215 of file KVDataAnalyser.h.

◆ GetUserClass()

const Char_t* KVDataAnalyser::GetUserClass ( )
inline

Definition at line 160 of file KVDataAnalyser.h.

◆ GetUserClassDec()

const KVString& KVDataAnalyser::GetUserClassDec ( ) const
inline

Definition at line 291 of file KVDataAnalyser.h.

◆ GetUserClassImp()

const KVString& KVDataAnalyser::GetUserClassImp ( ) const
inline

Definition at line 287 of file KVDataAnalyser.h.

◆ GetUserClassOptions()

const KVString& KVDataAnalyser::GetUserClassOptions ( ) const
inline

Definition at line 324 of file KVDataAnalyser.h.

◆ GetUserIncludes()

const KVString& KVDataAnalyser::GetUserIncludes ( ) const
inline

Definition at line 239 of file KVDataAnalyser.h.

◆ GetUserLibraries()

const KVString& KVDataAnalyser::GetUserLibraries ( ) const
inline

Definition at line 243 of file KVDataAnalyser.h.

◆ IsMenus()

Bool_t KVDataAnalyser::IsMenus ( ) const
inline

Definition at line 339 of file KVDataAnalyser.h.

◆ IsQuit()

Bool_t KVDataAnalyser::IsQuit ( ) const
inline

Definition at line 347 of file KVDataAnalyser.h.

◆ IsRunningBatchAnalysis()

Bool_t KVDataAnalyser::IsRunningBatchAnalysis ( )
static

Static method KVDataAnalyser::IsRunningBatchAnalysis() Returns kTRUE if an analysis task is being performed in batch mode Returns kFALSE if no analysis task is in interactive mode, or no analysis task running

Definition at line 1273 of file KVDataAnalyser.cpp.

◆ IsSubmit()

Bool_t KVDataAnalyser::IsSubmit ( ) const
inline

Definition at line 355 of file KVDataAnalyser.h.

◆ IsUserClassValid()

Bool_t KVDataAnalyser::IsUserClassValid ( ) const
inline

Definition at line 164 of file KVDataAnalyser.h.

◆ NeedToChooseWhatToAnalyse()

virtual Bool_t KVDataAnalyser::NeedToChooseWhatToAnalyse ( ) const
inlineprotectedvirtual

Reimplemented in KVSimDirAnalyser, and KVDataSetAnalyser.

Definition at line 117 of file KVDataAnalyser.h.

◆ NeedToChooseWhatToDo()

virtual Bool_t KVDataAnalyser::NeedToChooseWhatToDo ( ) const
inlineprotectedvirtual

Reimplemented in KVDataSetAnalyser.

Definition at line 113 of file KVDataAnalyser.h.

◆ postAnalysis()

virtual void KVDataAnalyser::postAnalysis ( )
inlinevirtual

Reimplemented in KVReconRawDataAnalyser.

Definition at line 310 of file KVDataAnalyser.h.

◆ postEndAnalysis()

virtual void KVDataAnalyser::postEndAnalysis ( )
inlinevirtual

Definition at line 314 of file KVDataAnalyser.h.

◆ postEndRun()

virtual void KVDataAnalyser::postEndRun ( )
inlinevirtual

Reimplemented in KVReconRawDataAnalyser.

Definition at line 312 of file KVDataAnalyser.h.

◆ postInitAnalysis()

virtual void KVDataAnalyser::postInitAnalysis ( )
inlinevirtual

Definition at line 306 of file KVDataAnalyser.h.

◆ postInitRun()

virtual void KVDataAnalyser::postInitRun ( )
inlinevirtual

Definition at line 308 of file KVDataAnalyser.h.

◆ PostRunReset()

void KVDataAnalyser::PostRunReset ( )
protectedvirtual

Reimplemented in KVDataSetAnalyser.

Definition at line 523 of file KVDataAnalyser.cpp.

◆ preAnalysis()

virtual void KVDataAnalyser::preAnalysis ( )
inlinevirtual

◆ preEndAnalysis()

virtual void KVDataAnalyser::preEndAnalysis ( )
inlinevirtual

Definition at line 313 of file KVDataAnalyser.h.

◆ preEndRun()

virtual void KVDataAnalyser::preEndRun ( )
inlinevirtual

Definition at line 311 of file KVDataAnalyser.h.

◆ preInitAnalysis()

virtual void KVDataAnalyser::preInitAnalysis ( )
inlinevirtual

◆ preInitRun()

virtual void KVDataAnalyser::preInitRun ( )
inlinevirtual

◆ PreSubmitCheck()

virtual Bool_t KVDataAnalyser::PreSubmitCheck ( )
inlineprotectedvirtual

Reimplemented in KVDataSetAnalyser.

Definition at line 108 of file KVDataAnalyser.h.

◆ ReadBatchEnvFile()

Bool_t KVDataAnalyser::ReadBatchEnvFile ( const Char_t filename)
virtual

Read the batch env file "filename" and initialise the analysis task using the informations in the file Returns kTRUE if all goes well

Reimplemented in KVDataSetAnalyser, and KVSimDirAnalyser.

Definition at line 735 of file KVDataAnalyser.cpp.

◆ RegisterUserClass()

virtual void KVDataAnalyser::RegisterUserClass ( TObject )
inlinevirtual

◆ Reset()

void KVDataAnalyser::Reset ( void  )
virtual

Reimplemented in KVReconDataAnalyser, KVDataSetAnalyser, and KVINDRAReconDataAnalyser.

Definition at line 78 of file KVDataAnalyser.cpp.

◆ Run()

void KVDataAnalyser::Run ( )
virtual

Check all task variables, then run analyser.

Reimplemented in KVDataTransfer.

Definition at line 103 of file KVDataAnalyser.cpp.

◆ RunAnalyser()

void KVDataAnalyser::RunAnalyser ( const Char_t uri = "")
static

Set up and run data analysis task. This allows to choose a dataset and a data analysis task and then execute the task or submit a batch job. The behaviour of the data analyser object (base class KVDataAnalyser) can be modified by choosing a plugin class corresponding to one of the plugins defined in $KVROOT/KVFiles/.kvrootrc.

Definition at line 1242 of file KVDataAnalyser.cpp.

◆ RunMenus()

void KVDataAnalyser::RunMenus ( )
virtual

Run data analyser in menu-driven mode.

Definition at line 173 of file KVDataAnalyser.cpp.

◆ RunningInLaunchDirectory()

Bool_t KVDataAnalyser::RunningInLaunchDirectory ( )

Returns kTRUE if current working directory is same as launch directory for batch job When not in batch mode, always returns kTRUE.

Definition at line 828 of file KVDataAnalyser.cpp.

◆ ScanWorkingDirectory()

void KVDataAnalyser::ScanWorkingDirectory ( TList **  ls)
protected

Fill TList with list of files in current working directory. If ls!=0 it is deleted beforehand

Definition at line 1116 of file KVDataAnalyser.cpp.

◆ set_up_analyser_for_task()

void KVDataAnalyser::set_up_analyser_for_task ( KVDataAnalyser the_analyser)
protectedvirtual

Reimplemented in KVDataSetAnalyser.

Definition at line 842 of file KVDataAnalyser.cpp.

◆ SetAbortProcessingLoop()

static void KVDataAnalyser::SetAbortProcessingLoop ( Bool_t  now = kTRUE)
inlinestatic

Set flag to force a clean abort of the processing loop

Definition at line 146 of file KVDataAnalyser.h.

◆ SetAnalysedTree()

virtual void KVDataAnalyser::SetAnalysedTree ( TTree )
inlinevirtual

Reimplemented in KVReconDataAnalyser, and KVINDRAReconDataAnalyser.

Definition at line 383 of file KVDataAnalyser.h.

◆ SetAnalysisTask()

void KVDataAnalyser::SetAnalysisTask ( KVDataAnalysisTask at)

Set analysis task and data type For ways of obtaining pointers to data analysis tasks for any given dataset, see method KVDataSet::GetAnalysisTask(const Char_t* keywords) const.

Definition at line 261 of file KVDataAnalyser.cpp.

◆ SetAuxFileList()

virtual void KVDataAnalyser::SetAuxFileList ( TList )
inlinevirtual

Reimplemented in KVSimDirAnalyser.

Definition at line 251 of file KVDataAnalyser.h.

◆ SetBatchMode()

void KVDataAnalyser::SetBatchMode ( Bool_t  on = kTRUE)
inline

Definition at line 182 of file KVDataAnalyser.h.

◆ SetBatchName()

void KVDataAnalyser::SetBatchName ( const Char_t batchname)
inline

Definition at line 190 of file KVDataAnalyser.h.

◆ SetBatchSystem()

void KVDataAnalyser::SetBatchSystem ( KVBatchSystem bs)
inline

Definition at line 198 of file KVDataAnalyser.h.

◆ SetDataType()

void KVDataAnalyser::SetDataType ( const Char_t name)
inline

Definition at line 268 of file KVDataAnalyser.h.

◆ SetFileList()

virtual void KVDataAnalyser::SetFileList ( TList )
inlinevirtual

Reimplemented in KVSimDirAnalyser.

Definition at line 247 of file KVDataAnalyser.h.

◆ SetMenus()

void KVDataAnalyser::SetMenus ( Bool_t  on = kTRUE)
inline

Definition at line 335 of file KVDataAnalyser.h.

◆ SetNbEventToRead()

void KVDataAnalyser::SetNbEventToRead ( Long64_t  nb = 0)
inline

Definition at line 256 of file KVDataAnalyser.h.

◆ SetParent()

void KVDataAnalyser::SetParent ( KVDataAnalyser da)
inline

Definition at line 278 of file KVDataAnalyser.h.

◆ SetProofMode()

void KVDataAnalyser::SetProofMode ( EProofMode  e)
inline

Definition at line 137 of file KVDataAnalyser.h.

◆ SetQuit()

void KVDataAnalyser::SetQuit ( Bool_t  yes = kTRUE)
inline

Definition at line 343 of file KVDataAnalyser.h.

◆ SetStatusUpdateInterval()

void KVDataAnalyser::SetStatusUpdateInterval ( double  t)
inline

Definition at line 220 of file KVDataAnalyser.h.

◆ SetSubmit()

void KVDataAnalyser::SetSubmit ( Bool_t  yes = kTRUE)
inline

Definition at line 351 of file KVDataAnalyser.h.

◆ SetTriggerConditionsForRun()

virtual void KVDataAnalyser::SetTriggerConditionsForRun ( int  )
inlinevirtual

Reimplemented in KVReconDataAnalyser, KVINDRAReconDataAnalyser, and KVSimDirFilterAnalyser.

Definition at line 381 of file KVDataAnalyser.h.

◆ SetUserClass()

void KVDataAnalyser::SetUserClass ( const Char_t kvs,
Bool_t  check = kTRUE 
)

Set name of user analysis class. If check=kTRUE (default), we check the validity of the class if check=kFALSE we do not check and assume that the class is valid

Definition at line 660 of file KVDataAnalyser.cpp.

◆ SetUserClassOptions()

void KVDataAnalyser::SetUserClassOptions ( const Char_t o = "")
inline

Definition at line 320 of file KVDataAnalyser.h.

◆ SetUserIncludes()

void KVDataAnalyser::SetUserIncludes ( const Char_t incDirs = 0)

Add to the includes paths the user's includes paths the includes paths have to be separated by a white space

Definition at line 280 of file KVDataAnalyser.cpp.

◆ SetUserLibraries()

void KVDataAnalyser::SetUserLibraries ( const Char_t libs = 0)

Load the user's libraries the libraries have to be separated by a white space

Definition at line 317 of file KVDataAnalyser.cpp.

◆ SubmitTask()

void KVDataAnalyser::SubmitTask ( )
virtual

In interactive mode, the data analysis task is performed by instanciating and initialising the KVDataAnalyser child class specified by the task, and then calling its Run() method. In batch mode, the job is submitted to the chosen batch system.

Reimplemented in KVReconDataAnalyser, KVRawDataAnalyser, KVOnlineReconDataAnalyser, KVSimDirAnalyser, KVDataTransfer, KVINDRAReconDataAnalyser, KVINDRAGeneDataAnalyser, KVINDRADstToRootTransfert, KVINDRADSTReader, KVFAZIAReconDataAnalyser, and KVFAZIARawDataAnalyser.

Definition at line 859 of file KVDataAnalyser.cpp.

◆ UpdateBatchStatusFile()

void KVDataAnalyser::UpdateBatchStatusFile ( Int_t  totev,
Int_t  evread,
TString  disk 
) const

Update infos in batch status file.

Definition at line 1007 of file KVDataAnalyser.cpp.

◆ UseBaseClassSubmitTask()

void KVDataAnalyser::UseBaseClassSubmitTask ( )
inline

Definition at line 365 of file KVDataAnalyser.h.

◆ WriteBatchEnvFile()

void KVDataAnalyser::WriteBatchEnvFile ( const Char_t jobname,
Bool_t  save = kTRUE 
)
virtual

Save (in the TEnv fBatchEnv) all necessary information on analysis task which can be used to execute it later (i.e. when batch processing system executes the job). If save=kTRUE (default), write the information in a file whose name is given by ".jobname" where 'jobname' is the name of the job as given to the batch system.

Reimplemented in KVDataSetAnalyser, KVOnlineReconDataAnalyser, KVReconDataAnalyser, KVSimDirAnalyser, and KVINDRAReconDataAnalyser.

Definition at line 684 of file KVDataAnalyser.cpp.

◆ WriteBatchInfo()

void KVDataAnalyser::WriteBatchInfo ( TTree tt)

Store lots of useful information about the current version of KaliVeda, ROOT, etc. etc. in a TEnv object which will be added to the TTree's list of user infos (TTree::GetUserInfo).

Definition at line 1176 of file KVDataAnalyser.cpp.

Member Data Documentation

◆ fBatch

Bool_t KVDataAnalyser::fBatch
private

set to kTRUE when used in a non-interactive environment

Definition at line 65 of file KVDataAnalyser.h.

◆ fBatchEnv

TEnv* KVDataAnalyser::fBatchEnv
private

batch environment file

Definition at line 84 of file KVDataAnalyser.h.

◆ fBatchName

KVString KVDataAnalyser::fBatchName
private

name of batch job when used in a non-interactive environment

Definition at line 66 of file KVDataAnalyser.h.

◆ fBatchSystem

KVBatchSystem* KVDataAnalyser::fBatchSystem
private

batch system to use for submission of job

Definition at line 85 of file KVDataAnalyser.h.

◆ fChoseRunMode

Bool_t KVDataAnalyser::fChoseRunMode
private

set to kTRUE once running mode has been set/chosen

Definition at line 86 of file KVDataAnalyser.h.

◆ fCleanAbort

Bool_t KVDataAnalyser::fCleanAbort = kFALSE
staticprivate

flag to force abort of processing

Definition at line 89 of file KVDataAnalyser.h.

◆ fDataType

KVString KVDataAnalyser::fDataType
private

datatype chosen by user

Definition at line 64 of file KVDataAnalyser.h.

◆ fIncludes

KVString KVDataAnalyser::fIncludes
private

user's include directories

Definition at line 73 of file KVDataAnalyser.h.

◆ fLibraries

KVString KVDataAnalyser::fLibraries
private

user's libraries

Definition at line 74 of file KVDataAnalyser.h.

◆ fMenus

Bool_t KVDataAnalyser::fMenus
private

set to kTRUE in menu-driven mode

Definition at line 69 of file KVDataAnalyser.h.

◆ fParent

KVDataAnalyser* KVDataAnalyser::fParent
private

holds address of parent analyser which created this one

Definition at line 82 of file KVDataAnalyser.h.

◆ fProofMode

EProofMode KVDataAnalyser::fProofMode
private

Definition at line 135 of file KVDataAnalyser.h.

◆ fQuit

Bool_t KVDataAnalyser::fQuit
private

set to kTRUE when user wants to quit

Definition at line 70 of file KVDataAnalyser.h.

◆ fStatusUpdateInterval

Double_t KVDataAnalyser::fStatusUpdateInterval
private

Definition at line 92 of file KVDataAnalyser.h.

◆ fSubmit

Bool_t KVDataAnalyser::fSubmit
private

set to kTRUE when user wants to submit task

Definition at line 71 of file KVDataAnalyser.h.

◆ fTask

KVDataAnalysisTask* KVDataAnalyser::fTask
private

task chosen by user

Definition at line 63 of file KVDataAnalyser.h.

◆ fUseBaseClassSubmitTask

Bool_t KVDataAnalyser::fUseBaseClassSubmitTask
private

Definition at line 90 of file KVDataAnalyser.h.

◆ fUserClass

KVString KVDataAnalyser::fUserClass
private

user's analysis class

Definition at line 75 of file KVDataAnalyser.h.

◆ fUserClassAlternativeBaseClass

KVString KVDataAnalyser::fUserClassAlternativeBaseClass
private

alternative base class for user's analysis class

Definition at line 80 of file KVDataAnalyser.h.

◆ fUserClassDec

KVString KVDataAnalyser::fUserClassDec
private

user's analysis class header file

Definition at line 77 of file KVDataAnalyser.h.

◆ fUserClassImp

KVString KVDataAnalyser::fUserClassImp
private

user's analysis class implementation file

Definition at line 76 of file KVDataAnalyser.h.

◆ fUserClassIsOK

Bool_t KVDataAnalyser::fUserClassIsOK
private

set once user class has been validated

Definition at line 78 of file KVDataAnalyser.h.

◆ fUserClassOptions

KVString KVDataAnalyser::fUserClassOptions
private

options to be passed to user analysis class

Definition at line 79 of file KVDataAnalyser.h.

◆ fWorkDirEnd

TList* KVDataAnalyser::fWorkDirEnd
private

list of files in working directory after task runs

Definition at line 88 of file KVDataAnalyser.h.

◆ fWorkDirInit

TList* KVDataAnalyser::fWorkDirInit
protected

list of files in working directory before task runs

Definition at line 95 of file KVDataAnalyser.h.

◆ nbEventToRead

Long64_t KVDataAnalyser::nbEventToRead
private

Definition at line 67 of file KVDataAnalyser.h.


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