Skip to content

Commit

Permalink
Moving some initiization from Init to InitRun for StFcsDb (star-bnl#630)
Browse files Browse the repository at this point in the history
Those initialization had to wait till tables were filled from DB in
StFcsDbMaker::InitRun.
  • Loading branch information
akioogawa authored Nov 29, 2023
1 parent 05ba039 commit 55b469b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
19 changes: 10 additions & 9 deletions StRoot/StFcsDbMaker/StFcsDb.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -244,15 +244,6 @@ StFcsDb::StFcsDb(const char *name) : TDataSet(name) {};
StFcsDb::~StFcsDb() {}

int StFcsDb::Init(){
if(mRun19>0){
makeMap2019();
}else{
makeMap();
printEtGain();
}
if(mDebug>0) {
printMap();
}
return kStOK;
}

Expand Down Expand Up @@ -300,6 +291,16 @@ int StFcsDb::InitRun(int runNumber) {
LOG_INFO << "StFcsDb::InitRun - run = " << runNumber << endm;
mRun=runNumber;

if(mRun19>0){
makeMap2019();
}else{
makeMap();
printEtGain();
}
if(mDebug>0) {
printMap();
}

//storing in DEP sorted table
if(mGainMode==GAINMODE::DB){
int ie=0, ih=0, ip=0, ehp, ns, crt, slt, dep, ch;
Expand Down
3 changes: 1 addition & 2 deletions StRoot/StFcsDbMaker/StFcsDbMaker.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -250,9 +250,8 @@ int StFcsDbMaker::InitRun(int runNumber) {
}else{
mFcsDb->setFcsPresValley((fcsPresValley_st*) dbFcsPresValley->GetTable());
}

mFcsDb->InitRun(runNumber);
}

mFcsDb->InitRun(runNumber);
return kStOK;
}

0 comments on commit 55b469b

Please sign in to comment.