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