Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
InttMaskedChannelSet.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file InttMaskedChannelSet.cc
1 #include "InttMaskedChannelSet.h"
2 
3 #include <cdbobjects/CDBTTree.h>
4 
6 
7 #include <filesystem> // for exists
8 
10  std::ostream& out) const
11 {
12  out << "InttMaskedChannelSet"
13  << "\n"
14  << "\tBase Version"
15  << "\n"
16  << "\tUnimplemented" << std::endl;
17 }
18 
19 std::size_t InttMaskedChannelSet::size() const
20 {
21  return 0;
22 }
23 
25  std::string const& filename)
26 {
27  if (filename.empty())
28  {
29  std::cout << "int InttMaskedChannelSet::LoadFromFile(std::string const& filename)" << std::endl;
30  std::cout << "\tArgument 'filename' is empty string" << std::endl;
31  return 1;
32  }
33 
34  if (!std::filesystem::exists(filename))
35  {
36  std::cout << "int InttMaskedChannelSet::LoadFromFile(std::string const& filename)" << std::endl;
37  std::cout << "\tFile '" << filename << "' does not exist" << std::endl;
38  return 1;
39  }
40 
41  CDBTTree cdbttree(filename);
42  cdbttree.LoadCalibrations();
43 
44  return v_LoadFromCDBTTree(cdbttree);
45 }
46 
48  std::string const& name)
49 {
50  if (name.empty())
51  {
52  std::cout << "int InttMaskedChannelSet::LoadFromCDB(std::string const& name)" << std::endl;
53  std::cout << "\tArgument 'name' is empty string" << std::endl;
54  return 1;
55  }
56 
57  std::string database = CDBInterface::instance()->getUrl(name);
58  CDBTTree cdbttree(database);
59  cdbttree.LoadCalibrations();
60 
61  return v_LoadFromCDBTTree(cdbttree);
62 }
63 
65  int const& layer,
66  int const& ladder_phi,
67  int const& ladder_z,
68  int const& strip_z,
69  int const& strip_phi) const
70 {
72  .layer = layer,
73  .ladder_phi = ladder_phi,
74  .ladder_z = ladder_z,
75  .strip_phi = strip_phi,
76  .strip_z = strip_z,
77  });
78 }
79 
81  InttMap::Offline_s const&
82  /*unused*/) const
83 {
84  return false;
85 }
86 
88  CDBTTree&
89  /*unused*/)
90 {
91  return 0;
92 }