Skip to content
Snippets Groups Projects

Draft: Enforce TaggerType enum usage

Open Vukan Jevtic requested to merge tagger_type_enum_usage into master
1 unresolved thread

Following discussion in !4986 (merged)

Edited by Vukan Jevtic

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
47 case Tagger::Run2_SSPion:
48 return s << "Run2_SSPion";
49 case Tagger::Run2_SSKaon:
50 return s << "Run2_SSKaon";
51 case Tagger::Run2_SSProton:
52 return s << "Run2_SSProton";
53 case Tagger::Run2_OSKaon:
54 return s << "Run2_OSKaon";
55 case Tagger::Run2_OSMuon:
56 return s << "Run2_OSMuon";
57 case Tagger::Run2_OSElectron:
58 return s << "Run2_OSElectron";
59 case Tagger::Run2_OSVertexCharge:
60 return s << "Run2_OSVertexCharge";
61 }
62 return s << "ERROR wrong value " << int( e ) << " for enum LHCb::Tagger::TaggerType";
  • Author Developer

    Instead of "ERROR: ..." the function would now produce "unknown" in case the enum index is out of bounds. "unknown" seems to be the default naming for erroneous taggers anyway, as "none" is the default. Also this is unlikely to happen / pretty much ruled out once a tagger is implemented and therefore the error is only mildly useful for the developer

    Edited by Vukan Jevtic
  • Please register or sign in to reply
  • Vukan Jevtic mentioned in merge request !4986 (merged)

    mentioned in merge request !4986 (merged)

  • Please register or sign in to reply
    Loading