A++ » INC » AtlTask

class AtlTask: public TTask


 Abstract analysis task


 Batch job submission (at HU cluster):


 There are three types of batch job submission:

 1. Run on all nodes: SetBatchNodeAll(kTRUE) The jobs are submitted
 to all free nodes.

 2. Run on specific node: SetBatchNode(node) You can specify the
 node the job is submitted to (eg "ms01b"). Opens a window in
 TBrowser where you can enter the node name.

 3. Automatic job submission: SetBatchNodeAutomatic(kTRUE) Sets node
 automatically, regarding the machine the sample files are saved on.



 !!!!                                                                     !!!!
 !!!! Important note                                                      !!!!
 !!!!                                                                     !!!!
 !!!! The last case is the default and should never be changed. Otherwise !!!!
 !!!! the data will be transferred via the network file system (NFS) from !!!!
 !!!! the computer containing the data disk to the batch node in question !!!!
 !!!! This will put a heavy load both on the network and the NFS server   !!!!
 !!!! machine which causes heavy performance losses of the whole system   !!!!
 !!!! affecting all users.                                                !!!!
 !!!!                                                                     !!!!




 Author: Oliver Maria Kind <mailto: kind@mail.desy.de>
 Update: $Id: AtlTask.cxx,v 1.42 2017/08/08 11:35:19 kaphle Exp $
 Copyright: 2009 (C) Oliver Maria Kind

Function Members (Methods)

 
    This is an abstract class, constructors will not be documented.
    Look at the header to check for available constructors.

public:
virtual~AtlTask()
virtual voidTTask::Abort()MENU
voidTObject::AbstractMethod(const char* method) const
virtual voidTTask::Add(TTask* task)
voidAddInputEntryLists(const char* InputFile)
voidAddInputFiles(const char* InputFiles)
virtual voidTObject::AppendPad(Option_t* option = "")
AtlTask(const AtlTask&)
AtlTask(const char* name, const char* title)
virtual voidTTask::Browse(TBrowser* b)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTTask::CleanTasks()
virtual voidTTask::Clear(Option_t* option = "")
virtual TObject*TNamed::Clone(const char* newname = "") const
virtual Int_tTNamed::Compare(const TObject* obj) const
virtual voidTTask::Continue()MENU
virtual voidTNamed::Copy(TObject& named) const
static voidCopyFolder(TDirectory* SrcDir, TDirectory* DestDir, Float_t scale)
virtual voidCreateGridRunScript()
virtual voidCreateJobHome()
voidCreateLogFilePath()
virtual voidCreateNAFBatchRunScript()
voidCreateOutFilePath()
virtual voidCreateRunScript(Option_t* option = "")
voidCreateRunScriptPath()
virtual voidTObject::Delete(Option_t* option = "")MENU
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidTObject::Dump() constMENU
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidExec(Option_t* option = "")
virtual Bool_tExecBatchJob(Option_t* option)
virtual voidExecGridJob(Option_t* option)
virtual voidExecInteractiveJob(Option_t* option)
virtual voidExecNAFBatchJob(Option_t* option)
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidExecuteTask(Option_t* option = "")MENU
virtual voidTTask::ExecuteTasks(Option_t* option)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual voidTNamed::FillBuffer(char*& buffer)
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
Bool_tGetBatchJob()
Bool_tGetBatchNodeAll()
Bool_tGetBatchNodeAutomatic()
Char_tGetBatchNodeFromPath(const char* path)
Int_tTTask::GetBreakin() const
Int_tTTask::GetBreakout() const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
Bool_tGetGridJob()
virtual const char*TObject::GetIconName() const
Bool_tGetInteractiveJob()
TList*TTask::GetListOfTasks() const
Bool_tGetLogFile()
Bool_tGetNAFBatchJob()
virtual const char*TNamed::GetName() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
virtual const char*TNamed::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTNamed::Hash() const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidTObject::Inspect() constMENU
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
Bool_tTTask::IsActive() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTTask::IsFolder() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTNamed::IsSortable() const
Bool_tTObject::IsZombie() const
virtual voidTTask::ls(Option_t* option = "*") constMENU
voidTObject::MayNotUse(const char* method) const
virtual Bool_tTObject::Notify()
voidTObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const
voidTObject::operator delete(void* ptr)
voidTObject::operator delete(void* ptr, void* vp)
voidTObject::operator delete[](void* ptr)
voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
AtlTask&operator=(const AtlTask&)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidTNamed::Print(Option_t* option = "") const
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
voidTObject::ResetBit(UInt_t f)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(ostream& out, Option_t* option = "")
voidTTask::SetActive(Bool_t active = kTRUE)TOGGLE
virtual voidSetBatchJob(Bool_t BatchJob)TOGGLE
voidSetBatchNode(const char* BatchNode)MENU
voidSetBatchNodeAll(Bool_t BatchNodeAll)TOGGLE
voidSetBatchNodeAutomatic(Bool_t BatchNodeAutomatic)TOGGLE
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
voidTTask::SetBreakin(Int_t breakin = 1)TOGGLE
voidTTask::SetBreakout(Int_t breakout = 1)TOGGLE
voidSetDebug(Int_t level)
voidSetDebugBuild(Int_t level)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
voidSetFirstEntry(Int_t FirstEntry)MENU
voidSetGridCmtVersion(const char* CmtVersion)MENU
virtual voidSetGridJob(Bool_t GridJob)TOGGLE
voidSetGridRootVersion(const char* RootVersion)MENU
voidSetGridSuffix(const char* suffix)MENU
voidSetGridUserName(const char* UserName)MENU
virtual voidSetInteractiveJob(Bool_t InteractiveJob)TOGGLE
voidSetJobHome(const char* JobHome)MENU
voidSetLogFile(Bool_t LogFile)TOGGLE
virtual voidSetNAFBatchJob(Bool_t NAFBatchJob)TOGGLE
virtual voidTNamed::SetName(const char* name)MENU
virtual voidTNamed::SetNameTitle(const char* name, const char* title)
voidSetNEvents(Int_t NEvents)MENU
static voidTObject::SetObjectStat(Bool_t stat)
voidSetOutputFile(const char* OutputFile)
voidSetOutputTree(const char* name, const char* title)MENU
voidSetTempOutputFile(const char* OutputFile)
voidSetTempOutputPath(const char* OutputPath)
virtual voidTNamed::SetTitle(const char* title = "")MENU
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector& insp) const
virtual Int_tTNamed::Sizeof() const
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
virtual Bool_tSubmitBatchJob()
virtual voidSubmitGridJob()
virtual voidSubmitNAFBatchJob()
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
virtual Bool_tWriteEnvSetup(ofstream& out) const
protected:
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidTObject::MakeZombie()

Data Members

public:
static TObject::(anonymous)TObject::kBitMask
static TObject::EStatusBitsTObject::kCanDelete
static TObject::EStatusBitsTObject::kCannotPick
static TObject::EStatusBitsTObject::kHasUUID
static TObject::EStatusBitsTObject::kInvalidObject
static TObject::(anonymous)TObject::kIsOnHeap
static TObject::EStatusBitsTObject::kIsReferenced
static TObject::EStatusBitsTObject::kMustCleanup
static TObject::EStatusBitsTObject::kNoContextMenu
static TObject::(anonymous)TObject::kNotDeleted
static TObject::EStatusBitsTObject::kObjInCanvas
static TObject::(anonymous)TObject::kOverwrite
static TObject::(anonymous)TObject::kSingleKey
static TObject::(anonymous)TObject::kWriteDelete
static TObject::(anonymous)TObject::kZombie
protected:
Bool_tTTask::fActivetrue if task is active
Bool_tfBatchJobBatch job execution
TStringfBatchNodeNode on which to run the job
Bool_tfBatchNodeAllSubmit batch job to all nodes
Bool_tfBatchNodeAutomaticSubmit batch job to node automatically set
Int_tTTask::fBreakin=1 if a break point set at task extry
Int_tTTask::fBreakout=1 if a break point set at task exit
Int_tfDebugDebug flag for derived tasks
Int_tfDebugBuildDebug flag for derived tasks (during build)
Long64_tfFirstEntrySkip FirstEntry-1 events
TString*fGridCmtVersionCmt version for Grid submission
Bool_tfGridJobGrid job execution
TString*fGridRootVersionRoot version for Grid submission
TString*fGridSuffixSuffix for grid dataset names
TString*fGridUserNameGrid user name
Bool_tTTask::fHasExecutedTrue if task has executed
TList*fInputEntryListsInput entry lists file names
TList*fInputFilesInput file names
Bool_tfInteractiveJobInteractive job execution
Bool_tfIsTestIs test job ?
TString*fJobHomeJob working directory
Bool_tfLogFileWrite output to logfile
TString*fLogFilePathLogfile path
Bool_tfNAFBatchJobNAF Batch job execution
Long64_tfNEventsNo. of events to process
TStringTNamed::fNameobject identifier
Char_tfNodeNode on which to run the jpb
TStringTTask::fOptionOption specified in ExecuteTask
TString*fOutputFileNameName of the output file
TNamed*fOutputTreeNameName and title of the output tree (if any)
TString*fRunScriptRunscript path
TList*TTask::fTasksList of Tasks
TString*fTempLogFilePathTemporarily logfile path
TString*fTempOutputFileNameTemporarily output file name
TString*fTempOutputPathTemporarily output path (must start with "/")
TStringTNamed::fTitleobject title
static TTask*TTask::fgBeginTaskpointer to task initiator
static TTask*TTask::fgBreakPointpointer to current break point

Class Charts

Inheritance Chart:
TObject
TNamed
TTask
AtlTask
AtlAppAnalysisTask
AtlBDTAnalysisTask
AtlDataMCPlotterTask
AtlHforSplittingTask
AtlHistFactoryTask
AtlHistFactoryBreakdownEntry
AtlHistFactoryPlotterTask
AtlHistFactoryYieldTableTask
AtlMemTkAnalysisTask
AtlMergingTask
 [more...]

Function documentation

AtlTask(const char* name, const char* title)
 Default constructor

~AtlTask()
 Default destructor

void AddInputFiles(const char* InputFiles)
 Add files to input chain (wildcards allowed)

void AddInputEntryLists(const char* InputFile)
 Add files to input entrylists

void SetOutputFile(const char* OutputFile)
 Set output file name

void SetTempOutputFile(const char* OutputFile)
 Set temporarily output file name during batch job

void SetInteractiveJob(Bool_t InteractiveJob)
 Set execution mode to interactive
 Switch off writing to logfile

void SetBatchJob(Bool_t BatchJob)
 Set execution mode to batch job
 Switch on writing to logfile

void SetNAFBatchJob(Bool_t NAFBatchJob)
 Set execution mode to batch job
 Switch on writing to logfile

void SetGridJob(Bool_t GridJob)
 Set execution mode to Grid job
 Switch on writing to logfile

void SetOutputTree(const char* name, const char* title)
 Set name and title of the output tree

void SetBatchNodeAutomatic(Bool_t BatchNodeAutomatic)
 Submit job to automatically set node

void SetBatchNodeAll(Bool_t BatchNodeAll)
 Submit job to all nodes

void SetBatchNode(const char* BatchNode)
 Set batch node (eg. "ms01b")

Char_t GetBatchNodeFromPath(const char* path)
 Extract batch node from path name (usually of input filenames)
 Jobs should run on the node where the input data resides to
 minimise network traffic. The data disks at the HU cluster are
 labelled /datm1, /datm2, /datm3, /dats1 etc, w.r.t. the machine name.
 If the node name cannot be found '1' will be returned

void Exec(Option_t* option = "")
 Task execution

 Options available:
  "test" - run in test modus: process 1000 events only
           and append _test to the output filename

void SetJobHome(const char* JobHome)
 Set working directory for the job.

void CreateJobHome()
 Create working directory for this job (for log files etc) In
 case no directory was given so far by SetJobHome() create a
 directory with the job's name in the current working directory

void CreateRunScriptPath()
 Create full path to the runscript used for batch job submission

void CreateLogFilePath()
 Create full path to the logfile

void CreateOutFilePath()
 Create path to the output file(s).  In case the already given
 outfile name is absolute (ie starts with'/') do nothing.
 Otherwise prepend the JobHome path

Bool_t SubmitBatchJob()
 Batch job submission If no node had been specified it is tried
 to guess the node name from the input file list

 Returns kFALSE in case of error in batch job submission

void SubmitNAFBatchJob()
 Batch job submission If no node had been specified it is tried
 to guess the node name from the input file list

void SubmitGridJob()
 Grid job submission

void SetTempOutputPath(const char* OutputPath)
 Set temporarily output path for local HU batch system

void CopyFolder(TDirectory* SrcDir, TDirectory* DestDir, Float_t scale)
 Recursively copying of the content (histograms, subfolders) of the given source
 directory to the destination folder.
 All histograms will be scaled by the given factor.

 Search source content
void SetGridRootVersion(const char* RootVersion)
 Set grid root version

void SetGridCmtVersion(const char* CmtVersion)
 Set grid cmt version

void SetGridUserName(const char* UserName)
 Set grid root version

void SetGridSuffix(const char* suffix)
 Set grid root version

Bool_t WriteEnvSetup(ofstream& out) const
 Generates the shell command(s) that set up the current A++/ROOT/... environment.
 Returns kFALSE if it's not known how to set up the environment.

AtlTask(const char* name, const char* title)
void ExecInteractiveJob(Option_t* option)
void ExecGridJob(Option_t* option)
Bool_t ExecBatchJob(Option_t* option)
void ExecNAFBatchJob(Option_t* option)
void CreateRunScript(Option_t* option = "")
void CreateNAFBatchRunScript()
void CreateGridRunScript()
Bool_t GetBatchNodeAll()
{ return fBatchNodeAll; }
Bool_t GetBatchNodeAutomatic()
Bool_t GetInteractiveJob()
{ return fInteractiveJob; }
Bool_t GetBatchJob()
{ return fBatchJob; }
Bool_t GetNAFBatchJob()
{ return fNAFBatchJob; }
Bool_t GetGridJob()
{ return fGridJob; }
Bool_t GetLogFile()
{ return fLogFile; }
void ExecuteTask(Option_t* option = "")
{ TTask::ExecuteTask(option); }
void SetNEvents(Int_t NEvents)
{ fNEvents = NEvents; }
void SetFirstEntry(Int_t FirstEntry)
{ fFirstEntry = FirstEntry; }
void SetLogFile(Bool_t LogFile)
{ fLogFile = LogFile; }
void SetDebug(Int_t level)
{ fDebug = level; }
void SetDebugBuild(Int_t level)
{ fDebugBuild = level; }