AliPhysics  f05a842 (f05a842)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Railway Struct Referenceabstract
Inheritance diagram for Railway:

Public Types

enum  EMode { kLocal, kProof, kGrid }
 
enum  EOperation {
  kTest, kOffline, kSubmit, kTerminate,
  kFull
}
 
enum  EInput { kESD, kAOD, kUser }
 

Public Member Functions

 Railway (const Railway &o)
 
Railwayoperator= (const Railway &)
 
Loading stuff
virtual void UsePar (Bool_t &use)
 
virtual Bool_t AddIncludePath (const TString &path)
 
virtual Bool_t LoadLibrary (const TString &name, Bool_t slave=true, Bool_t forcePar=false)=0
 
virtual Bool_t LoadSource (const TString &name, bool copy=false)
 
virtual Bool_t LoadAux (const TString &name, Bool_t copy=false)
 
virtual Bool_t LoadROOT ()
 
virtual Bool_t LoadAliROOT ()
 
virtual Bool_t LoadAliPhysics ()
 
Mode of exection
virtual UShort_t Mode () const =0
 
virtual const char * ModeString () const
 
virtual UShort_t Operation () const
 
Processing
virtual Bool_t PreSetup ()=0
 
virtual Bool_t PostSetup ()=0
 
virtual Long64_t Run (Long64_t nEvents=-1)=0
 
virtual Bool_t AddMonitor (const TString &)
 

Static Public Member Functions

Create a railway
static RailwayCreate (const TUrl &url, Int_t verbose=0)
 
static RailwayCreateObject (const TString &cl, const TUrl &url, Int_t verbose=0)
 
static void ShowUrlHelp (const TString &cl)
 
static void ShowFullHelp (const TString &cl)
 

Protected Member Functions

Loading things
const TStringMakeLibraryName (const TString &name)
 
virtual Bool_t AuxFile (TString &name, bool copy=false)
 

Static Protected Member Functions

Helper to figure out what we're doing
static UShort_t DeduceType (const TString &str)
 

Protected Attributes

TUrl fUrl
 
OptionList fOptions
 
Int_t fVerbose
 

Input/output

virtual Short_t InputType () const
 
virtual Bool_t IsMC () const
 
virtual TString OutputPath () const
 
virtual TString OutputLocation () const
 
TChainLocalChain ()
 

Various help functions

virtual void Print (Option_t *="") const
 
virtual const Char_tUrlHelp () const =0
 
virtual const char * Desc () const =0
 
const TUrlUrl () const
 
const OptionListOptions () const
 
virtual void AuxSave (const TString &, Bool_t)
 
 Railway (const TUrl &url, Int_t verbose)
 
virtual Bool_t ParseOptions ()
 
virtual ~Railway ()
 

Detailed Description

Helper class to set-up an analysis using a train

Definition at line 49 of file Railway.C.

Member Enumeration Documentation

Enumerator
kESD 
kAOD 
kUser 

Definition at line 63 of file Railway.C.

Enumerator
kLocal 
kProof 
kGrid 

Definition at line 51 of file Railway.C.

Enumerator
kTest 
kOffline 
kSubmit 
kTerminate 
kFull 

Definition at line 56 of file Railway.C.

Constructor & Destructor Documentation

Railway::Railway ( const Railway o)
inline

Definition at line 68 of file Railway.C.

Railway::Railway ( const TUrl url,
Int_t  verbose 
)
inlineprotected

Constructor

Parameters
urlSet-up URL
verboseVerbosity level

Definition at line 469 of file Railway.C.

virtual Railway::~Railway ( )
inlineprotectedvirtual

Destructor

Definition at line 483 of file Railway.C.

Member Function Documentation

virtual Bool_t Railway::AddIncludePath ( const TString path)
inlinevirtual

Add an include path

Parameters
pathThe path to add for header search
Returns
true on success

Reimplemented in ProofRailway, and PluginRailway.

Definition at line 201 of file Railway.C.

Referenced by PluginRailway::AddIncludePath(), and ProofRailway::AddIncludePath().

virtual Bool_t Railway::AddMonitor ( const TString )
inlinevirtual

Add a monitor object - only for PROOF

Definition at line 419 of file Railway.C.

virtual Bool_t Railway::AuxFile ( TString name,
bool  copy = false 
)
inlineprotectedvirtual

Link an auxilary file to working directory

Parameters
nameName of the file
copyCopy rather than link
Returns
true on success

Reimplemented in ProofRailway, and GridRailway.

Definition at line 524 of file Railway.C.

Referenced by GridRailway::AuxFile(), ProofRailway::AuxFile(), LoadAux(), and LoadSource().

virtual void Railway::AuxSave ( const TString ,
Bool_t   
)
inlinevirtual

