CGEM BOSS 6.6.5.i
BESIII Offline Software System
Loading...
Searching...
No Matches
BesPipParameter Class Reference

#include <BesPipParameter.hh>

Public Member Functions

 BesPipParameter ()
 
 ~BesPipParameter ()
 
void ReadData ()
 
G4double getGoldLayer (G4int i)
 
G4double getInnerBe (G4int i)
 
G4double getOilLayer (G4int i)
 
G4double getOuterBe (G4int i)
 
G4double getInnerBeSide (G4int i)
 
G4double getInnerAl (G4int i)
 
G4double getAlRing (G4int i)
 
G4double getOuterAl (G4int i)
 
G4double getAgLayer (G4int i)
 
G4double getCuLayer (G4int i)
 
G4double getAlCover (G4int i)
 

Detailed Description

Definition at line 17 of file BesPipParameter.hh.

Constructor & Destructor Documentation

◆ BesPipParameter()

BesPipParameter::BesPipParameter ( )

Definition at line 16 of file BesPipParameter.cc.

17{
18}

◆ ~BesPipParameter()

BesPipParameter::~BesPipParameter ( )

Definition at line 19 of file BesPipParameter.cc.

20{
21}

Member Function Documentation

◆ getAgLayer()

G4double BesPipParameter::getAgLayer ( G4int i)
inline

Definition at line 34 of file BesPipParameter.hh.

34{ return AgLayer[i]; }

Referenced by BesPip::BesPip().

◆ getAlCover()

G4double BesPipParameter::getAlCover ( G4int i)
inline

Definition at line 36 of file BesPipParameter.hh.

36{ return AlCover[i]; }

Referenced by BesPip::BesPip().

◆ getAlRing()

G4double BesPipParameter::getAlRing ( G4int i)
inline

Definition at line 32 of file BesPipParameter.hh.

32{ return AlRing[i]; }

Referenced by BesPip::BesPip().

◆ getCuLayer()

G4double BesPipParameter::getCuLayer ( G4int i)
inline

Definition at line 35 of file BesPipParameter.hh.

35{ return CuLayer[i]; }

Referenced by BesPip::BesPip().

◆ getGoldLayer()

G4double BesPipParameter::getGoldLayer ( G4int i)
inline

Definition at line 25 of file BesPipParameter.hh.

25{ return goldLayer[i]; }

Referenced by BesPip::BesPip().

◆ getInnerAl()

G4double BesPipParameter::getInnerAl ( G4int i)
inline

Definition at line 31 of file BesPipParameter.hh.

31{ return innerAl[i]; }

Referenced by BesPip::BesPip().

◆ getInnerBe()

G4double BesPipParameter::getInnerBe ( G4int i)
inline

Definition at line 26 of file BesPipParameter.hh.

26{ return innerBe[i]; }

Referenced by BesPip::BesPip().

◆ getInnerBeSide()

G4double BesPipParameter::getInnerBeSide ( G4int i)
inline

Definition at line 30 of file BesPipParameter.hh.

30{ return innerBeSide[i]; }

Referenced by BesPip::BesPip().

◆ getOilLayer()

G4double BesPipParameter::getOilLayer ( G4int i)
inline

Definition at line 27 of file BesPipParameter.hh.

27{ return oilLayer[i]; }

Referenced by BesPip::BesPip().

◆ getOuterAl()

G4double BesPipParameter::getOuterAl ( G4int i)
inline

Definition at line 33 of file BesPipParameter.hh.

33{ return outerAl[i]; }

Referenced by BesPip::BesPip().

◆ getOuterBe()

G4double BesPipParameter::getOuterBe ( G4int i)
inline

Definition at line 28 of file BesPipParameter.hh.

28{ return outerBe[i]; }

Referenced by BesPip::BesPip().

◆ ReadData()

void BesPipParameter::ReadData ( )

Definition at line 22 of file BesPipParameter.cc.

23{
24 G4String GeometryPath = getenv("BESSIMROOT");
25 if(!GeometryPath){
26 G4Exception("BOOST environment not set!");
27 }
28 GeometryPath += "/dat/BesPip.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)>>goldLayer[0]>>goldLayer[1]>>goldLayer[2];
58 break;
59 case 2:
60 istrstream(p)>>innerBe[0]>>innerBe[1]>>innerBe[2];
61 break;
62 case 3:
63 istrstream(p)>>oilLayer[0]>>oilLayer[1]>>oilLayer[2];
64 break;
65 case 4:
66 istrstream(p)>>outerBe[0]>>outerBe[1]>>outerBe[2];
67 break;
68 case 5:
69 istrstream(p)>>innerBeSide[0]>>innerBeSide[1]>>innerBeSide[2]>>innerBeSide[3]>>innerBeSide[4];
70 break;
71 case 6:
72 istrstream(p)>>innerAl[0]>>innerAl[1]>>innerAl[2]>>innerAl[3]>>innerAl[4];
73 break;
74 case 7:
75 istrstream(p)>>AlRing[0]>>AlRing[1]>>AlRing[2]>>AlRing[3]>>AlRing[4];
76 break;
77 case 8:
78 istrstream(p)>>outerAl[0]>>outerAl[1]>>outerAl[2]>>outerAl[3]>>outerAl[4];
79 break;
80 case 9:
81 istrstream(p)>>AgLayer[0]>>AgLayer[1]>>AgLayer[2]>>AgLayer[3]>>AgLayer[4];
82 break;
83 case 10:
84 istrstream(p)>>CuLayer[0]>>CuLayer[1]>>CuLayer[2]>>CuLayer[3]>>CuLayer[4];
85 break;
86 case 11:
87 istrstream(p)>>AlCover[0]>>AlCover[1]>>AlCover[2]>>AlCover[3]>>AlCover[4];
88 }
89 }
90}

Referenced by BesPip::BesPip().


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