AliPhysics  63e47e1 (63e47e1)
OptionList Struct Reference

Classes

struct  Link
 

Public Member Functions

 OptionList ()
 
 OptionList (const OptionList &other)
 
 ~OptionList ()
 
void Delete ()
 
OptionListoperator= (const OptionList &other)
 
void SetDescription (const TString &d)
 
void Copy (const OptionList &other)
 
void DebugLink (const Link *link) const
 
OptionFind (const TString &name) const
 
OptionAdd (const TString &name, const TString &arg, const TString &desc, const TString &val="")
 
OptionAdd (const TString &name, const TString &desc)
 
OptionAdd (const TString &name, const TString &desc, Bool_t def)
 
OptionAdd (const TString &name, const TString &arg, const TString &desc, Int_t val, Bool_t asHex=false)
 
OptionAdd (const TString &name, const TString &arg, const TString &desc, Long64_t val, Bool_t asHex=false)
 
OptionAdd (const TString &name, const TString &arg, const TString &desc, Double_t val)
 
void Remove (const TString &name)
 
Bool_t Has (const TString &name) const
 
const TStringGet (const TString &name) const
 
Bool_t GetF (const TString &name, const Char_t *format,...) const
 
Bool_t AsBool (const TString &name) const
 
Int_t AsInt (const TString &name, Int_t def=0) const
 
Long64_t AsLong (const TString &name, Long64_t def=0) const
 
Double_t AsDouble (const TString &name, Double_t def=0) const
 
const char * AsString (const TString &name, const TString &def="") const
 
const TStringAsTString (const TString &name, const TString &def="") const
 
void SetF (const TString &name, const Char_t *format,...)
 
void Set (const TString &name, const TString &value)
 
void Set (const TString &name)
 
void Set (const TString &name, Int_t val, Bool_t asHex=false)
 
void Set (const TString &name, Long64_t val, Bool_t asHex=false)
 
void Set (const TString &name, Double_t val)
 
Bool_t Parse (const TString &tmp, const TString &delims)
 
Bool_t Parse (const TCollection *opts, Bool_t ignoreUnknown=false)
 
void Widest (Int_t &nWidth, Int_t &aWidth) const
 
void HelpDesc (std::ostream &o, const TString &prefix="", const Int_t max=70) const
 
void Help (std::ostream &o, const char *prefix=" ") const
 
void Show (std::ostream &o, const char *prefix=" ") const
 
void Store (std::ostream &o, const char *prefix="", const char *delim=",", bool quote=true, bool onlySet=false) const
 

Static Public Member Functions

static void Test (const char *opts="")
 

Public Attributes

LinkfList
 
TString fDesc
 

Detailed Description

A List of options

Definition at line 263 of file Option.C.

Constructor & Destructor Documentation

OptionList::OptionList ( )
inline

Constructor

Definition at line 303 of file Option.C.

OptionList::OptionList ( const OptionList other)
inline

Copy constructor

Parameters
otherObject to copy from

Definition at line 309 of file Option.C.

OptionList::~OptionList ( )
inline

Destructor

Definition at line 322 of file Option.C.

Member Function Documentation

Option* OptionList::Add ( const TString name,
const TString desc 
)
inline

Add an option with no argument

Parameters
nameName of option
descDescription
Returns
Newly created option

Definition at line 473 of file Option.C.

Option* OptionList::Add ( const TString name,
const TString desc,
Bool_t  def 
)
inline

Add an option with no argument

Parameters
nameName of option
descDescription
defDefault value (true, or false)
Returns
Newly created option

Definition at line 487 of file Option.C.

Option* OptionList::Add ( const TString name,
const TString arg,
const TString desc,
Int_t  val,
Bool_t  asHex = false 
)
inline

Add an option with argument

Parameters
nameName of option
argDummy argument
descDescription
valDefault value
asHexIf true, interpret as hex number
Returns
Newly added option

Definition at line 506 of file Option.C.