Write auxillary ROOT (and possible shell) script for more (post-)processing e.g., terminate

Reimplemented in ProofRailway, and GridRailway.

Definition at line 460 of file Railway.C.

Referenced by TrainSetup::SaveSetup().

Railway * Railway::Create ( const TUrl url,
Int_t  verbose = 0 
)
static

Create a helper object.

Parameters
verboseVerbosity
urlUrl describing the job.
  • Local mode:
local://<path>[#<treeName>][?[recursive[&]]]

<path> can be a single ROOT file, a text file with one entry per file to add to the chain, or a directory containing the files. If <path> does not start with a '/' then it is interpreted as a relative path.

  • Grid mode:
alien:///<path>#<pattern>
  • PROOF mode:

Several options

lite:
proof:///<path>[?[recursive[&]][workers=<n>]][#treeName]
proof://<host>/<dsname>[?[workers=<n>[&]][dsname[=<outname>]]][#treeName]

Note, if <host> is recognised as an Alice Analysis Facility, then the Grid handler (AliAnalysisAlien) is used unless the option plain was given.

Returns
Newly allocated helper or null

Definition at line 653 of file Railway.C.

Referenced by TrainSetup::Help(), and TrainSetup::Init().

static Railway* Railway::CreateObject ( const TString cl,
const TUrl url,
Int_t  verbose = 0 
)
inlinestatic

Create an instance of a helper class

Definition at line 122 of file Railway.C.

Referenced by Create(), ShowFullHelp(), and ShowUrlHelp().

static UShort_t Railway::DeduceType ( const TString str)
inlinestaticprotected

Deduce the top of job from a string

Parameters
strString
Returns
Job type

Definition at line 633 of file Railway.C.

Referenced by InputType().

virtual const char* Railway::Desc ( ) const
pure virtual
Returns
Short description string

Implemented in ProofRailway, GridRailway, PluginRailway, LiteRailway, VAFRailway, AAFPluginRailway, LocalRailway, and AAFRailway.

Referenced by TrainSetup::Help(), and ShowFullHelp().

virtual Short_t Railway::InputType ( ) const
inlinevirtual

Get the input data type

Returns
Input data type

Definition at line 338 of file Railway.C.

Referenced by TrainSetup::Init().

virtual Bool_t Railway::IsMC ( ) const
inlinevirtual

Check if the MC option was set

Returns
true if the MC option was given

Definition at line 354 of file Railway.C.

Referenced by TrackletAODdNdeta::CreateCentralitySelection(), MakedNdetaTrain::CreateTasks(), TrackletAODdNdeta::CreateTasks(), TrainSetup::Init(), MakeAODTrain::SavedNdeta(), and BothAODTrain::SavedNdeta().

virtual Bool_t Railway::LoadAliPhysics ( )
inlinevirtual

Set-up to load the AliROOT libraries

Returns
true on success

Reimplemented in ProofRailway, and PluginRailway.

Definition at line 298 of file Railway.C.

Referenced by TrainSetup::Init().

virtual Bool_t Railway::LoadAliROOT ( )
inlinevirtual

Set-up to load the AliROOT libraries

Returns
true on success

Reimplemented in ProofRailway, PluginRailway, and VAFRailway.

Definition at line 279 of file Railway.C.

Referenced by TrainSetup::Init().

virtual Bool_t Railway::LoadAux ( const TString name,
Bool_t  copy = false 
)
inlinevirtual
virtual Bool_t Railway::LoadROOT ( )
inlinevirtual

Load needed ROOT libaries

Definition at line 265 of file Railway.C.

Referenced by TrainSetup::Init().

virtual Bool_t Railway::LoadSource ( const TString name,
bool  copy = false 
)
inlinevirtual

Load a source file, and compile it

Parameters
nameName of the source file
copyCopy rather than link
Returns
true on success

Reimplemented in ProofRailway, and PluginRailway.

Definition at line 231 of file Railway.C.

Referenced by BothAODTrain::CoupleTrackletCar(), TrackletdNdetaTrain::CreateTask(), MakeTrackletTrain::CreateTask(), TrackletAODTrain::CreateTasks(), TrackletAODdNdeta::CreateTasks(), PluginRailway::LoadSource(), and ProofRailway::LoadSource().

TChain* Railway::LocalChain ( )
inlineprotected

Create a local chain based on URL and options

Returns
Chain or null

Definition at line 575 of file Railway.C.

Referenced by LiteRailway::PostSetup(), LocalRailway::PostSetup(), and ProofRailway::Run().

const TString& Railway::MakeLibraryName ( const TString name)
inlineprotected

Normalize a library name

Parameters
name
Returns

Definition at line 497 of file Railway.C.

