KaliVeda
Toolkit for HIC analysis
Loading...
Searching...
No Matches
KVDataAnalyser Class Reference

Detailed Description

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 dataset (experiment) to analyse
  • the type of analysis task to perform
  • the data files to analyse
  • whether to use a batch system to execute the analysis

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
if (gDataAnalyser->GetBatchSystem())
SetCombinedOutputFile(Form("%s.root", gDataAnalyser->GetBatchSystem()->GetJobName()));
else
SetCombinedOutputFile(Form("Analysis_results.root"));
char * Form(const char *fmt,...)
virtual const Char_t * GetJobName() const
virtual const KVBatchSystem * GetBatchSystem()

Definition at line 61 of file KVDataAnalyser.h.

#include <KVDataAnalyser.h>

Inheritance diagram for KVDataAnalyser:

Public Types

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

Public Member Functions

 KVDataAnalyser ()
 Default constructor.
 
virtual ~KVDataAnalyser ()
 Default destructor.
 
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.
 
void ChooseRunningMode ()
 
void ChooseUserClass ()
 Choose the user's analysis class.
 
void DeleteBatchStatusFile () const
 Delete batch status file (and backup - '.bak') for batch job.
 
void DoStatusUpdate (Long64_t nevents) const
 Print infos on events treated, disk usage, memory usage.
 
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.
 
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 TString &)
 
virtual void RegisterUserClass (TObject *)
 
virtual void Reset ()
 
virtual void Run ()
 Check all task variables, then run analyser.
 
virtual void RunMenus ()
 Run data analyser in menu-driven mode.
 
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.
 
void UseBaseClassSubmitTask ()
 
virtual void WriteBatchEnvFile (const TString &, 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=nullptr)
 
virtual void Execute (TMethod *method, TObjArray *params, Int_t *error=nullptr)
 
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 TClassIsA () const
 
Bool_t IsDestructed () const
 
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, void *vp)
 
void operator delete[] (void *ptr)
 
void operator delete[] (void *ptr, void *vp)
 
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 Streamer (TBuffer &)
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
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=nullptr, Int_t option=0, Int_t bufsize=0)
 
virtual Int_t Write (const char *name=nullptr, 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 TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 
static Longptr_t GetDtorOnly ()
 
static Bool_t GetObjectStat ()
 
static void SetDtorOnly (void *obj)
 
static void SetObjectStat (Bool_t stat)
 

Private Member Functions

virtual Bool_t CheckIfUserClassIsValid (const KVString &alternative_base_class="")
 
virtual Bool_t CheckWhatToAnalyseAndHow ()
 
virtual void ChooseWhatToAnalyse ()
 TO IMPLEMENT ?
 
virtual void ChooseWhatToDo ()
 TO IMPLEMENT ?
 
void CopyAnalysisResultsToLaunchDirectory ()
 
const Char_tGetACliCMode ()
 
TEnvGetBatchInfoFile () const
 
TObjectGetInstanceOfUserClass (const KVString &alternative_base_class="")
 
virtual Bool_t NeedToChooseWhatToAnalyse () const
 
virtual Bool_t NeedToChooseWhatToDo () const
 
void OpenBatchInfoFile (const TString &filename)
 
virtual void PostRunReset ()
 
virtual Bool_t PreSubmitCheck ()
 
void ScanWorkingDirectory (TList **)
 
virtual void set_up_analyser_for_task (KVDataAnalyser *the_analyser)
 

Private Attributes

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

Static Private Attributes

static Bool_t fCleanAbort = kFALSE
 flag to force abort of processing
 

Additional Inherited Members

- Public Attributes inherited from TObject
 kBitMask
 
 kCanDelete
 
 kCannotPick
 
 kHasUUID
 
 kInconsistent
 
 kInvalidObject
 
 kIsOnHeap
 
 kIsReferenced
 
 kMustCleanup
 
 kNoContextMenu
 
 kNotDeleted
 
 kObjInCanvas
 
 kOverwrite
 
 kSingleKey
 
 kWriteDelete
 
 kZombie
 
- 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 inherited from TObject
 kOnlyPrepStep
 

Member Enumeration Documentation

◆ EProofMode

Enumerator
None 
Lite 
Proof 

Definition at line 140 of file KVDataAnalyser.h.

Constructor & Destructor Documentation

◆ KVDataAnalyser()

KVDataAnalyser::KVDataAnalyser ( )

Default constructor.

Definition at line 35 of file KVDataAnalyser.cpp.

◆ ~KVDataAnalyser()

KVDataAnalyser::~KVDataAnalyser ( )
virtual

Default destructor.

Definition at line 64 of file KVDataAnalyser.cpp.

Member Function Documentation

◆ AbortProcessingLoop()

static Bool_t KVDataAnalyser::AbortProcessingLoop ( )
inlinestatic

Definition at line 162 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 1277 of file KVDataAnalyser.cpp.

◆ BatchMode()

Bool_t KVDataAnalyser::BatchMode ( ) const
inline

Definition at line 197 of file KVDataAnalyser.h.

◆ CheckIfUserClassIsValid()

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

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 454 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 1034 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 KVOnlineReconDataAnalyser, KVINDRAReconDataAnalyser, and KVReconDataAnalyser.

Definition at line 199 of file KVDataAnalyser.cpp.

◆ CheckWhatToAnalyseAndHow()

Bool_t KVDataAnalyser::CheckWhatToAnalyseAndHow ( )
privatevirtual

Reimplemented in KVDataSetAnalyser.

Definition at line 237 of file KVDataAnalyser.cpp.

◆ ChooseNbEventToRead()

void KVDataAnalyser::ChooseNbEventToRead ( )

Ask user to set number of events to read.

Definition at line 358 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 1068 of file KVDataAnalyser.cpp.

◆ ChooseUserClass()

void KVDataAnalyser::ChooseUserClass ( )

Choose the user's analysis class.

Definition at line 408 of file KVDataAnalyser.cpp.

◆ ChooseWhatToAnalyse()

void KVDataAnalyser::ChooseWhatToAnalyse ( )
privatevirtual

TO IMPLEMENT ?

Reimplemented in KVDataSetAnalyser.

Definition at line 1297 of file KVDataAnalyser.cpp.

◆ ChooseWhatToDo()

void KVDataAnalyser::ChooseWhatToDo ( )
privatevirtual

TO IMPLEMENT ?

Reimplemented in KVDataSetAnalyser.

Definition at line 1307 of file KVDataAnalyser.cpp.

◆ CopyAnalysisResultsToLaunchDirectory()

void KVDataAnalyser::CopyAnalysisResultsToLaunchDirectory ( )
private

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 1120 of file KVDataAnalyser.cpp.

◆ DeleteBatchStatusFile()

void KVDataAnalyser::DeleteBatchStatusFile ( ) const

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

Definition at line 1017 of file KVDataAnalyser.cpp.

◆ DoStatusUpdate()

void KVDataAnalyser::DoStatusUpdate ( Long64_t  nevents) const

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

Definition at line 1046 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 426 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 KVDataSetAnalyser, and KVSimDirAnalyser.

Definition at line 902 of file KVDataAnalyser.cpp.

◆ GetACliCMode()

const Char_t * KVDataAnalyser::GetACliCMode ( )
private

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 494 of file KVDataAnalyser.cpp.

◆ GetAnalysedRun()

virtual KVDBRun * KVDataAnalyser::GetAnalysedRun ( ) const
inlinevirtual

Reimplemented in KVDataSetAnalyser, and KVSimDirFilterAnalyser.

Definition at line 391 of file KVDataAnalyser.h.

◆ GetAnalysedSystem()

virtual KVDBSystem * KVDataAnalyser::GetAnalysedSystem ( ) const
inlinevirtual

Reimplemented in KVDataSetAnalyser, and KVSimDirFilterAnalyser.

Definition at line 387 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 KVINDRAReconDataAnalyser, KVSimDirAnalyser, and KVReconDataAnalyser.

Definition at line 398 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 387 of file KVDataAnalyser.cpp.

◆ GetAnalysisTask()

KVDataAnalysisTask * KVDataAnalyser::GetAnalysisTask ( ) const
inline

Definition at line 242 of file KVDataAnalyser.h.

◆ GetBatchInfoFile()

TEnv * KVDataAnalyser::GetBatchInfoFile ( ) const
inlineprivate

Definition at line 115 of file KVDataAnalyser.h.

◆ GetBatchName()

const Char_t * KVDataAnalyser::GetBatchName ( )
inline

Definition at line 205 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 976 of file KVDataAnalyser.cpp.

◆ GetBatchSystem()

virtual const KVBatchSystem * KVDataAnalyser::GetBatchSystem ( )
inlinevirtual

Definition at line 215 of file KVDataAnalyser.h.

◆ GetDataType()

const KVString & KVDataAnalyser::GetDataType ( ) const
inline

Definition at line 246 of file KVDataAnalyser.h.

◆ GetInstanceOfUserClass()

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

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 542 of file KVDataAnalyser.cpp.

◆ GetKinematics()

virtual const KV2Body * KVDataAnalyser::GetKinematics ( ) const
inlinevirtual
Returns
pointer to KV2Body object describing kinematics of reaction being analysed

Reimplemented in KVDataSetAnalyser, and KVSimDirFilterAnalyser.

Examples
ExampleFilteredSimDataAnalysis.cpp, and ExampleINDRAAnalysis.cpp.

Definition at line 383 of file KVDataAnalyser.h.

◆ 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 940 of file KVDataAnalyser.cpp.

◆ GetNbEventToRead()

Long64_t KVDataAnalyser::GetNbEventToRead ( void  ) const
inline

Definition at line 272 of file KVDataAnalyser.h.

◆ GetNumberOfFilesToAnalyse()

virtual Int_t KVDataAnalyser::GetNumberOfFilesToAnalyse ( ) const
inlinevirtual

Reimplemented in KVDataSetAnalyser, and KVSimDirAnalyser.

Definition at line 180 of file KVDataAnalyser.h.

◆ GetParent()

KVDataAnalyser * KVDataAnalyser::GetParent ( ) const
inline

Definition at line 293 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 958 of file KVDataAnalyser.cpp.

◆ GetProofMode()

EProofMode KVDataAnalyser::GetProofMode ( ) const
inline

Definition at line 152 of file KVDataAnalyser.h.

◆ GetRecognisedAutoBatchNameKeywords()

const Char_t * KVDataAnalyser::GetRecognisedAutoBatchNameKeywords ( ) const
virtual

Reimplemented in KVDataSetAnalyser.

Definition at line 925 of file KVDataAnalyser.cpp.

◆ GetRootDirectoryOfDataToAnalyse()

virtual KVString KVDataAnalyser::GetRootDirectoryOfDataToAnalyse ( ) const
inlinevirtual

Reimplemented in KVDataSetAnalyser, and KVSimDirAnalyser.

Definition at line 370 of file KVDataAnalyser.h.

◆ GetStatusUpdateInterval()

Double_t KVDataAnalyser::GetStatusUpdateInterval ( ) const
inline

Definition at line 235 of file KVDataAnalyser.h.

◆ GetTotalEntriesToRead()

virtual Long64_t KVDataAnalyser::GetTotalEntriesToRead ( ) const
inlinevirtual

Reimplemented in KVRawDataAnalyser, KVINDRAReconDataAnalyser, and KVReconDataAnalyser.

Definition at line 226 of file KVDataAnalyser.h.

◆ GetUserClass()

const Char_t * KVDataAnalyser::GetUserClass ( )
inline

Definition at line 171 of file KVDataAnalyser.h.

◆ GetUserClassDec()

const KVString & KVDataAnalyser::GetUserClassDec ( ) const
inline

Definition at line 302 of file KVDataAnalyser.h.

◆ GetUserClassImp()

const KVString & KVDataAnalyser::GetUserClassImp ( ) const
inline

Definition at line 298 of file KVDataAnalyser.h.

◆ GetUserClassOptions()

const KVString & KVDataAnalyser::GetUserClassOptions ( ) const
inline

Definition at line 335 of file KVDataAnalyser.h.

◆ GetUserIncludes()

const KVString & KVDataAnalyser::GetUserIncludes ( ) const
inline

Definition at line 250 of file KVDataAnalyser.h.

◆ GetUserLibraries()

const KVString & KVDataAnalyser::GetUserLibraries ( ) const
inline

Definition at line 254 of file KVDataAnalyser.h.

◆ IsMenus()

Bool_t KVDataAnalyser::IsMenus ( ) const
inline

Definition at line 350 of file KVDataAnalyser.h.

◆ IsQuit()

Bool_t KVDataAnalyser::IsQuit ( ) const
inline

Definition at line 358 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 1259 of file KVDataAnalyser.cpp.

◆ IsSubmit()

Bool_t KVDataAnalyser::IsSubmit ( ) const
inline

Definition at line 366 of file KVDataAnalyser.h.

◆ IsUserClassValid()

Bool_t KVDataAnalyser::IsUserClassValid ( ) const
inline

Definition at line 175 of file KVDataAnalyser.h.

◆ NeedToChooseWhatToAnalyse()

virtual Bool_t KVDataAnalyser::NeedToChooseWhatToAnalyse ( ) const
inlineprivatevirtual

Reimplemented in KVDataSetAnalyser, and KVSimDirAnalyser.

Definition at line 128 of file KVDataAnalyser.h.

◆ NeedToChooseWhatToDo()

virtual Bool_t KVDataAnalyser::NeedToChooseWhatToDo ( ) const
inlineprivatevirtual

Reimplemented in KVDataSetAnalyser.

Definition at line 124 of file KVDataAnalyser.h.

◆ OpenBatchInfoFile()

void KVDataAnalyser::OpenBatchInfoFile ( const TString filename)
inlineprivate

Make sure fBatchEnv is correctly initialised for writing/reading the batch info file

If filename != currently open filename, or if no file is opened, the file will be opened

Definition at line 105 of file KVDataAnalyser.h.

◆ postAnalysis()

virtual void KVDataAnalyser::postAnalysis ( )
inlinevirtual

Reimplemented in KVReconRawDataAnalyser.

Definition at line 321 of file KVDataAnalyser.h.

◆ postEndAnalysis()

virtual void KVDataAnalyser::postEndAnalysis ( )
inlinevirtual

Definition at line 325 of file KVDataAnalyser.h.

◆ postEndRun()

virtual void KVDataAnalyser::postEndRun ( )
inlinevirtual

Reimplemented in KVReconRawDataAnalyser.

Definition at line 323 of file KVDataAnalyser.h.

◆ postInitAnalysis()

virtual void KVDataAnalyser::postInitAnalysis ( )
inlinevirtual

Definition at line 317 of file KVDataAnalyser.h.

◆ postInitRun()

virtual void KVDataAnalyser::postInitRun ( )
inlinevirtual

Definition at line 319 of file KVDataAnalyser.h.

◆ PostRunReset()

void KVDataAnalyser::PostRunReset ( )
privatevirtual

Reimplemented in KVDataSetAnalyser.

Definition at line 518 of file KVDataAnalyser.cpp.

◆ preAnalysis()

virtual void KVDataAnalyser::preAnalysis ( )
inlinevirtual

◆ preEndAnalysis()

virtual void KVDataAnalyser::preEndAnalysis ( )
inlinevirtual

Definition at line 324 of file KVDataAnalyser.h.

◆ preEndRun()

virtual void KVDataAnalyser::preEndRun ( )
inlinevirtual

Definition at line 322 of file KVDataAnalyser.h.

◆ preInitAnalysis()

virtual void KVDataAnalyser::preInitAnalysis ( )
inlinevirtual

◆ preInitRun()

◆ PreSubmitCheck()

virtual Bool_t KVDataAnalyser::PreSubmitCheck ( )
inlineprivatevirtual

Reimplemented in KVDataSetAnalyser.

Definition at line 119 of file KVDataAnalyser.h.

◆ ReadBatchEnvFile()

Bool_t KVDataAnalyser::ReadBatchEnvFile ( const TString 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 KVSimDirAnalyser, and KVDataSetAnalyser.

Definition at line 722 of file KVDataAnalyser.cpp.

◆ RegisterUserClass()

virtual void KVDataAnalyser::RegisterUserClass ( TObject )
inlinevirtual

◆ Reset()

void KVDataAnalyser::Reset ( )
virtual

Reimplemented in KVDataSetAnalyser, KVINDRAReconDataAnalyser, and KVReconDataAnalyser.

Definition at line 76 of file KVDataAnalyser.cpp.

◆ Run()

void KVDataAnalyser::Run ( )
virtual

Check all task variables, then run analyser.

Reimplemented in KVDataTransfer.

Definition at line 101 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 1228 of file KVDataAnalyser.cpp.

◆ RunMenus()

void KVDataAnalyser::RunMenus ( )
virtual

Run data analyser in menu-driven mode.

Definition at line 170 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 819 of file KVDataAnalyser.cpp.

◆ ScanWorkingDirectory()

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

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

Definition at line 1103 of file KVDataAnalyser.cpp.

◆ set_up_analyser_for_task()

void KVDataAnalyser::set_up_analyser_for_task ( KVDataAnalyser the_analyser)
privatevirtual

Reimplemented in KVDataSetAnalyser.

Definition at line 833 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 157 of file KVDataAnalyser.h.

◆ SetAnalysedTree()

virtual void KVDataAnalyser::SetAnalysedTree ( TTree )
inlinevirtual

Reimplemented in KVINDRAReconDataAnalyser, and KVReconDataAnalyser.

Definition at line 397 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 259 of file KVDataAnalyser.cpp.

◆ SetAuxFileList()

virtual void KVDataAnalyser::SetAuxFileList ( TList )
inlinevirtual

Reimplemented in KVSimDirAnalyser.

Definition at line 262 of file KVDataAnalyser.h.

◆ SetBatchMode()

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

Definition at line 193 of file KVDataAnalyser.h.

◆ SetBatchName()

void KVDataAnalyser::SetBatchName ( const Char_t batchname)
inline

Definition at line 201 of file KVDataAnalyser.h.

◆ SetBatchSystem()

void KVDataAnalyser::SetBatchSystem ( KVBatchSystem bs)
inline

Definition at line 209 of file KVDataAnalyser.h.

◆ SetDataType()

void KVDataAnalyser::SetDataType ( const Char_t name)
inline

Definition at line 279 of file KVDataAnalyser.h.

◆ SetFileList()

virtual void KVDataAnalyser::SetFileList ( TList )
inlinevirtual

Reimplemented in KVSimDirAnalyser.

Definition at line 258 of file KVDataAnalyser.h.

◆ SetMenus()

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

Definition at line 346 of file KVDataAnalyser.h.

◆ SetNbEventToRead()

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

Definition at line 267 of file KVDataAnalyser.h.

◆ SetParent()

void KVDataAnalyser::SetParent ( KVDataAnalyser da)
inline

Definition at line 289 of file KVDataAnalyser.h.

◆ SetProofMode()

void KVDataAnalyser::SetProofMode ( EProofMode  e)
inline

Definition at line 148 of file KVDataAnalyser.h.

◆ SetQuit()

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

Definition at line 354 of file KVDataAnalyser.h.

◆ SetStatusUpdateInterval()

void KVDataAnalyser::SetStatusUpdateInterval ( double  t)
inline

Definition at line 231 of file KVDataAnalyser.h.

◆ SetSubmit()

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

Definition at line 362 of file KVDataAnalyser.h.

◆ SetTriggerConditionsForRun()

virtual void KVDataAnalyser::SetTriggerConditionsForRun ( int  )
inlinevirtual

Reimplemented in KVSimDirFilterAnalyser, KVINDRAReconDataAnalyser, and KVReconDataAnalyser.

Definition at line 395 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 650 of file KVDataAnalyser.cpp.

◆ SetUserClassOptions()

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

Definition at line 331 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 278 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 315 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 KVFAZIARawDataAnalyser, KVFAZIAReconDataAnalyser, KVINDRADSTReader, KVINDRADstToRootTransfert, KVINDRAGeneDataAnalyser, KVDataTransfer, KVRawDataAnalyser, KVINDRAReconDataAnalyser, KVSimDirAnalyser, KVOnlineReconDataAnalyser, and KVReconDataAnalyser.

Definition at line 850 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 996 of file KVDataAnalyser.cpp.

◆ UseBaseClassSubmitTask()

void KVDataAnalyser::UseBaseClassSubmitTask ( )
inline

Definition at line 376 of file KVDataAnalyser.h.

◆ WriteBatchEnvFile()

void KVDataAnalyser::WriteBatchEnvFile ( const TString 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 KVINDRAReconDataAnalyser, KVSimDirAnalyser, KVOnlineReconDataAnalyser, and KVDataSetAnalyser.

Definition at line 673 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 1162 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 66 of file KVDataAnalyser.h.

◆ fBatchEnv

std::unique_ptr<TEnv> KVDataAnalyser::fBatchEnv
private

batch environment file

Definition at line 85 of file KVDataAnalyser.h.

◆ fBatchName

KVString KVDataAnalyser::fBatchName
private

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

Definition at line 67 of file KVDataAnalyser.h.

◆ fBatchSystem

KVBatchSystem* KVDataAnalyser::fBatchSystem
private

batch system to use for submission of job

Definition at line 86 of file KVDataAnalyser.h.

◆ fChoseRunMode

Bool_t KVDataAnalyser::fChoseRunMode
private

set to kTRUE once running mode has been set/chosen

Definition at line 87 of file KVDataAnalyser.h.

◆ fCleanAbort

Bool_t KVDataAnalyser::fCleanAbort = kFALSE
staticprivate

flag to force abort of processing

Definition at line 90 of file KVDataAnalyser.h.

◆ fDataType

KVString KVDataAnalyser::fDataType
private

datatype chosen by user

Definition at line 65 of file KVDataAnalyser.h.

◆ fIncludes

KVString KVDataAnalyser::fIncludes
private

user's include directories

Definition at line 74 of file KVDataAnalyser.h.

◆ fLibraries

KVString KVDataAnalyser::fLibraries
private

user's libraries

Definition at line 75 of file KVDataAnalyser.h.

◆ fMenus

Bool_t KVDataAnalyser::fMenus
private

set to kTRUE in menu-driven mode

Definition at line 70 of file KVDataAnalyser.h.

◆ fParent

KVDataAnalyser* KVDataAnalyser::fParent
private

holds address of parent analyser which created this one

Definition at line 83 of file KVDataAnalyser.h.

◆ fProofMode

EProofMode KVDataAnalyser::fProofMode
private

Definition at line 146 of file KVDataAnalyser.h.

◆ fQuit

Bool_t KVDataAnalyser::fQuit
private

set to kTRUE when user wants to quit

Definition at line 71 of file KVDataAnalyser.h.

◆ fStatusUpdateInterval

Double_t KVDataAnalyser::fStatusUpdateInterval
private

Definition at line 93 of file KVDataAnalyser.h.

◆ fSubmit

Bool_t KVDataAnalyser::fSubmit
private

set to kTRUE when user wants to submit task

Definition at line 72 of file KVDataAnalyser.h.

◆ fTask

KVDataAnalysisTask* KVDataAnalyser::fTask
private

task chosen by user

Definition at line 64 of file KVDataAnalyser.h.

◆ fUseBaseClassSubmitTask

Bool_t KVDataAnalyser::fUseBaseClassSubmitTask
private

Definition at line 91 of file KVDataAnalyser.h.

◆ fUserClass

KVString KVDataAnalyser::fUserClass
private

user's analysis class

Definition at line 76 of file KVDataAnalyser.h.

◆ fUserClassAlternativeBaseClass

KVString KVDataAnalyser::fUserClassAlternativeBaseClass
private

alternative base class for user's analysis class

Definition at line 81 of file KVDataAnalyser.h.

◆ fUserClassDec

KVString KVDataAnalyser::fUserClassDec
private

user's analysis class header file

Definition at line 78 of file KVDataAnalyser.h.

◆ fUserClassImp

KVString KVDataAnalyser::fUserClassImp
private

user's analysis class implementation file

Definition at line 77 of file KVDataAnalyser.h.

◆ fUserClassIsOK

Bool_t KVDataAnalyser::fUserClassIsOK
private

set once user class has been validated

Definition at line 79 of file KVDataAnalyser.h.

◆ fUserClassOptions

KVString KVDataAnalyser::fUserClassOptions
private

options to be passed to user analysis class

Definition at line 80 of file KVDataAnalyser.h.

◆ fWorkDirEnd

TList* KVDataAnalyser::fWorkDirEnd
private

list of files in working directory after task runs

Definition at line 89 of file KVDataAnalyser.h.

◆ fWorkDirInit

TList* KVDataAnalyser::fWorkDirInit
private

list of files in working directory before task runs

Definition at line 96 of file KVDataAnalyser.h.

◆ nbEventToRead

Long64_t KVDataAnalyser::nbEventToRead
private

Definition at line 68 of file KVDataAnalyser.h.