Option* OptionList::Add ( const TString name,
const TString arg,
const TString desc,
Long64_t  val,
Bool_t  asHex = false 
)
inline

Add an option with argument

Parameters
nameName of option
argDummy argument
descDescription
valDefault value
asHexIf true, interpret as hex
Returns
Newly added option

Definition at line 529 of file Option.C.

Option* OptionList::Add ( const TString name,
const TString arg,
const TString desc,
Double_t  val 
)
inline

Add an option with argument

Parameters
nameName of option
argDummy argument
descDescription
valDefault value
Returns
Newly added option

Definition at line 551 of file Option.C.

Double_t OptionList::AsDouble ( const TString name,
Double_t  def = 0 
) const
inline

Return value of an option as a double precision real number

Parameters
nameName of option
defDefault value if options isn't found
Returns
Value or default value

Definition at line 673 of file Option.C.

Referenced by MakeFlowTrain::AddQCTasks(), MakedNdetaTrain::CoupledNdetaCar(), BothdNdetaTrain::CoupledNdetaCar(), BothAODTrain::CoupleForwardCar(), MakeFullTrain::CreateFlowTasks(), MakeTrackletTrain::CreateTask(), MakeMultDistsTrain::CreateTasks(), MakeFMDELossTrain::CreateTasks(), MakeAODTrain::CreateTasks(), and TrainSetup::FromOption().

Long64_t OptionList::AsLong ( const TString name,
Long64_t  def = 0 
) const
inline

Return value of an option as an integer

Parameters
nameName of option
defDefault value if options isn't found
Returns
Value or default value

Definition at line 659 of file Option.C.

Referenced by TrainSetup::FromOption(), LiteRailway::Run(), TrainSetup::Run(), and ProofRailway::Run().

const TString& OptionList::AsTString ( const TString name,
const TString def = "" 
) const
inline

return value of an option as a string

Parameters
nameName of option
defDefault valie if option isn't found
Returns
Value or default value

Definition at line 701 of file Option.C.

void OptionList::Copy ( const OptionList other)
inline

Copy list from other object

Parameters
otherObject to copy from

Definition at line 365 of file Option.C.

void OptionList::DebugLink ( const Link link) const
inline

Definition at line 382 of file Option.C.

void OptionList::Delete ( )
inline

Remove all options

Definition at line 327 of file Option.C.

Option* OptionList::Find ( const TString name) const
inline

Find an optio by name

Parameters
nameName of option to find
Returns
Pointer to option or null

Definition at line 401 of file Option.C.

Referenced by GridRailway::RegisterRuns(), TrainSetup::SaveSetup(), and Test().

const TString& OptionList::Get ( const TString name) const
inline

Get the value of an option

Parameters
nameName of option
Returns
Value of option, or empty string

Definition at line 596 of file Option.C.

Referenced by MakeFlowTrain::AddEPTasks(), GridRailway::AddFiles(), MakeFlowTrain::AddQCTasks(), TrainSetup::AddTender(), AAFRailway::AliPhysicsParName(), AAFRailway::AliROOTParName(), BothAODTrain::CoupleClusterCar(), BothAODTrain::CoupleForwardCar(), TrackletAODTrain::CouplePreCars(), BothAODTrain::CouplePreCars(), TrackletdNdetaTrain::CoupleTrackletCar(), BothdNdetaTrain::CoupleTrackletCar(), ProofRailway::CreateAliROOTPar(), MakeFullTrain::CreateAODTasks(), MakeFullTrain::CreatedNdetaTask(), MakeFullTrain::CreateFlowTasks(), TrainSetup::CreateInputHandler(), TrainSetup::CreatePhysicsSelection(), TrackletdNdetaTrain::CreateTask(), MakeTrackletTrain::CreateTask(), ELossTimeTrain::CreateTasks(), MakeQATrain::CreateTasks(), MakeFMDELossTrain::CreateTasks(), MakeAODTrain::CreateTasks(), MakedNdetaTrain::CreateTasks(), TrackletAODTrain::CreateTasks(), TrackletAODdNdeta::CreateTasks(), BothdNdetaTrain::CreateTasks(), ProofRailway::EnableSpecial(), VAFRailway::GetDataSet(), TrainSetup::Help(), TrainSetup::Init(), Railway::InputType(), GridRailway::Operation(), AAFPluginRailway::PostSetup(), GridRailway::PostSetup(), PluginRailway::PostSetup(), ProofRailway::PostSetup(), AAFPluginRailway::PreSetup(), AAFRailway::PreSetup(), PluginRailway::PreSetup(), ProofRailway::PreSetup(), GridRailway::RegisterRuns(), TrainSetup::Run(), ProofRailway::Run(), TrainSetup::SaveSetupROOT(), TrainSetup::SaveSetupShell(), and GridRailway::ScanFiles().

Bool_t OptionList::GetF ( const TString name,
const Char_t format,
  ... 
) const
inline

Get a value using a format statement. Remember argument(s) must be passed by address (as pointers)

Parameters
nameName of option
formatFormat statement. Remeber, double and long needs the "l" modifier
Returns
true on success

Definition at line 612 of file Option.C.

Referenced by Test().

Bool_t OptionList::Has ( const TString name) const
inline

Check if a given option was set externally

Parameters
nameName of option
Returns
true if option exists and was set externally

Definition at line 584 of file Option.C.

Referenced by GridRailway::AuxSave(), BothAODTrain::CoupleClusterCar(), AODTrain::CoupleFilter(), AODTrain::CoupleForward(), BothAODTrain::CoupleForwardCar(), AODTrain::CoupleJetAN(), TrackletAODTrain::CouplePostCars(), BothAODTrain::CouplePostCars(), TrackletAODTrain::CouplePreCars(), BothAODTrain::CouplePreCars(), TrackletdNdetaTrain::CoupleTrackletCar(), BothdNdetaTrain::CoupleTrackletCar(), MakeFullTrain::CreateAODTasks(), MakeTestADTrain::CreateCentralitySelection(), MakeQATrain::CreateCentralitySelection(), MakeFMDELossTrain::CreateCentralitySelection(), TrackletAODdNdeta::CreateCentralitySelection(), TrackletAODTrain::CreateCentralitySelection(), MakeAODTrain::CreateCentralitySelection(), AODTrain::CreateCentralitySelection(), BothAODTrain::CreateCentralitySelection(), TrainSetup::CreateCentralitySelection(), MakeFullTrain::CreateFlowTasks(), AODTrain::CreateMCHandler(), AODTrain::CreatePhysicsSelection(), MakeQATrain::CreateTasks(), MakeMCCorrTrain::CreateTasks(), MakeFMDELossTrain::CreateTasks(), MakeAODTrain::CreateTasks(), MakedNdetaTrain::CreateTasks(), TrackletAODdNdeta::CreateTasks(), BothdNdetaTrain::CreateTasks(), AODTrain::CreateTasks(), MakeFullTrain::CreateTasks(), ProofRailway::EnableSpecial(), TrainSetup::Help(), TrainSetup::Init(), Railway::InputType(), Railway::IsMC(), Railway::LocalChain(), GridRailway::Operation(), ProofRailway::OutputPath(), AAFPluginRailway::PostSetup(), GridRailway::PostSetup(), PluginRailway::PostSetup(), ProofRailway::PostSetup(), AAFPluginRailway::PreSetup(), AAFRailway::PreSetup(), VAFRailway::PreSetup(), PluginRailway::PreSetup(), ProofRailway::PreSetup(), TrainSetup::Run(), MakeMCCorrTrain::SaveDraw(), TrainSetup::SetupWorkingDirectory(), and TrainSetup::Version().

void OptionList::Help ( std::ostream &  o,
const char *  prefix = "  " 
) const
inline

Display option help

Parameters
oOutput stream
prefixPrefix for each option.

Definition at line 903 of file Option.C.

Referenced by TrainSetup::Help(), TrainSetup::SaveSetupROOT(), TrainSetup::SaveSetupShell(), and Railway::ShowFullHelp().

void OptionList::HelpDesc ( std::ostream &  o,
const TString prefix = "",
const Int_t  max = 70 
) const
inline

Definition at line 867 of file Option.C.

OptionList& OptionList::operator= ( const OptionList other)
inline

Assignment operator

Parameters
otherObject to assign from
Returns
reference to this

Definition at line 346 of file Option.C.

Bool_t OptionList::Parse ( const TString tmp,
const TString delims 
)
inline

Parse the options given in tmp

Parameters
tmpString to pass
delimsDelimiters
Returns
true on success

Definition at line 796 of file Option.C.

Referenced by Railway::ParseOptions(), and Test().

Bool_t OptionList::Parse ( const TCollection opts,
Bool_t  ignoreUnknown = false 
)
inline

Parse options given in a collection

Parameters
optsList of arguments
ignoreUnknownIf true, ignore unknown options
Returns
true on success

Definition at line 812 of file Option.C.

void OptionList::Remove ( const TString name)
inline

Remove an option

Parameters
nameName of option to remove

Definition at line 564 of file Option.C.

Referenced by LiteRailway::LiteRailway(), TrainSetup::SaveSetupROOT(), and Test().

void OptionList::Set ( const TString name)
inline

Set a flag

Parameters
nameName of flag

Definition at line 747 of file Option.C.

void OptionList::Set ( const TString name,
Int_t  val,
Bool_t  asHex = false 
)
inline

Set long integer value

Parameters
nameName of option
valValue
asHexIf true, interpret as hex

Definition at line 760 of file Option.C.

void OptionList::Set ( const TString name,
Long64_t  val,
Bool_t  asHex = false 
)
inline

Set long integer value

Parameters
nameName of option
valValue
asHexIf true, interpret as hex value

Definition at line 772 of file Option.C.

void OptionList::Set ( const TString name,
Double_t  val 
)
inline

Set double precision floating point value

Parameters
nameName of option
valValue

Definition at line 784 of file Option.C.

void OptionList::SetDescription ( const TString d)
inline
void OptionList::SetF ( const TString name,
const Char_t format,
  ... 
)
inline

Set value using a format statement

Parameters
nameName of option.
formatFormat statement

Definition at line 715 of file Option.C.

Referenced by Test().

void OptionList::Show ( std::ostream &  o,
const char *  prefix = "  " 
) const
inline

Show the values of options

Parameters
oOutput stream
prefixPrefix for each option

Definition at line 928 of file Option.C.

Referenced by Railway::LocalChain(), MakeFlowTrain::MakeFlowTrain(), MakeFullTrain::MakeFullTrain(), TrainSetup::Print(), Railway::Print(), and Test().

void OptionList::Store ( std::ostream &  o,
const char *  prefix = "",
const char *  delim = ",",
bool  quote = true,
bool  onlySet = false 
) const
inline

Show the values of options

Parameters
oOutput stream
prefixPrefix for each option
delimDelimters
quoteQuote output
onlySetif true, only output set options

Definition at line 951 of file Option.C.

Referenced by TrainSetup::SaveSetupROOT(), and TrainSetup::SaveSetupShell().

static void OptionList::Test ( const char *  opts = "")
inlinestatic

Definition at line 975 of file Option.C.

void OptionList::Widest ( Int_t nWidth,
Int_t aWidth 
) const
inline

Find the widest name and dummy argument

Parameters
nWidthOn return, the largest width of option names
aWidthOn return, the largest width of option dummy args

Definition at line 852 of file Option.C.

Member Data Documentation

TString OptionList::fDesc

Definition at line 973 of file Option.C.

Link* OptionList::fList

Definition at line 972 of file Option.C.

Referenced by Copy().


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