Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ enum OptionBits {
TRDIgnoreDigitHCHeaderBit,
TRDIgnoreTrackletHCHeaderBit,
TRDEnableRootOutputBit,
TRDFixSM1617Bit,
TRDGenerateStats
};

Expand Down
2 changes: 2 additions & 0 deletions Detectors/TRD/reconstruction/src/DataReader.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ void customize(std::vector<ConfigParamSpec>& workflowOptions)
{"halfchamberwords", VariantType::Int, 0, {"Fix half chamber for when it is version is 0.0 integer value of additional header words, ignored if version is not 0.0"}},
{"halfchambermajor", VariantType::Int, 0, {"Fix half chamber for when it is version is 0.0 integer value of major version, ignored if version is not 0.0"}},
{"ignore-digithcheader", VariantType::Bool, false, {"Ignore the digithalf chamber header for cross referencing, take rdh/cru as authorative."}},
{"fixsm1617", VariantType::Bool, false, {"Fix the missing bit in the tracklet hc header of supermodules 16 and 17. Requires option tracklethcheader 2"}},
{"tracklethcheader", VariantType::Int, 2, {"Status of TrackletHalfChamberHeader 0 off always, 1 iff tracklet data, 2 on always"}},
{"histogramsfile", VariantType::String, "histos.root", {"Name of the histogram file, so one can run multiple per node"}},
//{"generate-stats", VariantType::Bool, true, {"Generate the state message sent to qc"}},
Expand Down Expand Up @@ -102,6 +103,7 @@ WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
binaryoptions[o2::trd::TRDIgnoreTrackletHCHeaderBit] = cfgc.options().get<bool>("ignore-tracklethcheader");
binaryoptions[o2::trd::TRDEnableRootOutputBit] = cfgc.options().get<bool>("enable-root-output");
binaryoptions[o2::trd::TRDByteSwapBit] = cfgc.options().get<bool>("trd-datareader-enablebyteswapdata");
binaryoptions[o2::trd::TRDFixSM1617Bit] = cfgc.options().get<bool>("fixsm1617");
//binaryoptions[o2::trd::TRDGenerateStats] = cfgc.options().get<bool>("generate-stats");
binaryoptions[o2::trd::TRDGenerateStats] = true; //cfgc.options().get<bool>("generate-stats");

Expand Down
5 changes: 5 additions & 0 deletions Detectors/TRD/reconstruction/src/TrackletsParser.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,11 @@ int TrackletsParser::Parse()
mWordsRead++;
mState = StateTrackletMCMHeader; // now we should read a MCMHeader next time through loop
} else { //not TrackletHCHeader
if (mState == StateTrackletHCHeader) {
if ((mFEEID.supermodule > 15) && mOptions[TRDFixSM1617Bit] && mTrackletHCHeaderState == 2) {
*word |= 1 << 11; //flip bit eleven for the tracklethcheader for the last 2 supermodules (bug/misconfiguration/broken/other) not sure why its like this yet, but it is.
}
}
if (((*word) & 0x80000001) == 0x80000001 && mState == StateTrackletMCMHeader) { //TrackletMCMHeader has the bits on either end always 1
//mcmheader
mTrackletMCMHeader = (TrackletMCMHeader*)&(*word);
Expand Down