Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions GPU/GPUTracking/qa/genEvents.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ double genEvents::GetGaus(double sigma)
return x;
}

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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think now you can use mRec->DumpSettings(...) directly, this was the point of the change in the first place.

}

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

gen->InitEventGenerator();
gen->InitEventGenerator(dir);

for (int32_t i = 0; i < (configStandalone.nEvents == -1 ? 10 : configStandalone.nEvents); i++) {
GPUInfo("Generating event %d/%d", i, configStandalone.nEvents == -1 ? 10 : configStandalone.nEvents);
Expand Down
4 changes: 2 additions & 2 deletions GPU/GPUTracking/qa/genEvents.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class genEvents
{
public:
genEvents(GPUChainTracking* rec) {}
void InitEventGenerator() {}
void InitEventGenerator(const std::string& dir) {}
int32_t GenerateEvent(const GPUParam& sectorParam, const char* filename) { return 1; }
void FinishEventGenerator() {}

Expand All @@ -41,7 +41,7 @@ class genEvents
{
public:
genEvents(GPUChainTracking* rec) : mRec(rec) {}
void InitEventGenerator();
void InitEventGenerator(const std::string& dir);
int32_t GenerateEvent(const GPUParam& sectorParam, const char* filename);
void FinishEventGenerator();

Expand Down
Loading