KaliVeda  1.13/01
Heavy-Ion Analysis Toolkit
List of all members | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
KVFAZIASelector Class Reference

Analysis of FAZIA data.

Created by KVClassFactory on Wed Jan 28 09:54:34 2015 Author: Eric Bonnet

Definition at line 16 of file KVFAZIASelector.h.

Public Member Functions

 KVFAZIASelector ()
 
virtual ~KVFAZIASelector ()
 
virtual void CheckEndOfRun ()
 Testing whether EndRun() should be called. More...
 
void ConnectSignalsToDetectors ()
 
Int_t GetCurrentRunNumber () const
 
virtual Int_t GetEntry (Long64_t entry, Int_t getall=0)
 
virtual void Init (TTree *tree)
 
void LinkRawData ()
 
Bool_t NeedToReadRawData () const
 
virtual Bool_t Notify ()
 
virtual void ParseOptions ()
 
Bool_t SetReadingOfRawData (Bool_t need=kFALSE)
 
virtual void SlaveBegin (TTree *tree)
 
- Public Member Functions inherited from KVEventSelector
 KVEventSelector (TTree *=0)
 
KVVarGlobAddGV (const Char_t *class_name, const Char_t *name)
 
void AddGV (KVVarGlob *vg)
 
KVGVListAddGVList (const KVString &list_name, const KVParticleCondition &selection=KVParticleCondition())
 
template<typename HistoType , typename... Args>
HistoType * AddHisto (Args &&... args)
 
void AddHisto (TH1 *histo)
 
TTreeAddTree (const TString &name, const TString &title="")
 Add TTree with given name and title to list of TTree to be filled by user's analysis. More...
 
void AddTree (TTree *tree)
 
virtual Bool_t Analysis ()
 
Bool_t AtEndOfRun (void)
 
virtual void Begin (TTree *tree)
 
Bool_t CreateTreeFile (const Char_t *filename="")
 
virtual void EndAnalysis ()
 
virtual void EndRun ()
 
void FillHisto (const Char_t *sname, const Char_t *label, Double_t weight=1)
 Fill 1D histogram with named bins. More...
 
void FillHisto (const Char_t *sname, Double_t one, Double_t two=1, Double_t three=1, Double_t four=1)
 
void FillTree (const Char_t *sname="")
 
const Char_tGetBranchName () const
 
KVEventGetEvent () const
 
Int_t GetEventNumber () const
 
KVEventGetFriendEvent () const
 
Int_t GetFriendTreeEntry (Long64_t entry, Int_t getall=0)
 
KVVarGlobGetGV (const Char_t *name) const
 
KVGVListGetGVList (const KVString &list_name="default")
 
const KVGVListGetGVList (const KVString &list_name="default") const
 
TH1GetHisto (const Char_t *name) const
 
const KVHashListGetHistoList () const
 return the list of created trees More...
 
TString GetOpt (const Char_t *option) const
 
virtual TListGetOutputList () const
 
TTreeGetTree (const Char_t *name) const
 return the tree named tree_name More...
 
const KVHashListGetTreeList () const
 return the list of created trees More...
 
virtual void InitAnalysis ()
 
void InitFriendTree (TTree *tree, const TString &branchname)
 
virtual void InitRun ()
 
Bool_t IsOptGiven (const Char_t *option)
 
virtual Bool_t Process (Long64_t entry)
 
virtual void RecalculateGlobalVariables ()
 
virtual void SaveHistos (const Char_t *="", Option_t *="recreate", Bool_t=kFALSE)
 
virtual void SetAdditionalBranchAddress ()
 
virtual void SetAnalysisFrame ()
 
void SetBranchName (const Char_t *n)
 
virtual void SetCurrentRun (KVDBRun *)
 
void SetEvent (KVEvent *e)
 
void SetEventsReadInterval (Long64_t N)
 
virtual void SetInputList (TList *input)
 
void SetJobOutputFileName (const TString &filename)
 
virtual void SetObject (TObject *obj)
 
