Skip to content
Snippets Groups Projects
Commit 4ccbefa5 authored by Gitlab CI's avatar Gitlab CI Committed by Vukan Jevtic
Browse files

pre-commit fixes

patch generated by https://gitlab.cern.ch/lhcb/LHCb/-/jobs/53141410
parent a1c2712c
No related branches found
No related tags found
No related merge requests found
Pipeline #11101890 passed
...@@ -14,9 +14,9 @@ ...@@ -14,9 +14,9 @@
#include "GaudiKernel/SmartRefVector.h" #include "GaudiKernel/SmartRefVector.h"
#include <Event/Particle.h> #include <Event/Particle.h>
#include <algorithm> #include <algorithm>
#include <unordered_map>
#include <ostream> #include <ostream>
#include <string> #include <string>
#include <unordered_map>
#include <vector> #include <vector>
// Forward declarations // Forward declarations
...@@ -127,7 +127,7 @@ namespace LHCb { ...@@ -127,7 +127,7 @@ namespace LHCb {
/// Update The type of tagger /// Update The type of tagger
void setType( unsigned short int value ); void setType( unsigned short int value );
/// Update The type of tagger /// Update The type of tagger
void setType( TaggerType value ); void setType( TaggerType value );
...@@ -184,73 +184,72 @@ namespace LHCb { ...@@ -184,73 +184,72 @@ namespace LHCb {
float m_charge; ///< (weighted) charge of the tagging particle float m_charge; ///< (weighted) charge of the tagging particle
SmartRefVector<LHCb::Particle> m_taggerParts; ///< Vector of Particle(s) used to build the Tagger SmartRefVector<LHCb::Particle> m_taggerParts; ///< Vector of Particle(s) used to build the Tagger
static inline const std::unordered_map<std::string, TaggerType> m_tagger_type_map { static inline const std::unordered_map<std::string, TaggerType> m_tagger_type_map{
{"none", TaggerType::none}, {"none", TaggerType::none},
{"unknown", TaggerType::unknown}, {"unknown", TaggerType::unknown},
{"OS_Muon", TaggerType::OS_Muon}, {"OS_Muon", TaggerType::OS_Muon},
{"OS_Electron", TaggerType::OS_Electron}, {"OS_Electron", TaggerType::OS_Electron},
{"OS_Kaon", TaggerType::OS_Kaon}, {"OS_Kaon", TaggerType::OS_Kaon},
{"SS_Kaon", TaggerType::SS_Kaon}, {"SS_Kaon", TaggerType::SS_Kaon},
{"SS_Pion", TaggerType::SS_Pion}, {"SS_Pion", TaggerType::SS_Pion},
{"jetCharge", TaggerType::jetCharge}, {"jetCharge", TaggerType::jetCharge},
{"OS_jetCharge", TaggerType::OS_jetCharge}, {"OS_jetCharge", TaggerType::OS_jetCharge},
{"SS_jetCharge", TaggerType::SS_jetCharge}, {"SS_jetCharge", TaggerType::SS_jetCharge},
{"VtxCharge", TaggerType::VtxCharge}, {"VtxCharge", TaggerType::VtxCharge},
{"Topology", TaggerType::Topology}, {"Topology", TaggerType::Topology},
{"OS_nnetKaon", TaggerType::OS_nnetKaon}, {"OS_nnetKaon", TaggerType::OS_nnetKaon},
{"SS_nnetKaon", TaggerType::SS_nnetKaon}, {"SS_nnetKaon", TaggerType::SS_nnetKaon},
{"SS_Proton", TaggerType::SS_Proton}, {"SS_Proton", TaggerType::SS_Proton},
{"OS_Charm", TaggerType::OS_Charm}, {"OS_Charm", TaggerType::OS_Charm},
{"SS_PionBDT", TaggerType::SS_PionBDT}, {"SS_PionBDT", TaggerType::SS_PionBDT},
{"InclusiveTagger", TaggerType::Inclusive_Tagger}, {"InclusiveTagger", TaggerType::Inclusive_Tagger},
{"DevelopmentTagger", TaggerType::Development_Tagger}, {"DevelopmentTagger", TaggerType::Development_Tagger},
{"OSMuon", TaggerType::OSMuon}, {"OSMuon", TaggerType::OSMuon},
{"OSMuonLatest", TaggerType::OSMuonLatest}, {"OSMuonLatest", TaggerType::OSMuonLatest},
{"OSMuonLatestB2OC", TaggerType::OSMuonLatestB2OC}, {"OSMuonLatestB2OC", TaggerType::OSMuonLatestB2OC},
{"OSMuonLatestB2CC", TaggerType::OSMuonLatestB2CC}, {"OSMuonLatestB2CC", TaggerType::OSMuonLatestB2CC},
{"OSMuonDev", TaggerType::OSMuonDev}, {"OSMuonDev", TaggerType::OSMuonDev},
{"OSElectron", TaggerType::OSElectron}, {"OSElectron", TaggerType::OSElectron},
{"OSElectronLatest", TaggerType::OSElectronLatest}, {"OSElectronLatest", TaggerType::OSElectronLatest},
{"OSElectronLatestB2OC", TaggerType::OSElectronLatestB2OC}, {"OSElectronLatestB2OC", TaggerType::OSElectronLatestB2OC},
{"OSElectronLatestB2CC", TaggerType::OSElectronLatestB2CC}, {"OSElectronLatestB2CC", TaggerType::OSElectronLatestB2CC},
{"OSElectronDev", TaggerType::OSElectronDev}, {"OSElectronDev", TaggerType::OSElectronDev},
{"OSKaon", TaggerType::OSKaon}, {"OSKaon", TaggerType::OSKaon},
{"OSKaonLatest", TaggerType::OSKaonLatest}, {"OSKaonLatest", TaggerType::OSKaonLatest},
{"OSKaonLatestB2OC", TaggerType::OSKaonLatestB2OC}, {"OSKaonLatestB2OC", TaggerType::OSKaonLatestB2OC},
{"OSKaonLatestB2CC", TaggerType::OSKaonLatestB2CC}, {"OSKaonLatestB2CC", TaggerType::OSKaonLatestB2CC},
{"OSKaonDev", TaggerType::OSKaonDev}, {"OSKaonDev", TaggerType::OSKaonDev},
{"OSVtxCh", TaggerType::OSVtxCh}, {"OSVtxCh", TaggerType::OSVtxCh},
{"OSVtxChLatest", TaggerType::OSVtxChLatest}, {"OSVtxChLatest", TaggerType::OSVtxChLatest},
{"OSVtxChDev", TaggerType::OSVtxChDev}, {"OSVtxChDev", TaggerType::OSVtxChDev},
{"OSCharm", TaggerType::OSCharm}, {"OSCharm", TaggerType::OSCharm},
{"OSCharmLatest", TaggerType::OSCharmLatest}, {"OSCharmLatest", TaggerType::OSCharmLatest},
{"OSCharmDev", TaggerType::OSCharmDev}, {"OSCharmDev", TaggerType::OSCharmDev},
{"OSProton", TaggerType::OSProton}, {"OSProton", TaggerType::OSProton},
{"OSProtonLatest", TaggerType::OSProtonLatest}, {"OSProtonLatest", TaggerType::OSProtonLatest},
{"OSProtonDev", TaggerType::OSProtonDev}, {"OSProtonDev", TaggerType::OSProtonDev},
{"SSKaon", TaggerType::SSKaon}, {"SSKaon", TaggerType::SSKaon},
{"SSKaonLatest", TaggerType::SSKaonLatest}, {"SSKaonLatest", TaggerType::SSKaonLatest},
{"SSKaonDev", TaggerType::SSKaonDev}, {"SSKaonDev", TaggerType::SSKaonDev},
{"SSPion", TaggerType::SSPion}, {"SSPion", TaggerType::SSPion},
{"SSPionLatest", TaggerType::SSPionLatest}, {"SSPionLatest", TaggerType::SSPionLatest},
{"SSPionDev", TaggerType::SSPionDev}, {"SSPionDev", TaggerType::SSPionDev},
{"SSProton", TaggerType::SSProton}, {"SSProton", TaggerType::SSProton},
{"SSProtonLatest", TaggerType::SSProtonLatest}, {"SSProtonLatest", TaggerType::SSProtonLatest},
{"SSProtonDev", TaggerType::SSProtonDev}, {"SSProtonDev", TaggerType::SSProtonDev},
{"SSLambda", TaggerType::SSLambda}, {"SSLambda", TaggerType::SSLambda},
{"SSLambdaLatest", TaggerType::SSLambdaLatest}, {"SSLambdaLatest", TaggerType::SSLambdaLatest},
{"SSLambdaDev", TaggerType::SSLambdaDev}, {"SSLambdaDev", TaggerType::SSLambdaDev},
{"InclusiveTagger", TaggerType::InclusiveTagger}, {"InclusiveTagger", TaggerType::InclusiveTagger},
{"InclusiveTaggerDev", TaggerType::InclusiveTaggerDev}, {"InclusiveTaggerDev", TaggerType::InclusiveTaggerDev},
{"DevelopmentTagger", TaggerType::DevelopmentTagger}, {"DevelopmentTagger", TaggerType::DevelopmentTagger},
{"DevelopmentTaggerDev", TaggerType::DevelopmentTaggerDev} {"DevelopmentTaggerDev", TaggerType::DevelopmentTaggerDev}};
};
}; // class Tagger }; // class Tagger
inline std::ostream& operator<<( std::ostream& s, Tagger::TaggerType e ) { inline std::ostream& operator<<( std::ostream& s, Tagger::TaggerType e ) {
s << Tagger::TaggerTypeToString(e); s << Tagger::TaggerTypeToString( e );
return s; return s;
} }
} // namespace LHCb } // namespace LHCb
...@@ -279,8 +278,8 @@ inline LHCb::Tagger::TaggerType LHCb::Tagger::TaggerTypeToType( const std::strin ...@@ -279,8 +278,8 @@ inline LHCb::Tagger::TaggerType LHCb::Tagger::TaggerTypeToType( const std::strin
inline const std::string& LHCb::Tagger::TaggerTypeToString( Tagger::TaggerType aEnum ) { inline const std::string& LHCb::Tagger::TaggerTypeToString( Tagger::TaggerType aEnum ) {
static const std::string s_unknown = "unknown"; static const std::string s_unknown = "unknown";
auto iter = std::find_if( m_tagger_type_map.begin(), m_tagger_type_map.end(), auto iter = std::find_if( m_tagger_type_map.begin(), m_tagger_type_map.end(),
[aEnum]( const auto& pair ) { return pair.second == aEnum; } ); [aEnum]( const auto& pair ) { return pair.second == aEnum; } );
return iter != m_tagger_type_map.end() ? iter->first : s_unknown; return iter != m_tagger_type_map.end() ? iter->first : s_unknown;
} }
...@@ -288,7 +287,7 @@ inline unsigned short int LHCb::Tagger::type() const { return m_type; } ...@@ -288,7 +287,7 @@ inline unsigned short int LHCb::Tagger::type() const { return m_type; }
inline void LHCb::Tagger::setType( unsigned short int value ) { m_type = value; } inline void LHCb::Tagger::setType( unsigned short int value ) { m_type = value; }
inline void LHCb::Tagger::setType( TaggerType value ) { m_type = static_cast<unsigned short>(value); } inline void LHCb::Tagger::setType( TaggerType value ) { m_type = static_cast<unsigned short>( value ); }
inline short int LHCb::Tagger::decision() const { return m_decision; } inline short int LHCb::Tagger::decision() const { return m_decision; }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment