ATLAS Offline Software
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 
12 #ifndef SCT_CalibAlgs_SCT_CalibUtilities_h
13 #define SCT_CalibAlgs_SCT_CalibUtilities_h
14 
15 #include <sstream>
16 #include <string>
17 
18 class Identifier;
19 class SCT_ID;
20 
21 namespace SCT_CalibAlgs {
22 
23 std::string formatPosition(const Identifier& waferId, const SCT_ID* helper, const std::string& delimiter="_", const bool includeSide=true);
24 std::string chipList2LinkList(const std::string& chipList);
25 unsigned int bec2Index(const int bec);
26 std::string normalizeList(std::string strList);
27 
28 template <class T>
29 std::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 
35 template <class T>
36 std::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 
43 std::string xmlCloseChannel();
44 
45 } //end of namespace
46 
47 #endif
SCT_CalibAlgs::chipList2LinkList
std::string chipList2LinkList(const std::string &chipList)
Definition: SCT_CalibUtilities.cxx:47
SCT_CalibAlgs::bec2Index
unsigned int bec2Index(const int bec)
Definition: SCT_CalibUtilities.cxx:60
ParticleGun_SamplingFraction.bec
int bec
Definition: ParticleGun_SamplingFraction.py:89
athena.value
value
Definition: athena.py:122
SCT_CalibAlgs
Definition: IElementStreamer.cxx:13
dq_defect_copy_defect_database.since
def since
Definition: dq_defect_copy_defect_database.py:54
runBeamSpotCalibration.helper
helper
Definition: runBeamSpotCalibration.py:112
dq_defect_copy_defect_database.until
def until
Definition: dq_defect_copy_defect_database.py:55
python.AthDsoLogger.delimiter
delimiter
Definition: AthDsoLogger.py:71
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
SCT_CalibAlgs::xmlOpenChannel
std::string xmlOpenChannel(const long id, const T since, const T until)
Definition: SCT_CalibUtilities.h:36
SCT_CalibAlgs::formatPosition
std::string formatPosition(const Identifier &waferId, const SCT_ID *helper, const std::string &delimiter, const bool includeSide)
Definition: SCT_CalibUtilities.cxx:36
SCT_CalibAlgs::xmlValue
std::string xmlValue(const std::string &name, const T value)
Definition: SCT_CalibUtilities.h:29
ReadFromCoolCompare.os
os
Definition: ReadFromCoolCompare.py:231
SCT_CalibAlgs::xmlCloseChannel
std::string xmlCloseChannel()
Definition: SCT_CalibUtilities.cxx:65
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
SCT_CalibAlgs::normalizeList
std::string normalizeList(std::string s)
Definition: SCT_CalibUtilities.cxx:21
SCT_ID
Definition: SCT_ID.h:68