void SetOpt (const Char_t *option, const Char_t *value)
 
void SetParticleConditions (const KVParticleCondition &, const KVString &="")
 
void SetParticleConditionsParticleClassName (const KVString &t)
 
void SetTriggerConditionsForRun (int)
 
virtual void SlaveTerminate ()
 
virtual void Terminate ()
 
void UnsetOpt (const Char_t *opt)
 
virtual Int_t Version () const
 
- Public Member Functions inherited from TSelector
 TSelector ()
 
virtual ~TSelector ()
 
virtual void Abort (const char *why, EAbort what=kAbortProcess)
 
virtual EAbort GetAbort () const
 
virtual TListGetInputList () const
 
virtual const char * GetOption () const
 
virtual Long64_t GetStatus () const
 
virtual void ImportOutput (TList *output)
 
virtual Bool_t ProcessCut (Long64_t)
 
virtual void ProcessFill (Long64_t)
 
virtual void ResetAbort ()
 
virtual void SetOption (const char *option)
 
virtual void SetStatus (Long64_t status)
 
- 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=0)
 
virtual void Execute (TMethod *method, TObjArray *params, Int_t *error=0)
 
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 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 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
 
void Obsolete (const char *method, const char *asOfVers, const char *removedFromVers) const
 
void operator delete (void *ptr)
 
void operator delete[] (void *ptr)
 
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 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=0, Int_t option=0, Int_t bufsize=0)
 
virtual Int_t Write (const char *name=0, Int_t option=0, Int_t bufsize=0) const
 

Static Public Member Functions

static void CheckBatchOutputFiles (const Char_t *kvsname, Bool_t eraseafter=kFALSE)
 
static void CheckListOfWellEndedRuns (const Char_t *kvsname, const Char_t *dsname)
 
static void GetMissingRunsListing (const Char_t *kvsname, const Char_t *dsname)
 
static void Make (const Char_t *kvsname="MyOwnFAZIASelector")
 Automatic generation of KVSelector-derived class for KaliVeda analysis. More...
 
static void MergeListOfEndedRuns (const Char_t *kvsname, const Char_t *dsname)
 
- Static Public Member Functions inherited from TSelector
static TSelectorGetSelector (const char *filename)
 
static Bool_t IsStandardDraw (const char *selec)
 
- Static Public Member Functions inherited from TObject
static Longptr_t GetDtorOnly ()
 
static Bool_t GetObjectStat ()
 
static void SetDtorOnly (void *obj)
 
static void SetObjectStat (Bool_t stat)
 

Protected Member Functions

Bool_t CreateOutputFile ()
 
Bool_t SaveAndCloseOutputFile ()
 
void SetAutomaticManagementOfOutputs (Bool_t automatic=kTRUE)
 
- Protected Member Functions inherited from KVEventSelector
void add_histo (TH1 *histo)
 for merging with PROOF More...
 
void add_tree (TTree *tree)
 
void create_output_file ()
 
void FillTH1 (TH1 *h1, Double_t one, Double_t two)
 
void FillTH2 (TH2 *h2, Double_t one, Double_t two, Double_t three)
 
void FillTH3 (TH3 *h3, Double_t one, Double_t two, Double_t three, Double_t four)
 
void FillTProfile (TProfile *h1, Double_t one, Double_t two, Double_t three)
 
void FillTProfile2D (TProfile2D *h2, Double_t one, Double_t two, Double_t three, Double_t four)
 
void SetCombinedOutputFile (const TString &filename)
 
void SetUpAuxEventChain ()
 
- 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

Bool_t fAutomatic
 
Int_t fCurrentRun
 
TFilefOutputFile
 
TString fOutputPath
 
Bool_t fRawData
 
TString rawdatabranchname
 
KVFAZIARawEventRawEvent
 
- Protected Attributes inherited from KVEventSelector
KVEventAuxEvent
 [optional] events in fAuxChain More...
 
TBranchb_Event
 List of branches. More...
 
KVEventEvent
 Declaration of leaf types. More...
 
TTreefAuxChain
 [optional] pointer to another TTree or TChain which may be used during analysis More...
 
KVString fBranchName
 name of branch which contains events to analyse More...
 
TTreefChain
 pointer to the analyzed TTree or TChain More...
 
KVString fCombinedOutputFile
 name for ROOT file containing histos and/or trees produced by analysis More...
 
Bool_t fDisableCreateTreeFile
 used with PROOF More...
 
Long64_t fEventsRead
 number of events read More...
 
Long64_t fEventsReadInterval
 interval at which to print number of events read More...
 
Bool_t fFirstEvent
 set to kFALSE after first event is read More...
 
Bool_t fGlobalVariableAbortEventAnalysis
 
KVUniqueNameList fGlobalVariables
 Lists of global variables with different selection criteria. More...
 
Bool_t fNotifyCalled
 avoid multiple calls to Notify/InitRun More...
 
KVUserAnalysisOptionList fOptionList
 parsed list of options given to TTree::Process More...
 
KVParticleCondition fPartCond
 (optional) conditions for selecting particles More...
 
KVString fPartName
 (optional) classname for upcasting in KVParticleCondition::Optimize More...
 
Long64_t fTreeEntry
 current tree entry number More...
 
KVHashList lhisto
 list of histograms added with AddHisto More...
 
KVHashList ltree
 list of trees added with AddTree More...
 
TProofOutputFilemergeFile = nullptr
 output file for trees and histos More...
 
TFilewriteFile = nullptr
 
- Protected Attributes inherited from TSelector
EAbort fAbort
 
TListfInput
 
TObjectfObject
 
TString fOption
 
TSelectorListfOutput
 
Long64_t fStatus
 
- Protected Attributes inherited from TObject
 kOnlyPrepStep
 

Additional Inherited Members

- Public Types inherited from TSelector
enum  EAbort
 
- Public Types inherited from TObject
enum  EDeprecatedStatusBits
 
enum  EStatusBits
 
- Public Attributes inherited from TSelector
 kAbortFile
 
 kAbortProcess
 
 kContinue
 
- Public Attributes inherited from TObject
 kBitMask
 
 kCanDelete
 
 kCannotPick
 
 kHasUUID
 
 kInconsistent
 
 kInvalidObject
 
 kIsOnHeap
 
 kIsReferenced
 
 kMustCleanup
 
 kNoContextMenu
 
 kNotDeleted
 
 kObjInCanvas
 
 kOverwrite
 
 kSingleKey
 
 kWriteDelete
 
 kZombie
 

#include <KVFAZIASelector.h>

Inheritance diagram for KVFAZIASelector:
Inheritance graph
[legend]

Constructor & Destructor Documentation

◆ KVFAZIASelector()

KVFAZIASelector::KVFAZIASelector ( )
inline

Definition at line 35 of file KVFAZIASelector.h.

◆ ~KVFAZIASelector()

virtual KVFAZIASelector::~KVFAZIASelector ( )
inlinevirtual

Definition at line 43 of file KVFAZIASelector.h.

Member Function Documentation

◆ CheckBatchOutputFiles()

void KVFAZIASelector::CheckBatchOutputFiles ( const Char_t kvsname,
Bool_t  eraseafter = kFALSE 
)
static

static method

Get the list of output batch files with the format [kvsname]_R*.o* for example : CheckCsIIdentification_R14748-14767.o110904 Extract information on CPU, Memory consuming and the list of ended/not ended files

It is more adapted than the analyse_logs script when several runs are in a same job

output TEnv file is produced with the following information with the following format : [kvsname].joblog example with CheckCsIIdentification.joblog

Nfiles: 21 Runlist: 14588-14905 CpuSys(s): 4.51931 CpuUser(s): 494.547 CpuPerRun: 24.7273 ResMem(MB): 474.09 VirtMem(MB): 1870.77 MissingRuns:

if eraseafter=kTRUE, (kFALSE by default), log files are erased after the checking

