CGEM BOSS 6.6.5.f
BESIII Offline Software System
Loading...
Searching...
No Matches
StripMapper Class Reference

#include <StripMapper.h>

Public Member Functions

 StripMapper (TString name)
 
 ~StripMapper ()
 
bool FillMap ()
 
int GetGEMROC (int stripid, int striptype, int layerid, int sheetid)
 
int GetFEB (int stripid, int striptype, int layerid, int sheetid)
 
int GetTIGER (int stripid, int striptype, int layerid, int sheetid)
 
 StripMapper (TString name)
 
 ~StripMapper ()
 
bool FillMap ()
 
int GetGEMROC (int stripid, int striptype, int layerid, int sheetid)
 
int GetFEB (int stripid, int striptype, int layerid, int sheetid)
 
int GetTIGER (int stripid, int striptype, int layerid, int sheetid)
 
 StripMapper (TString name)
 
 ~StripMapper ()
 
bool FillMap ()
 
int GetGEMROC (int stripid, int striptype, int layerid, int sheetid)
 
int GetFEB (int stripid, int striptype, int layerid, int sheetid)
 
int GetTIGER (int stripid, int striptype, int layerid, int sheetid)
 

Detailed Description

Constructor & Destructor Documentation

◆ StripMapper() [1/3]

StripMapper::StripMapper ( TString  name)

Definition at line 20 of file bak_ReadCosmicRayData-00-00-09/src/StripMapper.cxx.

20 {
21 CosmicRayDataSetID = dataset;
22}

◆ ~StripMapper() [1/3]

StripMapper::~StripMapper ( )

Definition at line 24 of file bak_ReadCosmicRayData-00-00-09/src/StripMapper.cxx.

24{}

◆ StripMapper() [2/3]

StripMapper::StripMapper ( TString  name)

◆ ~StripMapper() [2/3]

StripMapper::~StripMapper ( )

◆ StripMapper() [3/3]

StripMapper::StripMapper ( TString  name)

◆ ~StripMapper() [3/3]

StripMapper::~StripMapper ( )

Member Function Documentation

◆ FillMap() [1/3]

bool StripMapper::FillMap ( )

std::cout << mapname << std::endl; std::cout << "layer " << ilayer << std::endl; std::cout << "sheet " << isheet << std::endl; std::cout << "view " << iview << std::endl; std::cout << "titleline " << titleline << std::endl;

Definition at line 26 of file bak_ReadCosmicRayData-00-00-09/src/StripMapper.cxx.

26 {
27
28
29 if(CosmicRayDataSetID == "CR201909") {
30
31 TString dir = gSystem->ExpandPathName("$READCOSMICRAYDATAROOT");
32 dir += "/dat/CR201909/";
33
34 // L1
35 TString mapname = dir;
36 ifstream input;
37 std::string titleline;
38
39 const int nlayer = 3; // CHECK hardcoded
40 const int nsheet[nlayer] = {1, 2, 2}; // CHECK hardcoded
41 const int nview = 2; // CHECK hardcoded
42 int nstrip[nlayer][nview] = {{856, 1173}, {630, 1077}, {832, 1395}}; // CHECK hardcoded
43
44
45 for(int ilayer = 0; ilayer < nlayer; ilayer++) {
46 for(int isheet = 0; isheet < nsheet[ilayer]; isheet++) {
47 for(int iview = 0; iview < nview; iview++) {
48
49 int layerid = ilayer + 1;
50 int sheetid = isheet + 1;
51
52 mapname = dir;
53 mapname += "mapping_L";
54 mapname += layerid;
55 mapname += "_S";
56 mapname += sheetid;
57 if(iview == 0) mapname += "_x.csv";
58 else mapname += "_v.csv";
59 std::cout << "StripMapper::FillMap, reading " << mapname << std::endl;
60
61 input.open(mapname);
62 if(!input.good()) {
63 std::cout << "StripMapper::FillMap, file not there!" << std::endl;
64 continue;
65 }
66
67 std::getline(input, titleline);
68
69 /**
70 std::cout << mapname << std::endl;
71 std::cout << "layer " << ilayer << std::endl;
72 std::cout << "sheet " << isheet << std::endl;
73 std::cout << "view " << iview << std::endl;
74 std::cout << "titleline " << titleline << std::endl;
75 **/
76
77 for(int istrip = 0; istrip < nstrip[ilayer][iview]; istrip++) {
78
79 // strip id / GEMROC / FEB / TIGER
80 int stripid;
81 input >> stripid
82 >> mapping[istrip][ilayer][isheet][iview][0] // gemroc
83 >> mapping[istrip][ilayer][isheet][iview][1] // feb
84 >> mapping[istrip][ilayer][isheet][iview][2]; // tiger
85
86 // std::cout << istrip << " <---> " << stripid << " " << mapping[istrip][ilayer][isheet][iview][0] << " " << mapping[istrip][ilayer][isheet][iview][1] << " " << mapping[istrip][ilayer][isheet][iview][2] << std::endl;
87 }
88
89 input.close();
90 }
91 }
92 }
93
94 return true;
95 }
96
97 return false;
98
99
100}

◆ FillMap() [2/3]

bool StripMapper::FillMap ( )

◆ FillMap() [3/3]

bool StripMapper::FillMap ( )

◆ GetFEB() [1/3]

int StripMapper::GetFEB ( int  stripid,
int  striptype,
int  layerid,
int  sheetid 
)

Definition at line 107 of file bak_ReadCosmicRayData-00-00-09/src/StripMapper.cxx.

107 {
108 return mapping[strip][layer][sheet][type][1];
109}

◆ GetFEB() [2/3]

int StripMapper::GetFEB ( int  stripid,
int  striptype,
int  layerid,
int  sheetid 
)

◆ GetFEB() [3/3]

int StripMapper::GetFEB ( int  stripid,
int  striptype,
int  layerid,
int  sheetid 
)

◆ GetGEMROC() [1/3]

int StripMapper::GetGEMROC ( int  stripid,
int  striptype,
int  layerid,
int  sheetid 
)

Definition at line 103 of file bak_ReadCosmicRayData-00-00-09/src/StripMapper.cxx.

103 {
104 return mapping[strip][layer][sheet][type][0];
105}

◆ GetGEMROC() [2/3]

int StripMapper::GetGEMROC ( int  stripid,
int  striptype,
int  layerid,
int  sheetid 
)

◆ GetGEMROC() [3/3]

int StripMapper::GetGEMROC ( int  stripid,
int  striptype,
int  layerid,
int  sheetid 
)

◆ GetTIGER() [1/3]

int StripMapper::GetTIGER ( int  stripid,
int  striptype,
int  layerid,
int  sheetid 
)

Definition at line 111 of file bak_ReadCosmicRayData-00-00-09/src/StripMapper.cxx.

111 {
112 return mapping[strip][layer][sheet][type][2];
113}

◆ GetTIGER() [2/3]

int StripMapper::GetTIGER ( int  stripid,
int  striptype,
int  layerid,
int  sheetid 
)

◆ GetTIGER() [3/3]

int StripMapper::GetTIGER ( int  stripid,
int  striptype,
int  layerid,
int  sheetid 
)

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