Skip to content

Commit f150b39

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 bc5ed44 commit f150b39

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
@@ -99,7 +99,7 @@ double genEvents::GetGaus(double sigma)
9999
return x;
100100
}
101101

102-
void genEvents::InitEventGenerator()
102+
void genEvents::InitEventGenerator(const std::string& dir)
103103
{
104104
for (int32_t i = 0; i < 3; i++) {
105105
for (int32_t j = 0; j < 2; j++) {
@@ -113,6 +113,7 @@ void genEvents::InitEventGenerator()
113113
mClusterError[i][j]->GetXaxis()->SetTitle("Cluster Error [cm]");
114114
}
115115
}
116+
mRec->rec()->DumpSettings(dir.c_str()); // the chain's own override does not write settings.dump
116117
}
117118

118119
void genEvents::FinishEventGenerator()
@@ -357,9 +358,8 @@ void genEvents::RunEventGenerator(GPUChainTracking* rec, const std::string& dir)
357358
{
358359
std::unique_ptr<genEvents> gen(new genEvents(rec));
359360
mkdir(dir.c_str(), S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
360-
rec->DumpSettings(dir.c_str());
361361

362-
gen->InitEventGenerator();
362+
gen->InitEventGenerator(dir);
363363

364364
for (int32_t i = 0; i < (configStandalone.nEvents == -1 ? 10 : configStandalone.nEvents); i++) {
365365
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)