16#include "Identifier/Identifier.h"
22 auto binaryPredicate=[](
char s0,
char s1){
23 return (
s0==
' ' and
s0==s1);
25 auto normalised=
std::unique(s.begin(), s.end(), binaryPredicate);
26 s.erase(normalised,s.end());
28 size_t last=s.size()-1;
29 if (s[first] ==
' ') first =1;
30 if (s[last] ==
' ') last-=1;
31 return s.substr(first,last);
37 std::string_view
delimiter,
const bool includeSide) {
38 std::string result{std::to_string(helper->barrel_ec(waferId))};
40 result += std::to_string(helper->layer_disk(waferId));
43 result += std::to_string(helper->phi_module(waferId));
46 result += std::to_string(helper->eta_module(waferId));
50 result += std::to_string(helper->side(waferId));
58 if (chipList ==
"0-5 6-11") {
60 }
else if (chipList ==
"0-5") {
62 }
else if (chipList ==
"6-11") {
71 return static_cast<unsigned int>((bec/2) + 1);
header file for the SCTCalibUtilities
This is an Identifier helper class for the SCT subdetector.
This is an Identifier helper class for the SCT subdetector.
static const std::string delimiter("/")
std::string formatPosition(const Identifier &waferId, const SCT_ID *helper, std::string_view delimiter, const bool includeSide)
std::string chipList2LinkList(const std::string &chipList)
std::string xmlCloseChannel()
std::string normalizeList(std::string s)
unsigned int bec2Index(const int bec)
DataModel_detail::iterator< DVL > unique(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of unique for DataVector/List.