KaliVeda
Toolkit for HIC analysis
Loading...
Searching...
No Matches
KVReconRawDataAnalyser.cpp
1#include "KVReconRawDataAnalyser.h"
2#include "KVDataSet.h"
3
4#include <KVClassFactory.h>
5
7
8
9
10
11void KVReconRawDataAnalyser::preInitAnalysis()
12{
13 TClass* recev_cl = TClass::GetClass(GetDataSet()->GetReconstructedEventClassName());
14 fRecev = ((KVReconstructedEvent*)recev_cl->New());
15
16 Info("preInitAnalysis", "Reconstructed event container class: %s", recev_cl->GetName());
17}
18
19
20
22
24{
25 fEvRecon.reset(new KVEventReconstructor(gMultiDetArray, fRecev));
26}
27
28
29
31
33{
34 if (gMultiDetArray->HandledRawData()) {
35 fEvRecon->ReconstructEvent(gMultiDetArray->GetFiredDetectors());
36 fEvRecon->GetEvent()->SetNumber(GetEventNumber());
37 }
38}
39
40
41
43
45{
46 if (gMultiDetArray->HandledRawData()) fEvRecon->GetEvent()->Clear();
47}
48
49
50
55
57{
58 // the multidetector will be deleted and rebuilt at the beginning of the next run
59 // (if there is one). the reconstructed event will contain stale pointers to the old
60 // detectors etc. if we don't clear it now
61 fRecev->Clear();
62}
63
64
65
68
70{
71 //Automatic generation of derived class for raw data analysis
72
73 KVClassFactory cf(kvsname, "Analysis of reconstructed raw data", "",
74 kTRUE, "ReconRawAnalysisTemplate");
75
76 cf.GenerateCode();
77}
78
79
80
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.
Base class for event reconstruction from array data.
void Clear(Option_t *opt="")
Definition KVEvent.h:238
Bool_t HandledRawData() const
const KVSeqCollection * GetFiredDetectors() const
Long64_t GetEventNumber() const
void AddHisto(TH1 *histo)
Base class for user analysis of raw data with event reconstruction.
std::unique_ptr< KVEventReconstructor > fEvRecon
KVReconstructedEvent * fRecev
static void Make(const Char_t *kvsname)
Automatic generation of derived class for raw data analysis.
Event containing KVReconstructedNucleus nuclei reconstructed from hits in detectors.
void * New(ENewType defConstructor=kClassNew, Bool_t quiet=kFALSE) const
const char * GetName() const override
void Info(const char *location, const char *fmt,...)
ClassImp(TPyArg)