KaliVeda
Toolkit for HIC analysis
Loading...
Searching...
No Matches
KVINDRADSTReader.cpp
1#include "KVINDRADSTReader.h"
2#include "KVDataRepository.h"
3
5
6
7
8
9void KVINDRADSTReader::InitRun()
10{
11 Info("InitRun", "ds InitRun");
12
13 KVString dst_file = gDataSet->GetFullPathToRunfile("dst", fRunNumber);
14 Info("InitRun", "dst file %s", dst_file.Data());
15
16 Info("InitRun", "%s %s", gDataSet->GetDataPathSubdir(), gDataSet->GetRunfileName("dst", fRunNumber));
17 gDataRepository->CopyFileFromRepository(gDataSet, "dst", gDataSet->GetRunfileName("dst", fRunNumber), ".");
18
19 Info("InitRun", "Starting analysis of run %d", fRunNumber);
20
21 TDatime now1;
22 Info("InitRun", "Debut lecture DST %s", now1.AsString());
23
24 DefineSHELLVariables();
25
26}
27
28
29
31
33{
34 gSystem->Exec(Form("faire_arbre_c%d", fCampNumber));
35}
36
37
38
40
42{
43 TDatime now2;
44 Info("EndRun", "Fin lecture DST %s", now2.AsString());
45
46 KVString inst;
47 inst.Form("rm -f %s", gDataSet->GetRunfileName("dst", fRunNumber));
48 gSystem->Exec(inst);
49}
50
51
52
54
56{
57
58 if (gDataSet != GetDataSet()) GetDataSet()->cd();
60
61 if (fCampNumber == -1) return;
62
63 //InitAnalysis();
64 Info("SubmitTask", "Liste de runs : %s", GetRunList().AsString());
65 //loop over runs
66 Info("SubmitTask", "RunningInLaunchDirectory : %d", Int_t(RunningInLaunchDirectory()));
67
68 GetRunList().Begin();
69 while (!GetRunList().End()) {
70 Info("SubmitTask", "%s", GetBatchName());
72 Info("SubmitTask", "Traitement du Run %d", fRunNumber);
73 InitRun();
74 ProcessRun();
75 EndRun();
76 }
77}
78
79
80
82
84{
85 KVString shell_var;
86
87 shell_var.Form("run%d", fRunNumber);
88 gSystem->Setenv("RUN_PREFIX", shell_var.Data());
89
90 camp1 = camp2 = camp4 = kFALSE;
91
92 if (fCampNumber == 1) {
93
94 shell_var.Form("%s/veda%d/files/", gSystem->ExpandPathName("$THRONG_DIR"), fCampNumber);
95 gSystem->Setenv("VEDA_DATA", shell_var.Data());
96
97 camp1 = kTRUE;
98
99 }
100 else if (fCampNumber == 2) {
101
102 shell_var.Form("%s/veda%d/data/", gSystem->ExpandPathName("$THRONG_DIR"), fCampNumber);
103 gSystem->Setenv("VEDA_DATA", shell_var.Data());
104
105 camp2 = kTRUE;
106
107 }
108 else if (fCampNumber == 4) {
109
110 shell_var.Form("%s/veda%d/data/", gSystem->ExpandPathName("$THRONG_DIR"), fCampNumber);
111 gSystem->Setenv("VEDA_DATA", shell_var.Data());
112
113 camp4 = kTRUE;
114
115 }
116
117}
118
119
int Int_t
constexpr Bool_t kFALSE
constexpr Bool_t kTRUE
char * Form(const char *fmt,...)
R__EXTERN TSystem * gSystem
const Char_t * GetBatchName()
Bool_t RunningInLaunchDirectory()
virtual void CopyFileFromRepository(const KVDataSet *dataset, const Char_t *datatype, const Char_t *filename, const Char_t *destination)
const KVNumberList & GetRunList() const
const KVDataSet * GetDataSet() const
virtual const Char_t * GetDataPathSubdir() const
Returns name of top-level directory in data repository used to store data files for this dataset.
Definition KVDataSet.h:95
const Char_t * GetRunfileName(const Char_t *type, Int_t run) const
TString GetFullPathToRunfile(const Char_t *type, Int_t run) const
void cd() const
Read INDRA DST file and fill a TTree.
virtual void SubmitTask()
virtual void InitRun()
virtual void EndRun()
Int_t fRunNumber
run number of current file
Bool_t camp4
set to kTRUE when reading 4th campaign: => ring1 is Si-CsI
virtual void ProcessRun()
Bool_t camp2
set to kTRUE when reading 2nd campaign: => phoswich code is 4, not 2
void Begin(void) const
Int_t Next(void) const
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
Definition KVString.h:73
const char * AsString() const
virtual void Info(const char *method, const char *msgfmt,...) const
const char * Data() const
void Form(const char *fmt,...)
virtual Int_t Exec(const char *shellcmd)
virtual char * ExpandPathName(const char *path)
virtual void Setenv(const char *name, const char *value)
void Info(const char *location, const char *fmt,...)
void End()
ClassImp(TPyArg)