1 #ifndef KVEventSelector_h
2 #define KVEventSelector_h
318 Error(
"GetEventNumber",
"No event defined!!!");
361 Error(
"AddGV(KVVarGlob*)",
"KVVarGlob pointer is null");
389 Deprecate(
Form(
"You should use e.g. 'auto h = AddHisto<%s>(\"%s\",\"%s\",%d,...);' to add histograms to your analysis.",
394 template<
typename HistoType,
typename... Args>
410 auto h =
new HistoType(std::forward<Args>(args)...);
417 Deprecate(
Form(
"You should use e.g. 'auto t = AddTree(\"%s\", \"%s\");' to add a TTree to your analysis",
418 tree->GetName(),
tree->GetTitle()));
475 #define AddVar(var,type) Branch(dadastr(var), &var, didixstr(duduvartype(var,type)))
476 #define AddVarBranch(var,branch,type) Branch(dadastr(branch), &var, didixstr(duduvartype(branch,type)))
477 #define duduvartype(var,type) var/type
478 #define didixstr(s) dadastr(s)
479 #define dadastr(s) #s
KVDataAnalyser * gDataAnalyser
#define ClassDef(name, id)
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 const KVBatchSystem * GetBatchSystem()
virtual const KV2Body * GetKinematics() const
EProofMode GetProofMode() const
static Bool_t IsRunningBatchAnalysis()
General purpose analysis class for TTree containing KVEvent objects.
virtual void SaveHistos(const Char_t *filename="", Option_t *option="recreate", Bool_t onlyfilled=kFALSE)
virtual void SetInputList(TList *input)
void FillTProfile2D(TProfile2D *h2, Double_t one, Double_t two, Double_t three, Double_t four)
virtual Int_t Version() const
void AddGV(KVVarGlob *vg)
const KVHashList * GetTreeList() const
return the list of created trees
KVVarGlob * GetGV(const Char_t *name) const
Bool_t fDisableCreateTreeFile
used with PROOF
KVEventSelector(TTree *=0)
void SetUpAuxEventChain()
Bool_t fFirstEvent
set to kFALSE after first event is read
Int_t GetFriendTreeEntry(Long64_t entry, Int_t getall=0)
TH1 * GetHisto(const Char_t *name) const
TProofOutputFile * mergeFile
for merging with PROOF
void SetParticleConditions(const KVParticleCondition &, const KVString &="")
const Char_t * GetBranchName() const
void FillTree(const Char_t *sname="")
virtual void InitAnalysis()
void InitFriendTree(TTree *tree, const TString &branchname)
KVGVList gvlist
List of global variables.
virtual void SetOpt(const Char_t *option, const Char_t *value)
Set a value for an option.
TTree * fAuxChain
[optional] pointer to another TTree or TChain which may be used during analysis
const KVHashList * GetHistoList() const
return the list of created trees
void SetCombinedOutputFile(const TString &filename)
virtual Bool_t Analysis()
virtual Int_t GetEntry(Long64_t entry, Int_t getall=0)
KVEvent * Event
Declaration of leaf types.
virtual void SetAnalysisFrame()
TTree * GetTree(const Char_t *name) const
return the tree named tree_name
Long64_t fEventsRead
number of events read
virtual void CheckEndOfRun()
Testing whether EndRun() should be called.
void FillTH2(TH2 *h2, Double_t one, Double_t two, Double_t three)
virtual void Begin(TTree *tree)
Long64_t fTreeEntry
current tree entry number
TTree * fChain
pointer to the analyzed TTree or TChain
const KVGVList * GetGVList(void) const
Bool_t CreateTreeFile(const Char_t *filename="")
KVString fCombinedOutputFile
optional name for single results file with trees and histos
void AddTree(TTree *tree)
KVString fBranchName
name of branch which contains events to analyse
virtual void SlaveBegin(TTree *tree)
virtual void SlaveTerminate()
void SetEventsReadInterval(Long64_t N)
void SetJobOutputFileName(const TString &filename)
void add_histo(TH1 *histo)
void AddHisto(TH1 *histo)
void FillHisto(const Char_t *sname, Double_t one, Double_t two=1, Double_t three=1, Double_t four=1)
TBranch * b_Event
List of branches.
void SetBranchName(const Char_t *n)
virtual void SetAdditionalBranchAddress()
virtual Bool_t IsOptGiven(const Char_t *option)
Returns kTRUE if the option 'opt' has been set.
void FillTProfile(TProfile *h1, Double_t one, Double_t two, Double_t three)
virtual void SetCurrentRun(KVDBRun *)
KVEvent * GetFriendEvent() const
KVParticleCondition fPartCond
(optional) conditions for selecting particles
virtual ~KVEventSelector()
KVEvent * GetEvent() const
void SetTriggerConditionsForRun(int)
void FillTH1(TH1 *h1, Double_t one, Double_t two)
virtual void SetObject(TObject *obj)
virtual void Init(TTree *tree)
void SetParticleConditionsParticleClassName(const KVString &t)
void add_tree(TTree *tree)
virtual void RecalculateGlobalVariables()
virtual Bool_t Process(Long64_t entry)
Bool_t fNotifyCalled
avoid multiple calls to Notify/InitRun
virtual TString GetOpt(const Char_t *option) const
KVGVList * GetGVList(void)
virtual void EndAnalysis()
virtual void ParseOptions()
void SetEvent(KVEvent *e)
KVEvent * AuxEvent
[optional] events in fAuxChain
Long64_t fEventsReadInterval
interval at which to print number of events read
KVNameValueList fOptionList
parsed list of options given to TTree::Process
HistoType * AddHisto(Args &&... args)
Int_t GetEventNumber() const
void FillTH3(TH3 *h3, Double_t one, Double_t two, Double_t three, Double_t four)
virtual TList * GetOutputList() const
KVString fPartName
(optional) classname for upcasting in KVParticleCondition::Optimize
virtual void UnsetOpt(const Char_t *opt)
Removes the option 'opt' from the internal lists, as if it had never been set.
Base class container for multi-particle events.
void SetFrame(const Char_t *frame, const KVFrameTransform &ft)
Manage a list of global variables.
virtual void Add(TObject *obj)
KVVarGlob * GetGV(const Char_t *nom) const
Return pointer to global variable in list with name 'nom'.
Extended version of ROOT THashList.
Handles lists of named parameters with different types, a list of KVNamedParameter objects.
Handles particle selection criteria for data analysis classes ,.
virtual void Clear(Option_t *option="")
virtual void Add(TObject *obj)
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
Base class for all global variable implementations.
virtual Int_t GetNbinsX() const
virtual const char * GetName() const
virtual const char * GetTitle() const
void AbstractMethod(const char *method) const
virtual const char * ClassName() const
virtual void Error(const char *method, const char *msgfmt,...) const
const char * Data() const
virtual Int_t GetEntry(Long64_t entry, Int_t getall=0)
virtual TTree * GetTree() const
virtual Long64_t GetEntries() const