The Gaudi Framework
master (6507eef1)
Toggle main menu visibility
Loading...
Searching...
No Matches
CC.h
Go to the documentation of this file.
1
/***********************************************************************************\
2
* (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations *
3
* *
4
* This software is distributed under the terms of the Apache version 2 licence, *
5
* copied verbatim in the file "LICENSE". *
6
* *
7
* In applying this licence, CERN does not waive the privileges and immunities *
8
* granted to it by virtue of its status as an Intergovernmental Organization *
9
* or submit itself to any jurisdiction. *
10
\***********************************************************************************/
11
#pragma once
12
13
#include <map>
14
#include <set>
15
#include <string>
16
17
namespace
Gaudi::Decays
{
18
namespace
CC
{
24
struct
CmpCC
{
29
inline
bool
operator()
(
const
std::string& v1,
const
std::string& v2 )
const
{
30
const
std::string::size_type s1 = v1.size();
31
const
std::string::size_type s2 = v2.size();
32
return
s1 < s2 ? false : s2 < s1 ? true : ( v1 < v2 );
33
}
34
};
35
36
typedef
std::map<std::string, std::string, CmpCC>
MapCC
;
// CC-MAP
38
typedef
std::set<std::string, CmpCC>
SetCC
;
// CC-SET
39
47
std::string
cc
(
const
std::string& decay,
const
MapCC
& map_ );
48
56
std::string
cc
(
const
std::string& decay,
const
std::map<std::string, std::string>& map_ );
57
}
// namespace CC
58
}
// namespace Gaudi::Decays
Gaudi::Decays::CC
Definition
CC.h:18
Gaudi::Decays::CC::MapCC
std::map< std::string, std::string, CmpCC > MapCC
the actual type of CC-map
Definition
CC.h:36
Gaudi::Decays::CC::SetCC
std::set< std::string, CmpCC > SetCC
the actual type of CC-set
Definition
CC.h:38
Gaudi::Decays::CC::cc
std::string cc(const std::string &decay, const MapCC &map_)
simple function to make charge conjugated inside the original string.
Definition
CC.cpp:67
Gaudi::Decays
Definition
CC.h:17
Gaudi::Decays::CC::CmpCC
a bit specific comparison of strings, useful for ordering according to the length as the primary para...
Definition
CC.h:24
Gaudi::Decays::CC::CmpCC::operator()
bool operator()(const std::string &v1, const std::string &v2) const
the only one essential method The most long string is "less", otherwise the standard comparison is ap...
Definition
CC.h:29
GaudiPartProp
include
Gaudi
Decays
CC.h
Generated on
for The Gaudi Framework by
1.17.0