Referenced by LocalRailway::LoadLibrary(), PluginRailway::LoadLibrary(), and ProofRailway::LoadLibrary().

virtual UShort_t Railway::Mode ( ) const
pure virtual
virtual const char* Railway::ModeString ( ) const
inlinevirtual

Get the mode string used for AliAnalysisManager::StartAnalysis

Reimplemented in ProofRailway, AAFPluginRailway, LocalRailway, and GridRailway.

Definition at line 321 of file Railway.C.

virtual UShort_t Railway::Operation ( ) const
inlinevirtual

Get the operation - this only makes sense for Grid jobs

Returns
Operation type

Reimplemented in GridRailway.

Definition at line 327 of file Railway.C.

Referenced by TrainSetup::SetupWorkingDirectory().

Railway& Railway::operator= ( const Railway )
inline
const OptionList& Railway::Options ( ) const
inline

Get the list of options

Returns
Reference to list of options

Definition at line 454 of file Railway.C.

Referenced by TrainSetup::Help(), MakeAODTrain::SavedNdeta(), BothAODTrain::SavedNdeta(), TrainSetup::SaveSetup(), and ShowFullHelp().

virtual TString Railway::OutputLocation ( ) const
inlinevirtual

Get the location of the output data. Use ful to define second pass scripts, etc.

Returns
Url string

Definition at line 369 of file Railway.C.

Referenced by MakeAODTrain::SavedNdeta(), and BothAODTrain::SavedNdeta().

virtual TString Railway::OutputPath ( ) const
inlinevirtual

The file part of tehe output URL - overwritten by derived classes.

Returns
File part of output URL

Reimplemented in ProofRailway, GridRailway, and LiteRailway.

Definition at line 361 of file Railway.C.

Referenced by OutputLocation(), MakeAODTrain::SaveDownloadAODs(), and MakeFMDMCTrackTrain::SaveDownloadTrees().

virtual Bool_t Railway::ParseOptions ( )
inlineprotectedvirtual

Definition at line 475 of file Railway.C.

Referenced by Create().

virtual Bool_t Railway::PostSetup ( )
pure virtual

Set-up done after task setup

Returns
true on success

Implemented in ProofRailway, PluginRailway, GridRailway, AAFPluginRailway, LocalRailway, and LiteRailway.

Referenced by TrainSetup::Init().

virtual Bool_t Railway::PreSetup ( )
pure virtual

Set-up done before task setup

Returns
true on success

Implemented in ProofRailway, GridRailway, PluginRailway, VAFRailway, LocalRailway, LiteRailway, AAFRailway, and AAFPluginRailway.

Referenced by TrainSetup::Init().

virtual void Railway::Print ( Option_t = "") const
inlinevirtual

Print information to standard output

Returns

Reimplemented in ProofRailway, and PluginRailway.

Definition at line 430 of file Railway.C.

Referenced by PluginRailway::Print(), TrainSetup::Print(), and ProofRailway::Print().

virtual Long64_t Railway::Run ( Long64_t  nEvents = -1)
pure virtual

Run the analysis

Parameters
nEventsNumber of events to analyse
Returns
The return value of AliAnalysisManager::StartAnalysis

Implemented in ProofRailway, GridRailway, PluginRailway, AAFPluginRailway, LiteRailway, and LocalRailway.

Referenced by TrainSetup::Run().

static void Railway::ShowFullHelp ( const TString cl)
inlinestatic

Show help on URL and options using the interpreter

Parameters
clRailway class

Definition at line 163 of file Railway.C.

Referenced by Create().

static void Railway::ShowUrlHelp ( const TString cl)
inlinestatic

Show help on URL using the interpreter

Parameters
clRailway class

Definition at line 151 of file Railway.C.

Referenced by Create(), and TrainSetup::Help().

const TUrl& Railway::Url ( ) const
inline

Get the input URL

Returns
Input URL

Definition at line 448 of file Railway.C.

virtual const Char_t* Railway::UrlHelp ( ) const
pure virtual
void Railway::UsePar ( Bool_t use)
virtual

Set whether to use pars. On return, the argument is set to the old value. So to temporaruly turn off pars, do

Bool_t usePar = false;
fRailway->UsePar(usePar); // usePar is now old value
// Load real libraries
fRailway->UsePar(usePar); // Restore old value
Parameters
useWhether to use pars or not. On return contains old value

Reimplemented in ProofRailway, and PluginRailway.

Definition at line 651 of file Railway.C.

Referenced by TrainSetup::LoadOADB().

Member Data Documentation

Int_t Railway::fVerbose
protected

Definition at line 644 of file Railway.C.

Referenced by LocalChain(), LiteRailway::Run(), and ProofRailway::Run().


The documentation for this struct was generated from the following file: