BOSS 6.6.4.p01
BESIII Offline Software System
Loading...
Searching...
No Matches
BesSCMParameter Class Reference

#include <BesSCMParameter.hh>

Public Member Functions

 BesSCMParameter ()
 
 ~BesSCMParameter ()
 
void ReadData ()
 
G4double getInnerCryo (G4int i)
 
G4double getL1Adia (G4int i)
 
G4double getInnerShield (G4int i)
 
G4double getL2Adia (G4int i)
 
G4double getOuterShield (G4int i)
 
G4double getL3Adia (G4int i)
 
G4double getEndShield (G4int i)
 
G4double getL1insu (G4int i)
 
G4double getCoil (G4int i)
 
G4double getL2insu (G4int i)
 
G4double getSupp (G4int i)
 
G4double getL4Adia (G4int i)
 
G4double getEndCoil (G4int i)
 
G4double getOuterCryo (G4int i)
 
G4double getEndCryo (G4int i)
 
G4double getRein (G4int i)
 
G4double getPipe1 (G4int i)
 
G4double getPipe2 (G4int i)
 
G4double getPipe3 (G4int i)
 
G4double getHole (G4int i)
 

Detailed Description

Definition at line 17 of file BesSCMParameter.hh.

Constructor & Destructor Documentation

◆ BesSCMParameter()

BesSCMParameter::BesSCMParameter ( )

Definition at line 16 of file BesSCMParameter.cc.

17{
18}

◆ ~BesSCMParameter()

BesSCMParameter::~BesSCMParameter ( )

Definition at line 19 of file BesSCMParameter.cc.

20{
21}

Member Function Documentation

◆ getCoil()

G4double BesSCMParameter::getCoil ( G4int  i)
inline

Definition at line 33 of file BesSCMParameter.hh.

33{ return coil[i]; }

Referenced by BesSCM::BesSCM().

◆ getEndCoil()

G4double BesSCMParameter::getEndCoil ( G4int  i)
inline

Definition at line 37 of file BesSCMParameter.hh.

37{ return endCoil[i]; }

Referenced by BesSCM::BesSCM().

◆ getEndCryo()

G4double BesSCMParameter::getEndCryo ( G4int  i)
inline

Definition at line 39 of file BesSCMParameter.hh.

39{ return endCryo[i]; }

Referenced by BesSCM::BesSCM().

◆ getEndShield()

G4double BesSCMParameter::getEndShield ( G4int  i)
inline

Definition at line 31 of file BesSCMParameter.hh.

31{ return endShield[i]; }

Referenced by BesSCM::BesSCM().

◆ getHole()

G4double BesSCMParameter::getHole ( G4int  i)
inline

Definition at line 44 of file BesSCMParameter.hh.

44{ return hole[i]; }

Referenced by BesSCM::BesSCM().

◆ getInnerCryo()

G4double BesSCMParameter::getInnerCryo ( G4int  i)
inline

Definition at line 25 of file BesSCMParameter.hh.

25{ return innerCryo[i]; }

Referenced by BesSCM::BesSCM().

◆ getInnerShield()

G4double BesSCMParameter::getInnerShield ( G4int  i)
inline

Definition at line 27 of file BesSCMParameter.hh.

27{ return innerShield[i]; }

Referenced by BesSCM::BesSCM().

◆ getL1Adia()

G4double BesSCMParameter::getL1Adia ( G4int  i)
inline

Definition at line 26 of file BesSCMParameter.hh.

26{ return l1Adia[i]; }

Referenced by BesSCM::BesSCM().

◆ getL1insu()

G4double BesSCMParameter::getL1insu ( G4int  i)
inline

Definition at line 32 of file BesSCMParameter.hh.

32{ return l1insu[i]; }

Referenced by BesSCM::BesSCM().

◆ getL2Adia()

G4double BesSCMParameter::getL2Adia ( G4int  i)
inline

Definition at line 28 of file BesSCMParameter.hh.

28{ return l2Adia[i]; }

Referenced by BesSCM::BesSCM().

◆ getL2insu()

G4double BesSCMParameter::getL2insu ( G4int  i)
inline

Definition at line 34 of file BesSCMParameter.hh.

34{ return l2insu[i]; }

Referenced by BesSCM::BesSCM().

◆ getL3Adia()

G4double BesSCMParameter::getL3Adia ( G4int  i)
inline

Definition at line 30 of file BesSCMParameter.hh.

30{ return l3Adia[i]; }

Referenced by BesSCM::BesSCM().

◆ getL4Adia()

G4double BesSCMParameter::getL4Adia ( G4int  i)
inline

Definition at line 36 of file BesSCMParameter.hh.

36{ return l4Adia[i]; }

Referenced by BesSCM::BesSCM().

◆ getOuterCryo()

G4double BesSCMParameter::getOuterCryo ( G4int  i)
inline

Definition at line 38 of file BesSCMParameter.hh.

38{ return outerCryo[i]; }

Referenced by BesSCM::BesSCM().

◆ getOuterShield()

G4double BesSCMParameter::getOuterShield ( G4int  i)
inline

Definition at line 29 of file BesSCMParameter.hh.

29{ return outerShield[i]; }

Referenced by BesSCM::BesSCM().

◆ getPipe1()

G4double BesSCMParameter::getPipe1 ( G4int  i)
inline

Definition at line 41 of file BesSCMParameter.hh.

41{ return pipe1[i]; }

Referenced by BesSCM::BesSCM().

◆ getPipe2()

G4double BesSCMParameter::getPipe2 ( G4int  i)
inline

Definition at line 42 of file BesSCMParameter.hh.

42{ return pipe2[i]; }

Referenced by BesSCM::BesSCM().

◆ getPipe3()

G4double BesSCMParameter::getPipe3 ( G4int  i)
inline

Definition at line 43 of file BesSCMParameter.hh.

43{ return pipe3[i]; }

Referenced by BesSCM::BesSCM().

◆ getRein()

G4double BesSCMParameter::getRein ( G4int  i)
inline

Definition at line 40 of file BesSCMParameter.hh.

40{ return rein[i]; }

Referenced by BesSCM::BesSCM().

◆ getSupp()

G4double BesSCMParameter::getSupp ( G4int  i)
inline

Definition at line 35 of file BesSCMParameter.hh.

35{ return supp[i]; }

Referenced by BesSCM::BesSCM().

◆ ReadData()

void BesSCMParameter::ReadData ( )

Definition at line 22 of file BesSCMParameter.cc.

23{
24 G4String GeometryPath = getenv("BESSIMROOT");
25 if(!GeometryPath){
26 G4Exception("BOOST environment not set!");
27 }
28 GeometryPath += "/dat/BesSCM.txt";
29
30 ifstream fin;
31 fin.open(GeometryPath);
32
33 const int maxCharOfOneLine=255;
34 char temp[maxCharOfOneLine],*p;
35 int lineNo=0,inputNo=0;
36 while(fin.peek()!=EOF)
37 {
38 fin.getline(temp,maxCharOfOneLine);
39 p=temp;
40 lineNo++;
41 while(*p!='\0')
42 {
43 if(*p=='#')
44 {
45 *p='\0'; //delete the comments.
46 break;
47 }
48 p++;
49 }
50 p=temp; //reset the pointer to the beginning of the string.
51 while(*p==' '||*p=='\t')p++;
52 if(*p=='\0')continue;
53 inputNo++;
54 switch(inputNo)
55 {
56 case 1:
57 istrstream(p)>>innerCryo[0]>>innerCryo[1]>>innerCryo[2];
58 break;
59 case 2:
60 istrstream(p)>>l1Adia[0]>>l1Adia[1]>>l1Adia[2];
61 break;
62 case 3:
63 istrstream(p)>>innerShield[0]>>innerShield[1]>>innerShield[2];
64 break;
65 case 4:
66 istrstream(p)>>l2Adia[0]>>l2Adia[1]>>l2Adia[2];
67 break;
68 case 5:
69 istrstream(p)>>outerShield[0]>>outerShield[1]>>outerShield[2];
70 break;
71 case 6:
72 istrstream(p)>>l3Adia[0]>>l3Adia[1]>>l3Adia[2];
73 break;
74 case 7:
75 istrstream(p)>>endShield[0]>>endShield[1]>>endShield[2]>>endShield[3]>>endShield[4];
76 break;
77 case 8:
78 istrstream(p)>>l1insu[0]>>l1insu[1]>>l1insu[2];
79 break;
80 case 9:
81 istrstream(p)>>coil[0]>>coil[1]>>coil[2];
82 break;
83 case 10:
84 istrstream(p)>>l2insu[0]>>l2insu[1]>>l2insu[2];
85 break;
86 case 11:
87 istrstream(p)>>supp[0]>>supp[1]>>supp[2];
88 break;
89 case 12:
90 istrstream(p)>>l4Adia[0]>>l4Adia[1]>>l4Adia[2];
91 break;
92 case 13:
93 istrstream(p)>>endCoil[0]>>endCoil[1]>>endCoil[2]>>endCoil[3]>>endCoil[4];
94 break;
95 case 14:
96 istrstream(p)>>outerCryo[0]>>outerCryo[1]>>outerCryo[2];
97 break;
98 case 15:
99 istrstream(p)>>endCryo[0]>>endCryo[1]>>endCryo[2]>>endCryo[3]>>endCryo[4];
100 break;
101 case 16:
102 istrstream(p)>>rein[0]>>rein[1]>>rein[2]>>rein[3]>>rein[4];
103 break;
104 case 17:
105 istrstream(p)>>pipe1[0]>>pipe1[1]>>pipe1[2]>>pipe1[3]>>pipe1[4]>>pipe1[5];
106 break;
107 case 18:
108 istrstream(p)>>pipe2[0]>>pipe2[1]>>pipe2[2]>>pipe2[3]>>pipe2[4]>>pipe2[5];
109 break;
110 case 19:
111 istrstream(p)>>pipe3[0]>>pipe3[1]>>pipe3[2]>>pipe3[3]>>pipe3[4]>>pipe3[5];
112 break;
113 case 20:
114 istrstream(p)>>hole[0]>>hole[1]>>hole[2]>>hole[3]>>hole[4]>>hole[5]>>hole[6]>>hole[7]>>hole[8]>>hole[9]>>hole[10]>>hole[11]>>hole[12];
115 }
116 }
117}
std::ifstream ifstream
Definition: bpkt_streams.h:44

Referenced by BesSCM::BesSCM().


The documentation for this class was generated from the following files: