Skip to content

Commit fb508a3

Browse files
committed
GPU: write settings.dump from the standalone event generator
GPUChainTracking::DumpSettings only writes the calibration objects, the GRP settings.dump is written by GPUReconstruction::DumpSettings, so a dataset produced with --eventGenerator could not be read back.
1 parent 94e30e8 commit fb508a3

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

‎GPU/GPUTracking/qa/genEvents.cxx‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ double genEvents::GetGaus(double sigma)
101101
return x;
102102
}
103103

104-
void genEvents::InitEventGenerator()
104+
void genEvents::InitEventGenerator(const std::string& dir)
105105
{
106106
for (int32_t i = 0; i < 3; i++) {
107107
for (int32_t j = 0; j < 2; j++) {
@@ -115,6 +115,7 @@ void genEvents::InitEventGenerator()
115115
mClusterError[i][j]->GetXaxis()->SetTitle("Cluster Error [cm]");
116116
}
117117
}
118+
mRec->rec()->DumpSettings(dir.c_str()); // the chain's own override does not write settings.dump
118119
}
119120

120121
void genEvents::FinishEventGenerator()
@@ -359,9 +360,8 @@ void genEvents::RunEventGenerator(GPUChainTracking* rec, const std::string& dir)
359360
{
360361
std::unique_ptr<genEvents> gen(new genEvents(rec));
361362
mkdir(dir.c_str(), S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
362-
rec->DumpSettings(dir.c_str());
363363

364-
gen->InitEventGenerator();
364+
gen->InitEventGenerator(dir);
365365

366366
for (int32_t i = 0; i < (configStandalone.nEvents == -1 ? 10 : configStandalone.nEvents); i++) {
367367
GPUInfo("Generating event %d/%d", i, configStandalone.nEvents == -1 ? 10 : configStandalone.nEvents);

‎GPU/GPUTracking/qa/genEvents.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class genEvents
2828
{
2929
public:
3030
genEvents(GPUChainTracking* rec) {}
31-
void InitEventGenerator() {}
31+
void InitEventGenerator(const std::string& dir) {}
3232
int32_t GenerateEvent(const GPUParam& sectorParam, const char* filename) { return 1; }
3333
void FinishEventGenerator() {}
3434

@@ -41,7 +41,7 @@ class genEvents
4141
{
4242
public:
4343
genEvents(GPUChainTracking* rec) : mRec(rec) {}
44-
void InitEventGenerator();
44+
void InitEventGenerator(const std::string& dir);
4545
int32_t GenerateEvent(const GPUParam& sectorParam, const char* filename);
4646
void FinishEventGenerator();
4747

0 commit comments

Comments
 (0)