Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
InttSurveyMapv1.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file InttSurveyMapv1.cc
1 #include "InttSurveyMapv1.h"
2 
3 #include <cdbobjects/CDBTTree.h>
4 
5 #include <boost/format.hpp>
6 
8 {
10  delete m_relative_transforms;
11 }
12 
14  std::ostream& out) const
15 {
16  out << "InttSurveyMapv1"
17  << "\n"
18  << "\tsize: " << size() << std::endl;
19 }
20 
21 std::size_t InttSurveyMapv1::size() const
22 {
23  return 0;
24 }
25 
27  CDBTTree& cdbttree)
28 {
29  Eigen::Affine3d aff;
31 
33  {
35  }
36  m_absolute_transforms->clear();
37 
39  {
41  }
42  m_relative_transforms->clear();
43 
44  Int_t N = cdbttree.GetSingleIntValue("size");
45  for (Int_t n = 0; n < N; ++n)
46  {
47  ofl.layer = cdbttree.GetIntValue(n, "layer");
48  ofl.ladder_phi = cdbttree.GetIntValue(n, "ladder_phi");
49  ofl.ladder_z = cdbttree.GetIntValue(n, "ladder_z");
50  ofl.strip_phi = cdbttree.GetIntValue(n, "strip_phi");
51  ofl.strip_z = cdbttree.GetIntValue(n, "strip_z");
52 
53  for (int i = 0; i < 16; ++i)
54  {
55  std::string boost_formatted = boost::str(boost::format("m_rel_%01d_%01d") % (i / 4) % (i%4));
56  aff.matrix()(i / 4, i % 4) = cdbttree.GetDoubleValue(n,boost_formatted );
57  }
58  m_relative_transforms->insert({ofl, aff});
59 
60  for (int i = 0; i < 16; ++i)
61  {
62  std::string boost_formatted = boost::str(boost::format("m_abs_%01d_%01d") % (i / 4) % (i%4));
63  aff.matrix()(i / 4, i % 4) = cdbttree.GetDoubleValue(n, boost_formatted);
64  }
65  m_absolute_transforms->insert({ofl, aff});
66  }
67 
68  return 0;
69 }
70 
72  key_t const& k,
73  map_t::const_iterator& itr) const
74 {
76  {
77  return 0;
78  }
79  itr = m_absolute_transforms->find(k);
80  return itr != m_absolute_transforms->end();
81 }
82 
84  key_t const& k,
85  map_t::const_iterator& itr) const
86 {
88  {
89  return 0;
90  }
91  itr = m_relative_transforms->find(k);
92  return itr != m_relative_transforms->end();
93 }