KaliVeda
Toolkit for HIC analysis
Loading...
Searching...
No Matches
KVDataSelector.cpp
1/*
2$Id: KVDataSelector.cpp,v 1.4 2007/05/31 09:59:21 franklan Exp $
3$Revision: 1.4 $
4$Date: 2007/05/31 09:59:21 $
5*/
6
7//Created by KVClassFactory on Fri Oct 20 13:58:16 2006
8//Author: Daniel CUSSOL
9
10#include "KVDataSelector.h"
11#include "TEventList.h"
12#include "KVOldINDRASelector.h"
13#include "KVClassFactory.h"
14
15using namespace std;
16
18
19
20
22
24{
25 //Default constructor
26 evtl = new TEventList();
27}
28
29
30
33
35{
36 //Destructor
37 delete evtl;
38}
39
40
41
46
48{
49//
50// Resets the event list. This method is called when a new TTree is loaded
51//
52 evtl->Reset();
53 evtl->SetName(Form("%s_run%d", this->IsA()->GetName(), nrun));
54 evtl->
56 ("TEventList for the \"%s\" KVDataSelector and run %d.",
57 this->IsA()->GetName(), nrun));
58 cout << evtl->GetName() << " initialised." << endl;
59}
60
61
62
70
72{
73//
74// Process the current entry
75// if the SelectCurrentEntry method return kTRUE, the current entry number
76// is added to the event list
77// This method is called just before the Analysis method
78//
79 Bool_t ok = kFALSE;
80 if (!kvsel) {
81 Warning("ProcessCurrentEntry(void)", "The KVOldINDRASelector is not set");
82 }
83 if (SelectCurrentEntry()) {
84 ok = kvsel->Analysis();
86 }
87 return ok;
88}
89
90
91
97
99{
100//
101// Initialisations of the KVDataSelector
102// This method is called before the InitAnalysis method of the KVOldINDRASelector
103//
104}
105
106
107
108
113
115{
116//
117// returns Ok is the current entry has to be added to the TEventList
118//
119 Bool_t ok = kFALSE;
120
121 return ok;
122}
123
124
125
130
131void KVDataSelector::MakeClass(const Char_t* classname,
132 const Char_t* classdesc)
133{
134 //Creates skeleton '.h' and '.cpp' files for a new data selector class which
135 //inherits from this class. Give a name for the new class and a short description
136 //which will be used to document the class.
137 KVClassFactory cf(classname, classdesc, "KVDataSelector", kTRUE);
138 cf.AddImplIncludeFile("KVINDRA.h");
139 cf.AddImplIncludeFile("KVOldINDRASelector.h");
140 cf.GenerateCode();
141}
142
143
int Int_t
bool Bool_t
char Char_t
constexpr Bool_t kFALSE
constexpr Bool_t kTRUE
char * Form(const char *fmt,...)
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)
Class handling event lists for KVOldINDRASelector analysis of data chains.
virtual void Reset(Int_t nrun)
KVOldINDRASelector * kvsel
virtual Bool_t SelectCurrentEntry(void)
virtual Bool_t ProcessCurrentEntry(void)
virtual void Init(void)
TEventList * evtl
static void MakeClass(const Char_t *classname, const Char_t *classdesc)
virtual ~KVDataSelector()
Destructor.
virtual Bool_t Analysis()
virtual Long64_t GetTreeEntry() const
virtual void Reset(Option_t *option="")
virtual void Enter(Long64_t entry)
void SetName(const char *name) override
virtual void SetTitle(const char *title="")
const char * GetName() const override
TClass * IsA() const override
virtual void Warning(const char *method, const char *msgfmt,...) const
ClassImp(TPyArg)