QwAnalysis
QwTypes.cc File Reference
#include "QwTypes.h"
#include "TString.h"
+ Include dependency graph for QwTypes.cc:

Go to the source code of this file.

Functions

EQwPMTInstrumentType GetQwPMTInstrumentType (TString name)
 
EQwBeamInstrumentType GetQwBeamInstrumentType (TString name)
 
TString GetQwPMTInstrumentTypeName (EQwPMTInstrumentType type)
 
TString GetQwBeamInstrumentTypeName (EQwBeamInstrumentType type)
 
UInt_t GetGlobalErrorFlag (TString evtype, Int_t evMode, Double_t stabilitycut)
 
std::string WienModeName (EQwWienMode type)
 
EQwWienMode WienModeIndex (TString name)
 

Function Documentation

UInt_t GetGlobalErrorFlag ( TString  evtype,
Int_t  evMode,
Double_t  stabilitycut 
)

Definition at line 127 of file QwTypes.cc.

References kEventCutMode3, kGlobalCut, kLocalCut, and kStabilityCut.

Referenced by QwBeamLine::LoadEventCuts(), QwMainCerenkovDetector::LoadEventCuts(), QwBeamMod::LoadEventCuts(), QwIntegratedRaster::LoadEventCuts(), and QwLumi::LoadEventCuts().

127  {
128  UInt_t evntMode;
129  if (evMode==3)
130  evntMode=kEventCutMode3;
131  else
132  evntMode=0;
133  if (evtype=="g" && stabilitycut>0)
134  return (kGlobalCut|kStabilityCut|evntMode);
135  else if (evtype=="g" && stabilitycut<=0)
136  return (kGlobalCut|evntMode);
137  else if (evtype=="l" && stabilitycut>0)
138  return (kLocalCut|evntMode|kStabilityCut);
139  else if (evtype=="l" && stabilitycut<=0)
140  return (kLocalCut|evntMode);
141 
142  return 0;
143 }
static const UInt_t kLocalCut
Definition: QwTypes.h:177
static const UInt_t kEventCutMode3
Definition: QwTypes.h:173
static const UInt_t kGlobalCut
Definition: QwTypes.h:176
static const UInt_t kStabilityCut
Definition: QwTypes.h:178

+ Here is the caller graph for this function:

EQwBeamInstrumentType GetQwBeamInstrumentType ( TString  name)

Definition at line 29 of file QwTypes.cc.

References kQwBCM, kQwBPMCavity, kQwBPMStripline, kQwClock, kQwCombinedBCM, kQwCombinedBPM, kQwEnergyCalculator, kQwHaloMonitor, kQwLinearArray, kQwQPD, and kQwUnknownDeviceType.

Referenced by QwBeamLine::LoadChannelMap(), QwBeamLine::LoadEventCuts(), QwBeamLine::LoadGeometryDefinition(), QwBeamLine::PublishInternalValues(), and QwBeamDetectorID::QwBeamDetectorID().

29  {
30  // The name is passed by value because we will
31  // change it to lower case.
32  name.ToLower();
33  EQwBeamInstrumentType result;
34  result = kQwUnknownDeviceType;
35  if (name=="bpmstripline"){
36  result = kQwBPMStripline;
37  }
38  else if (name=="bcm"){
39  result = kQwBCM;
40  }
41  else if (name=="combinedbcm"){
42  result = kQwCombinedBCM;
43  }
44  else if (name=="combinedbpm"){
45  result = kQwCombinedBPM;
46  }
47  else if (name=="energycalculator"){
48  result = kQwEnergyCalculator;
49  }
50  else if (name=="halomonitor"){
51  result = kQwHaloMonitor;
52  }
53  else if (name=="bpmcavity"){
54  result = kQwBPMCavity;
55  }
56  else if (name=="qpd"){
57  result = kQwQPD;
58  }
59  else if (name=="lineararray"){
60  result = kQwLinearArray;
61  }
62  else if (name=="clock") {
63  result = kQwClock;
64  }
65  return result;
66 }
EQwBeamInstrumentType
Definition: QwTypes.h:132

+ Here is the caller graph for this function:

TString GetQwBeamInstrumentTypeName ( EQwBeamInstrumentType  type)

Definition at line 95 of file QwTypes.cc.

References kQwBCM, kQwBPMCavity, kQwBPMStripline, kQwCombinedBCM, kQwCombinedBPM, kQwEnergyCalculator, kQwHaloMonitor, kQwLinearArray, and kQwQPD.

