Skip to content

Commit 3d85086

Browse files
committed
Cherry pick RTS/src/DAQ_TPX/tpxGain.h from 6dd0b8e
In order to resolve the error: ``` g++ -m64 -fPIC -pipe -Wall -Woverloaded-virtual -std=c++0x -Wno-long-long -pthread -Wno-deprecated-declarations -O2 -g -falign-loops -falign-jumps -falign-functions -Dsl79_gcc485 -D__ROOT__ -DNEW_DAQ_READER -I. -IStRoot/StTpcHitMaker -IStRoot/RTS/src -IStRoot/RTS/include -IStRoot/RTS/trg/include -I. -IStRoot -I.sl79_gcc485/include -I/opt/software/linux-scientific7-x86_64/gcc-4.8.5/root-5.34.38-l3v6vso6qgojm4l2ctwjojs6trbt4hpn/include -c .sl79_gcc485/OBJ/StRoot/StTpcHitMaker/StTpcRTSHitMaker.cxx -o .sl79_gcc485/OBJ/StRoot/StTpcHitMaker/StTpcRTSHitMaker.o .sl79_gcc485/OBJ/StRoot/StTpcHitMaker/StTpcRTSHitMaker.cxx: In member function 'virtual Int_t StTpcRTSHitMaker::InitRun(Int_t)': .sl79_gcc485/OBJ/StRoot/StTpcHitMaker/StTpcRTSHitMaker.cxx:216:33: error: invalid conversion from 'const Char_t* {aka const char*}' to 'char*' [-fpermissive] if (gain->from_file(fname, 0) < 0) { ^ In file included from .sl79_gcc485/OBJ/StRoot/StTpcHitMaker/StTpcRTSHitMaker.cxx:49:0: StRoot/RTS/src/DAQ_TPX/tpxGain.h:142:6: error: initializing argument 1 of 'int tpxGain::from_file(char*, int)' [-fpermissive] int from_file(char *fname, int sector = 0) ; ^ .sl79_gcc485/OBJ/StRoot/StTpcHitMaker/StTpcRTSHitMaker.cxx:150:19: warning: unused variable 'fnameITPC' [-Wunused-variable] const Char_t *fnameITPC = "none"; ^ cons: *** [.sl79_gcc485/OBJ/StRoot/StTpcHitMaker/StTpcRTSHitMaker.o] Error 1 cons: errors constructing .sl79_gcc485/OBJ/StRoot/StTpcHitMaker/StTpcRTSHitMaker.o ```
1 parent e431493 commit 3d85086

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

StRoot/RTS/src/DAQ_TPX/tpxGain.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -828,7 +828,7 @@ void tpxGain::do_default(int sec)
828828
return ;
829829
}
830830

831-
int tpxGain::from_file(char *fname, int sec)
831+
int tpxGain::from_file(const char *fname, int sec)
832832
{
833833
FILE *f ;
834834
int s, r, p ;
@@ -999,7 +999,7 @@ int tpxGain::from_file(char *fname, int sec)
999999
}
10001000

10011001

1002-
int tpxGain::to_file(char *fname)
1002+
int tpxGain::to_file(const char *fname)
10031003
{
10041004

10051005
FILE *f ;

StRoot/RTS/src/DAQ_TPX/tpxGain.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ class tpxGain
139139
return (gains[s-1] + r*TPX_MAX_PAD + (p-1)) ;
140140
}
141141

142-
int from_file(char *fname, int sector = 0) ;
142+
int from_file(const char *fname, int sector = 0) ;
143143

144144

145145
// [sector 1-24][RDO 1-6][fee-index 0-35]
@@ -193,7 +193,7 @@ class tpxGain
193193

194194

195195
// below used only during calculation
196-
int to_file(char *fname) ;
196+
int to_file(const char *fname) ;
197197

198198
void init(int sec=0) ; // zap's structs; assume all TPX
199199
void accum(char *evbuff, int bytes) ; // parses one RDO's worth of pulser data

0 commit comments

Comments
 (0)