ATLAS Offline Software
Loading...
Searching...
No Matches
SCT_CalibUtilities.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
11
12#ifndef SCT_CalibAlgs_SCT_CalibUtilities_h
13#define SCT_CalibAlgs_SCT_CalibUtilities_h
14
15#include <sstream>
16#include <string>
17#include <string_view>
18
19class Identifier;
20class SCT_ID;
21
22namespace SCT_CalibAlgs {
23
24std::string formatPosition(const Identifier& waferId, const SCT_ID* helper, std::string_view delimiter="_", const bool includeSide=true);
25std::string chipList2LinkList(const std::string& chipList);
26unsigned int bec2Index(const int bec);
27std::string normalizeList(std::string strList);
28
29template <class T>
30std::string xmlValue(const std::string& name, const T value) {
31 std::ostringstream os;
32 os << " <value name=\"" << name << "\">" << value << "</value>";
33 return os.str();
34}
35
36template <class T>
37std::string xmlOpenChannel(const long id, const T since, const T until) {
38 std::string opener=std::string{" <channel id=\""}+std::to_string(id)+"\"";
39 std::string sinceAttr=std::string{" since=\""}+std::to_string(since)+"\"";
40 std::string untilAttr=std::string{" until=\""}+std::to_string(until)+"\"";
41 return opener+sinceAttr+untilAttr+">";
42}
43
44std::string xmlCloseChannel();
45
46} //end of namespace
47
48#endif
This is an Identifier helper class for the SCT subdetector.
Definition SCT_ID.h:68
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)
std::string xmlOpenChannel(const long id, const T since, const T until)
std::string xmlValue(const std::string &name, const T value)
unsigned int bec2Index(const int bec)