ATTPCROOT  0.3.0-alpha
A ROOT-based framework for analyzing data from active target detectors
S800TSettings.cxx
Go to the documentation of this file.
1 #include "S800TSettings.h"
2 
3 #include <TString.h>
4 
5 #include <cstdio>
6 #include <utility>
7 
9 {
10 
11  this->fName = "TheSettings";
12  this->fTitle = "S800T's Settings";
13 }
14 
16 
17 void S800TSettings::AddCorrectionSettings(string Name, double slope, double inter, double toff)
18 {
19  TheTimingOffsets[Name] = toff;
20  TheEnergySlopes[Name] = slope;
21  TheEnergyIntercepts[Name] = inter;
22 }
23 
24 void S800TSettings::AddMapSettings(string Name, int GlobalID, string RefName, int refGlobalID)
25 {
26  GlobalID2FullName[GlobalID] = Name;
27  GlobalID2RefGlobalID[GlobalID] = refGlobalID;
28  GlobalID2RefName[GlobalID] = RefName;
29 
30  Name2GlobalID[Name] = GlobalID;
31 }
32 
33 void S800TSettings::AddFilterSettings(string Name, int FL, int FG, int d, int w, bool flag)
34 {
35 
36  TheFLs[Name] = FL;
37  TheFGs[Name] = FG;
38  Theds[Name] = d;
39  Thews[Name] = w;
40  TheDontTraceAnalyzeFlags[Name] = flag;
41 }
42 
44 {
45 
46  for (auto &ii : TheTimingOffsets) {
47  cout << endl;
48  PrintChannelCorrections(ii.first);
49  PrintChannelMapInfo(Name2GlobalID[ii.first]);
50  PrintFilterInfo(ii.first);
51  }
52 }
53 
55 {
56  printf("Channel Name %6s has slope %10.4lf has intercept %10.4lf and timming offset %10.4lf\n", Name.c_str(),
57  TheEnergySlopes[Name], TheEnergyIntercepts[Name], TheTimingOffsets[Name]);
58 }
59 
61 {
62  printf("Channel Name %6s has DDAS ID %4d it's reference channel is %6s whith DDAS ID %4d\n",
63  GlobalID2FullName[GlobalID].c_str(), GlobalID, GlobalID2RefName[GlobalID].c_str(),
64  GlobalID2RefGlobalID[GlobalID]);
65 }
67 {
68  printf("Channel Name %6s has FL:%5d FG:%5d d:%5d w:%5d NoTraceAnalysis:%5d \n", Name.c_str(), TheFLs[Name],
69  TheFGs[Name], Theds[Name], Thews[Name], TheDontTraceAnalyzeFlags[Name]);
70 }
71 
73 {
74  PrintChannelMapInfo(Name2GlobalID[Name]);
75 }
76 
77 void S800TSettings::SetBarIds(map<string, int> v)
78 {
79  BarIds = v;
80  BuildReverseMap();
81 }
82 
83 void S800TSettings::BuildReverseMap()
84 {
85  for (auto &ii : BarIds) {
86 
87  BarId2Name[ii.second] = ii.first;
88  }
89 }
S800TSettings.h
S800TSettings::PrintFilterInfo
void PrintFilterInfo(string Name)
Definition: S800TSettings.cxx:66
S800TSettings::SetBarIds
void SetBarIds(map< string, int > v)
Definition: S800TSettings.cxx:77
S800TSettings::PrintChannelCorrections
void PrintChannelCorrections(string Name)
Definition: S800TSettings.cxx:54
S800TSettings::PrintChannelMapInfo
void PrintChannelMapInfo(int GlobalID)
Definition: S800TSettings.cxx:60
S800TSettings::AddCorrectionSettings
void AddCorrectionSettings(string Name, double slope, double inter, double toff)
Definition: S800TSettings.cxx:17
S800TSettings::AddMapSettings
void AddMapSettings(string Name, int GlobalID, string RefName, int refGlobalID)
Definition: S800TSettings.cxx:24
S800TSettings::AddFilterSettings
void AddFilterSettings(string Name, int FL, int FG, int d, int w, bool flag)
Definition: S800TSettings.cxx:33
S800TSettings::S800TSettings
S800TSettings()
Definition: S800TSettings.cxx:8
S800TSettings::PrintAll
void PrintAll()
Definition: S800TSettings.cxx:43
S800TSettings::~S800TSettings
~S800TSettings()