Referenced by QwBeamLine::GetChannel(), QwBeamLine::GetElement(), QwBeamLine::LoadEventCuts(), and QwBeamLine::PublishByRequest().

95  {
96  TString result;
97  result = "kQwUnknownDeviceType";
98  if (type==kQwBPMStripline){
99  result = "bpmstripline";
100  }
101  else if (type==kQwBCM){
102  result = "bcm";
103  }
104  else if (type==kQwQPD){
105  result = "qpd";
106  }
107  else if (type==kQwLinearArray){
108  result = "lineararray";
109  }
110  else if (type==kQwCombinedBCM){
111  result = "combinedbcm";
112  }
113  else if (type==kQwCombinedBPM){
114  result = "combinedbpm";
115  }
116  else if (type==kQwEnergyCalculator){
117  result = "energycalculator";
118  }
119  else if (type==kQwHaloMonitor){
120  result = "halomonitor";
121  }
122  else if (type==kQwBPMCavity)
123  result = "bpmcavity";
124  return result;
125 }

+ Here is the caller graph for this function:

EQwPMTInstrumentType GetQwPMTInstrumentType ( TString  name)

Determine the EQwPMTInstrumentType value corresponding to a text name of the type, as used in the channel map files. The text comparison is not case sensitive.

Parameters
nameText name of an instrument type, such as "IntegrationPMT"
Returns
EQwPMTInstrumentType value corresponding to the name

Definition at line 11 of file QwTypes.cc.

References kQwCombinedPMT, kQwIntegrationPMT, kQwScalerPMT, and kQwUnknownPMT.

Referenced by QwLumi::GetDetectorTypeID(), and QwMainCerenkovDetector::GetDetectorTypeID().

11  {
12  // The name is passed by value because we will
13  // change it to lower case.
14  name.ToLower();
15  EQwPMTInstrumentType result;
16  result = kQwUnknownPMT;
17  if (name=="integrationpmt"){
18  result = kQwIntegrationPMT;
19  } else if (name=="scalerpmt"){
20  result = kQwScalerPMT;
21  }
22  else if (name=="combinationpmt"){
23  result = kQwCombinedPMT;
24  }
25  return result;
26 }
EQwPMTInstrumentType
Definition: QwTypes.h:124

+ Here is the caller graph for this function:

TString GetQwPMTInstrumentTypeName ( EQwPMTInstrumentType  type)

Get the text name of a EQwPMTInstrumentType, as it would be used in the channel map files.

Parameters
typeEQwPMTInstrumentType value for which the name should be returned, such as kQwPMTIntegrationPMT
Returns
Text name corresponding to the type

Definition at line 76 of file QwTypes.cc.

References kQwCombinedPMT, kQwIntegrationPMT, and kQwScalerPMT.

Referenced by QwMainCerenkovDetector::LoadEventCuts(), and QwLumi::LoadEventCuts().

76  {
77  TString result;
78  result = "UnknownPMT";
79  if (type==kQwIntegrationPMT){
80  result = "IntegrationPMT";
81  result.ToLower();
82  }
83  else if (type==kQwScalerPMT){
84  result = "ScalerPMT";
85  result.ToLower();
86  }
87  else if (type==kQwCombinedPMT){
88  result = "CombinationPMT";
89  result.ToLower();
90  }
91  return result;
92 }

+ Here is the caller graph for this function:

EQwWienMode WienModeIndex ( TString  name)

Definition at line 151 of file QwTypes.cc.

References kWienBackward, kWienForward, kWienHorizTrans, kWienIndeterminate, and kWienVertTrans.

Referenced by QwEPICSEvent::FillSlowControlsSettings().

151  {
153  if (name=="Forward"){
154  retval = kWienForward;
155  } else if (name=="Backward"){
156  retval = kWienBackward;
157  } else if (name=="Vertical"){
158  retval = kWienVertTrans;
159  } else if (name=="Horizontal"){
160  retval = kWienHorizTrans;
161  }
162  return retval;
163 }
EQwWienMode
Double Wien configuration.
Definition: QwTypes.h:302

+ Here is the caller graph for this function:

std::string WienModeName ( EQwWienMode  type)

Definition at line 145 of file QwTypes.cc.

Referenced by QwEPICSEvent::ExtractEPICSValues(), and QwBlinder::SetWienState().

145  {
146  const std::string wienname[5] = {"Indeterminate", "Forward", "Backward",
147  "Vertical", "Horizontal"};
148  return wienname[type];
149 };

+ Here is the caller graph for this function: