AliPhysics  64f4410 (64f4410)
AliOADBForward::Table Class Reference

#include <AliOADBForward.h>

Inheritance diagram for AliOADBForward::Table:

Public Member Functions

 Table (TTree *tree, Bool_t isNew, ERunSelectMode mode=kNear)
 
 Table (const Table &other)
 
 ~Table ()
 
Tableoperator= (const Table &other)
 
void SetVerbose (Bool_t verb=true)
 
void SetEnableFallBack (Bool_t use=true)
 
const Char_tGetTableName () const
 
const Char_tGetName () const
 
void Print (Option_t *option="") const
 
void Browse (TBrowser *b)
 
Bool_t IsOpen (Bool_t rw=false) const
 
Open/close/flush
Bool_t Update ()
 
Bool_t Close ()
 
Queries
Int_t Query (ULong_t runNo=0, ERunSelectMode mode=kNear, UShort_t sys=0, UShort_t sNN=0, Short_t fld=kInvalidField, Bool_t mc=false, Bool_t sat=false) const
 
Int_t Query (ULong_t runNo, ERunSelectMode mode, const TString &q) const
 
Bool_t Insert (TObject *o, ULong_t runNo, UShort_t sys, UShort_t sNN, Short_t field, Bool_t mc=false, Bool_t sat=false, ULong_t aliRev=0, const TString &author="")
 
Int_t GetEntry (ULong_t run=0, ERunSelectMode mode=kNear, UShort_t sys=0, UShort_t sNN=0, Short_t fld=0, Bool_t mc=false, Bool_t sat=false) const
 
EntryGet (ULong_t run=0, ERunSelectMode mode=kNear, UShort_t sys=0, UShort_t sNN=0, Short_t fld=0, Bool_t mc=false, Bool_t sat=false) const
 
TObjectGetData (ULong_t run=0, ERunSelectMode mode=kNear, UShort_t sys=0, UShort_t sNN=0, Short_t fld=0, Bool_t mc=false, Bool_t sat=false) const
 

Public Attributes

TTreefTree
 
EntryfEntry
 
Bool_t fVerbose
 
ERunSelectMode fMode
 
Bool_t fFallBack
 

Detailed Description

A table on the Forward OADB - the underlying storage is a TTree containing Entry objects.

Definition at line 164 of file AliOADBForward.h.

Constructor & Destructor Documentation

AliOADBForward::Table::Table ( TTree tree,
Bool_t  isNew,
ERunSelectMode  mode = kNear 
)

Constructor

Parameters
treeTree
isNewWhether to make the branch
modeHow to select on the run number
Returns

Definition at line 149 of file AliOADBForward.cxx.

AliOADBForward::Table::Table ( const Table other)

Copy constructor

Parameters
otherObject to copy from

Definition at line 175 of file AliOADBForward.cxx.

AliOADBForward::Table::~Table ( )

Destructor.

Closes the corresponding file

Definition at line 190 of file AliOADBForward.cxx.

Member Function Documentation

void AliOADBForward::Table::Browse ( TBrowser *  b)

Browse this table

Definition at line 607 of file AliOADBForward.cxx.

Bool_t AliOADBForward::Table::Close ( )

Close connection

Returns
true on success

Definition at line 261 of file AliOADBForward.cxx.

Referenced by ~Table().

AliOADBForward::Entry * AliOADBForward::Table::Get ( ULong_t  run = 0,
ERunSelectMode  mode = kNear,
UShort_t  sys = 0,
UShort_t  sNN = 0,
Short_t  fld = 0,
Bool_t  mc = false,
Bool_t  sat = false 
) const

Query the tree for an object. The strategy is as follows.

  • First query with all fields
    • If this returns a single entry, return that.
    • If not, then ignore the run number (if given)
      • If this returns a single entry, return that
      • If not, and fall-back is enabled, then
        • Ignore the collision energy (if given)
          • If this returns a single entry, return that.
          • If not, ignore all passed values
            • If this returns a single entry, return that.
            • Otherwise, give up and return null
      • Otherwise, give up and return null

This allow us to specify default objects for a period, and for collision system, energy, and field setting.

Parameters
runRun number
modeRun selection mode
sysCollision system (1: pp, 2: PbPb, 3: pPb)
sNNCenter of mass energy (GeV)
fldL3 magnetic field (kG)
mcFor MC only
satFor satellite interactions
Returns
Found entry, or null

Definition at line 534 of file AliOADBForward.cxx.

Referenced by AliOADBForward::CopyEntry(), AliOADBForward::Get(), and GetData().

TObject * AliOADBForward::Table::GetData ( ULong_t  run = 0,
ERunSelectMode  mode = kNear,
UShort_t  sys = 0,
UShort_t  sNN = 0,
Short_t  fld = 0,
Bool_t  mc = false,
Bool_t  sat = false 
) const

Query the tree for an object. The strategy is as follows.

  • First query with all fields
    • If this returns a single entry, return that.
    • If not, then ignore the run number (if given)
      • If this returns a single entry, return that
      • Otherwise, give up and return null

This allow us to specify default objects for a period, and for collision system, energy, and field setting.

Parameters
runRun number
modeRun selection mode
sysCollision system (1: pp, 2: PbPb, 3: pPb)
sNNCenter of mass energy (GeV)
fldL3 magnetic field (kG)
mcFor MC only
satFor satellite interactions
Returns
Found data, or null

Definition at line 572 of file AliOADBForward.cxx.

Referenced by AliOADBForward::GetData().

Int_t AliOADBForward::Table::GetEntry ( ULong_t  run = 0,
ERunSelectMode  mode = kNear,
UShort_t  sys = 0,
UShort_t  sNN = 0,
Short_t  fld = 0,
Bool_t  mc = false,
Bool_t  sat = false 
) const

Query the tree for an object. The strategy is as follows.

  • First query with all fields
    • If this returns a single entry, return that.
    • If not, then ignore the run number (if given)
      • If this returns a single entry, return that
      • If not, and fall-back is enabled, then
        • Ignore the collision energy (if given)
          • If this returns a single entry, return that.
          • If not, ignore all passed values
            • If this returns a single entry, return that.
            • Otherwise, give up and return -1
      • Otherwise, give up and return -1

This allow us to specify default objects for a period, and for collision system, energy, and field setting.

Parameters
runRun number
modeRun selection mode
sysCollision system (1: pp, 2: PbPb, 3: pPb)
sNNCenter of mass energy (GeV)
fldL3 magnetic field (kG)
mcFor MC only
satFor satellite interactions
Returns
Found entry number, or -1

Definition at line 478 of file AliOADBForward.cxx.

Referenced by AliCorrectionManagerBase::Correction::CleanIt(), and Get().

const Char_t * AliOADBForward::Table::GetName ( ) const

Overload TObject::GetName

Returns
Name

Definition at line 225 of file AliOADBForward.cxx.

Referenced by AliOADBForward::Browse(), Print(), Query(), and ForwardOADBGUI::UseDB().

const Char_t * AliOADBForward::Table::GetTableName ( ) const

Get the name of the tree

Returns
Table name

Definition at line 216 of file AliOADBForward.cxx.

Referenced by GetName().

Bool_t AliOADBForward::Table::Insert ( TObject o,
ULong_t  runNo,
UShort_t  sys,
UShort_t  sNN,
Short_t  field,
Bool_t  mc = false,
Bool_t  sat = false,
ULong_t  aliRev = 0,
const TString author = "" 
)

Insert a new entry into the tree

Parameters
oObject to write
runNoRun number
sysCollision system (1: pp, 2:PbPb, 3:pPb)
sNNCenter of mass energy (GeV)
fieldL3 magnetic field (kG)
mcIf true, only for MC
satFor satellite interactions
aliRevAliROOT revision
authorCreater of this correction
Returns
true on success

Definition at line 413 of file AliOADBForward.cxx.

Referenced by AliOADBForward::CopyEntry(), and AliOADBForward::Insert().

Bool_t AliOADBForward::Table::IsOpen ( Bool_t  rw = false) const

Check if the tree was opened.

Parameters
rwIf true, also check if the file is read/write
Returns
true if everything is dandy

Definition at line 614 of file AliOADBForward.cxx.

Referenced by Close(), Insert(), Print(), Query(), and Update().

AliOADBForward::Table & AliOADBForward::Table::operator= ( const Table other)

Assignemt operator

Parameters
otherObject to assign form
Returns
Reference to this object

Definition at line 199 of file AliOADBForward.cxx.

void AliOADBForward::Table::Print ( Option_t option = "") const

Print the contents of the tree

Parameters
optionPassed to TTree::Scan

Definition at line 590 of file AliOADBForward.cxx.

Referenced by ForwardOADBGUI::HandleList(), and AliOADBForward::Print().

Int_t AliOADBForward::Table::Query ( ULong_t  runNo = 0,
ERunSelectMode  mode = kNear,
UShort_t  sys = 0,
UShort_t  sNN = 0,
Short_t  fld = kInvalidField,
Bool_t  mc = false,
Bool_t  sat = false 
) const

Query the tree

Parameters
runNoRun number
modeRun selection mode
sysCollision system (1: pp, 2: PbPb, 3: pPb)
sNNCenter of mass energy (GeV)
fldL3 magnetic field (kG)
mcFor MC only
satFor satellite events
modeHow to select on the run number
Returns
Found entry number or negative number in case of problems

Definition at line 279 of file AliOADBForward.cxx.

Referenced by GetEntry().

Int_t AliOADBForward::Table::Query ( ULong_t  runNo,
ERunSelectMode  mode,
const TString q 
) const

Run a query with pre-build conditions

Parameters
qquery string
runNoThe given run number
modeRun selection mode
Returns
Entry number of selected entry

Definition at line 295 of file AliOADBForward.cxx.

void AliOADBForward::Table::SetEnableFallBack ( Bool_t  use = true)
inline

Set wheter to enable fall-back queries

Parameters
useIf true, enable fall-back queries

Definition at line 208 of file AliOADBForward.h.

Referenced by AliOADBForward::OpenTable().

void AliOADBForward::Table::SetVerbose ( Bool_t  verb = true)
inline

Set the verbosity

Parameters
verb

Definition at line 202 of file AliOADBForward.h.

Referenced by AliOADBForward::OpenTable().

Bool_t AliOADBForward::Table::Update ( )

Flush to disk

Returns
true on success

Definition at line 235 of file AliOADBForward.cxx.

Member Data Documentation

Bool_t AliOADBForward::Table::fFallBack

Definition at line 426 of file AliOADBForward.h.

Referenced by GetEntry().

Bool_t AliOADBForward::Table::fVerbose

Definition at line 424 of file AliOADBForward.h.

Referenced by Get(), GetEntry(), Insert(), operator=(), and Query().


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