KaliVeda
Toolkit for HIC analysis
KVReconEventSelector.cpp
1 //Created by KVClassFactory on Thu Jul 19 15:38:10 2018
2 //Author: eindra
3 
4 #include "KVReconEventSelector.h"
5 
6 #include <KVClassFactory.h>
7 #include <KVReconDataAnalyser.h>
8 
10 
11 
12 
13 
18 KVDBRunFile* KVReconEventSelector::GetCurrentRunFile() const
19 {
20  // \return pointer to description of currently-analysed runfile in the experimental database
21  //
22  // \warning DO NOT USE when analysing data with PROOFLite!!! (which mixes up the files)
23 
24  return gDataAnalyser->GetAnalysedRunFile();
25 }
26 
27 
28 
31 
33 {
34  // When using PROOF, need to set tree pointer in KVDataAnalyser
36  if (tree && gDataAnalyser->GetProofMode() != KVDataAnalyser::EProofMode::None) {
37  gDataAnalyser->SetAnalysedTree(tree);
38  }
39 }
40 
41 
42 
52 
53 void KVReconEventSelector::Make(const Char_t* kvsname)
54 {
55  // Generate a new recon data analysis selector class
56  //
57  // This will be based on a template file which may change as a function of the current
58  // dataset, if a variable
59  //~~~~
60  //[dataset].ReconEventSelector.Template
61  //~~~~
62  // is defined with the name of the template
63 
64  KVClassFactory cf(kvsname, "Analysis of reconstructed events", "",
65  kTRUE,
66  gDataSet->GetDataSetEnv<TString>("ReconEventSelector.Template", "ReconDataSelectorTemplate"));
67 
68  cf.AddImplIncludeFile("KVReconstructedNucleus.h");
69  cf.AddImplIncludeFile("KVBatchSystem.h");
70 
71  cf.GenerateCode();
72 }
73 
74 
75 
char Char_t
constexpr Bool_t kTRUE
Factory class for generating skeleton files for new classes.
void GenerateCode()
Generate header and implementation file for currently-defined class.
void AddImplIncludeFile(const Char_t *filename)
A single raw data file associated with an experimental run ,,.
Definition: KVDBRunFile.h:39
virtual void SetAnalysedTree(TTree *)
virtual KVDBRunFile * GetAnalysedRunFile() const
EProofMode GetProofMode() const
ValType GetDataSetEnv(const Char_t *type, const ValType &defval={}) const
Definition: KVDataSet.h:270
void Init(TTree *tree) override
Base class for user analysis of reconstructed data.
void Init(TTree *tree) override
When using PROOF, need to set tree pointer in KVDataAnalyser.
static void Make(const Char_t *kvsname)
ClassImp(TPyArg)