1 #ifndef KVEventSelector_h
2 #define KVEventSelector_h
11 #include "KVParticleCondition.h"
12 #include "KVHashList.h"
16 #include "KVUserAnalysisOptionList.h"
20 #include "KVDataAnalyser.h"
21 #include "KVTreeVectorBranchHandler.h"
22 #include "KVDataAnalysisTreeHistoHandler.h"
221 Bool_t fGlobalVariableAbortEventAnalysis;
239 Bool_t fDisableCreateTreeFile;
240 TFile* writeFile =
nullptr;
244 void add_histo(
TH1* histo);
247 void SetUpAuxEventChain();
268 create_output_file();
270 void create_output_file();
271 virtual void CheckEndOfRun();
276 virtual void ParseOptions();
282 void RecalculateGlobalVariables();
283 void SetAnalysisFrame()
295 fEventsRead(0), fEventsReadInterval(100), fNotifyCalled(
kFALSE), fDisableCreateTreeFile(
kFALSE)
301 fEventsReadInterval =
N;
346 return fBranchName.
Data();
483 if (list_name !=
"" &&
GetGVList(list_name)) {
484 KVError::Error(
this,
"AddGVList",
"You tried to add a list with the same name '%s' as an existing list: no list created",
488 auto gvl =
new KVGVList(list_name, selection);
489 fGlobalVariables.
Add(gvl);
511 if (list_name ==
"default") {
513 fGlobalVariables.
Add(
l);
515 else if (list_name ==
"__internal__") {
541 KVError::Error(
this,
"AddGV(KVVarGlob*)",
"KVVarGlob pointer is null");
570 KVError::Error(
this,
"GetGV(const Char_t* name)",
"Request for undefined global variable name=%s",
name);
590 KVError::Info(
this,
"SaveHistos",
"Method no longer implemented. Does nothing.");
654 #define AddVar(var,type) Branch(dadastr(var), &var, didixstr(duduvartype(var,type)))
655 #define AddVarBranch(var,branch,type) Branch(dadastr(branch), &var, didixstr(duduvartype(branch,type)))
656 #define duduvartype(var,type) var/type
657 #define didixstr(s) dadastr(s)
658 #define dadastr(s) #s
#define ClassDefOverride(name, id)
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void input
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char filename
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
char * Form(const char *fmt,...)
TVector3 GetCMVelocity() const
Return vector velocity of centre of mass of reaction (units: cm/ns)
virtual const Char_t * GetJobName() const
Description of an experimental run in database ,,.
virtual void SetTriggerConditionsForRun(int)
virtual const KVBatchSystem * GetBatchSystem()
virtual const KV2Body * GetKinematics() const
EProofMode GetProofMode() const
static Bool_t IsRunningBatchAnalysis()
Methods to facilitate creation and use of histograms and TTrees in user analysis.
General purpose analysis base class for TTree containing KVEvent objects.
Bool_t Process(Long64_t entry) override
virtual void SaveHistos(const Char_t *="", Option_t *="recreate", Bool_t=kFALSE)
void AddGV(KVVarGlob *vg)
KVVarGlob * GetGV(const Char_t *name) const
void SetObject(TObject *obj) override
KVEventSelector(TTree *=0)
Int_t GetFriendTreeEntry(Long64_t entry, Int_t getall=0)
const Char_t * GetBranchName() const
virtual void InitAnalysis()
void SetParticleConditions(const KVParticleCondition &cond)
void SetOpt(const Char_t *option, const Char_t *value)
void Init(TTree *tree) override
virtual Bool_t Analysis()
void SetInputList(TList *input) override
Int_t GetEntry(Long64_t entry, Int_t getall=0) override
Int_t Version() const override
void SetEventsReadInterval(Long64_t N)
void SetJobOutputFileName(const TString &filename)
const KVGVList * GetGVList(const KVString &list_name="default") const
void SetBranchName(const Char_t *n)
KVGVList * GetGVList(const KVString &list_name="default")
virtual void SetAdditionalBranchAddress()
Bool_t IsOptGiven(const Char_t *option)
virtual void SetCurrentRun(KVDBRun *)
KVEvent * GetFriendEvent() const
KVEvent * GetEvent() const
void SlaveTerminate() override
void SlaveBegin(TTree *tree) override
void SetTriggerConditionsForRun(int run)
KVVarGlob * AddGV(const Char_t *class_name, const Char_t *name)
KVGVList * AddGVList(const KVString &list_name, const KVParticleCondition &selection=KVParticleCondition())
TString GetOpt(const Char_t *option) const
virtual void EndAnalysis()
TList * GetOutputList() const override
Int_t GetEventNumber() const
void Terminate() override
void Begin(TTree *tree) override
void UnsetOpt(const Char_t *opt)
Abstract base class container for multi-particle events.
virtual void SetFrame(const Char_t *, const KVFrameTransform &)=0
Manage a list of global variables.
void Add(TObject *obj) override
KVVarGlob * AddGV(const Char_t *class_name, const Char_t *name)
KVVarGlob * GetGV(const Char_t *nom) const
Return pointer to global variable in list with name 'nom'.
Implement selections for KVNucleus objects.
TObject * FindObject(const char *name) const override
void SetOwner(Bool_t enable=kTRUE) override
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
Facilitate use of std::vector branches in data analysis.
Optimised list in which named objects can only be placed once.
void AddFirst(TObject *obj) override
void Add(TObject *obj) override
Handle list of options and input parameters for user analyis .
void SetOpt(const Char_t *option, const Char_t *value)
TString GetOpt(const Char_t *opt) const
Bool_t IsOptGiven(const Char_t *opt)
void UnsetOpt(const Char_t *opt)
Base class for all global variable implementations.
void AbstractMethod(const char *method) const
const char * Data() const
virtual Int_t GetEntry(Long64_t entry, Int_t getall=0)
virtual Long64_t GetEntries() const
virtual TTree * GetTree() const
void Error(UserClass p, const char *location, const char *va_(fmt),...)
void Info(UserClass p, const char *location, const char *va_(fmt),...)