er  dev
ERTelescopeGeoComponentSensetive.cxx
1 #include "ERTelescopeGeoComponentSensetive.h"
2 
3 #include <TXMLAttr.h>
4 
5 //--------------------------------------------------------------------------------------------------
6 TString ERTelescopeGeoComponentSensetive::GetBranchNamePrefix(
7  SensetiveType sensetiveType, ERDataObjectType objectType) const {
8  return TString("Telescope") + ERDataObjectTypeStr(objectType) + "_" + GetVolumeName();
9 }
10 //--------------------------------------------------------------------------------------------------
11 std::list<TString> ERTelescopeGeoComponentSensetive::GetBranchNames(ERDataObjectType objectType) const {
12  std::list<TString> branchNames;
13  for (const auto orientation : GetOrientationsAroundZ()) {
14  for (const auto channelSide : GetChannelSides()) {
15  branchNames.push_back(GetBranchName(objectType, orientation, channelSide));
16  }
17  }
18  return branchNames;
19 }
20 //--------------------------------------------------------------------------------------------------
21 void ERTelescopeGeoComponentSensetive::FillTwoSidedChannelAttribute(const TList* attributes) {
22  TIter next(attributes);
23  while (auto* attr = static_cast<TXMLAttr*>(next())) {
24  if (!strcasecmp("twoSidedChannel", attr->GetName()) && !strcasecmp("yes", attr->GetValue())) {
25  fHasTwoSidedChannel = true;
26  }
27  }
28 }
29 //--------------------------------------------------------------------------------------------------