Definition at line 628 of file KVFAZIASelector.cpp.

◆ CheckEndOfRun()

void KVFAZIASelector::CheckEndOfRun ( )
virtual

Testing whether EndRun() should be called.

Reimplemented from KVEventSelector.

Definition at line 320 of file KVFAZIASelector.cpp.

◆ CheckListOfWellEndedRuns()

void KVFAZIASelector::CheckListOfWellEndedRuns ( const Char_t kvsname,
const Char_t dsname 
)
static

static method List well ended files in the corresponding directory : FAZIA_SELECTOR_OUTPUTS/[kvsname]/[dsname]/ Only available if the selector you ran had the option SetAutomaticManagementOfOutputs(kTRUE)

Definition at line 344 of file KVFAZIASelector.cpp.

◆ ConnectSignalsToDetectors()

void KVFAZIASelector::ConnectSignalsToDetectors ( )

Definition at line 162 of file KVFAZIASelector.cpp.

◆ CreateOutputFile()

Bool_t KVFAZIASelector::CreateOutputFile ( )
protected

create ROOT file where all outputs coming from the selector will be stores to be active FAZIA_SELECTOR_OUTPUTS shell variable has to be defined in your .cshrc type configuration file the format of the output file will be : FAZIA_SELECTOR_OUTPUTS/nameofthekvfaziaselector/dataset/Rd.root When it is created, the output file name is tmp_Rd.root and renamed at the end of the run Rd.root This helps to know if the entire run has been read

Definition at line 268 of file KVFAZIASelector.cpp.

◆ GetCurrentRunNumber()

Int_t KVFAZIASelector::GetCurrentRunNumber ( ) const
inline

Definition at line 56 of file KVFAZIASelector.h.

◆ GetEntry()

virtual Int_t KVFAZIASelector::GetEntry ( Long64_t  entry,
Int_t  getall = 0 
)
inlinevirtual

Reimplemented from KVEventSelector.

Definition at line 48 of file KVFAZIASelector.h.

◆ GetMissingRunsListing()

void KVFAZIASelector::GetMissingRunsListing ( const Char_t kvsname,
const Char_t dsname 
)
static

static method

Read the TEnv file created by the MergeListOfEndedRuns method with the format listruns_[SYSTEM].env extract the system name and the run list of the well ended file and compare this list to the all run list of the system for the considering dataset The output is a printing of the missing runs compare to the system run list

Definition at line 546 of file KVFAZIASelector.cpp.

◆ Init()

void KVFAZIASelector::Init ( TTree tree)
virtual

The Init() function is called when the selector needs to initialize a new tree or chain. Typically here the branch addresses and branch pointers of the tree will be set. It is normally not necessary to make changes to the generated code, but the routine can be extended by the user if needed. Init() will be called many times when running on PROOF (once per file to be processed). Set object pointer

Reimplemented from KVEventSelector.

Definition at line 84 of file KVFAZIASelector.cpp.

◆ LinkRawData()

void KVFAZIASelector::LinkRawData ( )

Definition at line 151 of file KVFAZIASelector.cpp.

◆ Make()

void KVFAZIASelector::Make ( const Char_t kvsname = "MyOwnFAZIASelector")
static

Automatic generation of KVSelector-derived class for KaliVeda analysis.

Definition at line 201 of file KVFAZIASelector.cpp.

◆ MergeListOfEndedRuns()

void KVFAZIASelector::MergeListOfEndedRuns ( const Char_t kvsname,
const Char_t dsname 
)
static

static method Gather well ended files in the corresponding directory : FAZIA_SELECTOR_OUTPUTS/[kvsname]/[dsname]/ Files are merged using the hadd command the -f option is set, so previous output file is deleted

To avoid mixing, one merging is done for each system

The output file is deduced from system name Example for "48Ca + 48Ca 35.0 MeV/A" gives 48Ca48Ca35.0

An additional TEnv file is created with the format listruns_48Ca48Ca35.0.env to follow the previous example It is a summary of info coming from the merging : System: 48Ca + 48Ca 35.0 MeV/A DataSet: FAZIASYM Selector: CheckCsIIdentification Number: 34 RunList: 14588-14621

Only available if the selector you ran had the option SetAutomaticManagementOfOutputs(kTRUE)

Definition at line 406 of file KVFAZIASelector.cpp.

◆ NeedToReadRawData()

Bool_t KVFAZIASelector::NeedToReadRawData ( ) const
inline

Definition at line 61 of file KVFAZIASelector.h.

◆ Notify()

Bool_t KVFAZIASelector::Notify ( )
virtual

The Notify() function is called when a new file is opened. This can be either for a new TTree in a TChain or when when a new TTree is started when using PROOF. It is normally not necessary to make changes to the generated code, but the routine can be extended by the user if needed. The return value is currently not used.

Reimplemented from KVEventSelector.

Definition at line 125 of file KVFAZIASelector.cpp.

◆ ParseOptions()

void KVFAZIASelector::ParseOptions ( )
virtual

Analyse comma-separated list of options given to TTree::Process and store all "option=value" pairs in fOptionList. Options can then be accessed using IsOptGiven(), GetOptString(), etc.

BranchName=xxxx : change name of branch in TTree containing data
EventsReadInterval=N: print "+++ 12345 events processed +++" every N events
#define N

This method is called by SlaveBegin

Reimplemented from KVEventSelector.

Definition at line 185 of file KVFAZIASelector.cpp.

◆ SaveAndCloseOutputFile()

Bool_t KVFAZIASelector::SaveAndCloseOutputFile ( )
protected

write in and close the ROOT file created by the CreateOutputFile method

Definition at line 293 of file KVFAZIASelector.cpp.

◆ SetAutomaticManagementOfOutputs()

void KVFAZIASelector::SetAutomaticManagementOfOutputs ( Bool_t  automatic = kTRUE)
protected

indicate if outputs (histograms, trees or other objects has to be managed automatically by the selector

to be active FAZIA_SELECTOR_OUTPUTS shell variable has to be defined in your .cshrc type configuration file the format of the output file will be : FAZIA_SELECTOR_OUTPUTS/nameofthekvfaziaselector/dataset/Rd.root

Definition at line 222 of file KVFAZIASelector.cpp.

◆ SetReadingOfRawData()

Bool_t KVFAZIASelector::SetReadingOfRawData ( Bool_t  need = kFALSE)
inline

Definition at line 65 of file KVFAZIASelector.h.

◆ SlaveBegin()

void KVFAZIASelector::SlaveBegin ( TTree tree)
virtual

The SlaveBegin() function is called after the Begin() function. When running with PROOF SlaveBegin() is called on each slave server. The tree argument is deprecated (on PROOF 0 is passed).

Reimplemented from KVEventSelector.

Definition at line 56 of file KVFAZIASelector.cpp.

Member Data Documentation

◆ fAutomatic

Bool_t KVFAZIASelector::fAutomatic
protected

Definition at line 22 of file KVFAZIASelector.h.

◆ fCurrentRun

Int_t KVFAZIASelector::fCurrentRun
protected

Definition at line 20 of file KVFAZIASelector.h.

◆ fOutputFile

TFile* KVFAZIASelector::fOutputFile
protected

Definition at line 23 of file KVFAZIASelector.h.

◆ fOutputPath

TString KVFAZIASelector::fOutputPath
protected

Definition at line 24 of file KVFAZIASelector.h.

◆ fRawData

Bool_t KVFAZIASelector::fRawData
protected

Definition at line 26 of file KVFAZIASelector.h.

◆ rawdatabranchname

TString KVFAZIASelector::rawdatabranchname
protected

Definition at line 28 of file KVFAZIASelector.h.

◆ RawEvent

KVFAZIARawEvent* KVFAZIASelector::RawEvent
protected

Definition at line 27 of file KVFAZIASelector.h.


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