Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify genDst.C to allow use of FXT DB flavors #730

Merged
merged 5 commits into from
Feb 13, 2025
Merged
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
21 changes: 18 additions & 3 deletions StRoot/macros/mudst/genDst.C
Original file line number Diff line number Diff line change
Expand Up @@ -144,19 +144,26 @@ void procGeoTag(TObjArray* optionTokens)
}
}

bool findAndRemoveOption(const char* optionName, TObjArray* optionTokens)
bool findAndRemoveOption(const char* optionName, TObjArray* optionTokens, bool doRemove=true)
{
TString optName = optionName;
optName.ToLower();
TObject* obj = optionTokens->FindObject(optName.Data());
if (obj) {
optionTokens->Remove(obj);
optionTokens->Compress();
if (doRemove) {
optionTokens->Remove(obj);
optionTokens->Compress();
}
return true;
}
return false;
}

bool findOption(const char* optionName, TObjArray* optionTokens)
{
return findAndRemoveOption(optionName,optionTokens,false);
}

void genDst(unsigned int First,
unsigned int Last,
const char* options,
Expand Down Expand Up @@ -198,6 +205,10 @@ void genDst(unsigned int First,
// Determine database flavors
TString flavors = "ofl"; // default flavor for offline

// FXT flavor
if (findOption("FXT",optionTokens))
flavors.Prepend("FXT+");

// simulation flavors
if (findAndRemoveOption("Simu",optionTokens) && ! findAndRemoveOption("NoSimuDb",optionTokens))
flavors.Prepend("sim+");
Expand Down Expand Up @@ -273,6 +284,10 @@ void genDst(unsigned int First,
vpdCalib->setUseVpdStart(kFALSE);
}

if (findOption("FXT",optionTokens)) {
btofCalib->SetAttr("btofFXT", 1);
}

}

if (findAndRemoveOption("etofmatch",optionTokens)) {
Expand Down