diff --git a/OnlTools/Jevp/StJevpBuilders/fcsMap.h b/OnlTools/Jevp/StJevpBuilders/fcsMap.h index f52d20b3c87..1cd3bbff560 100644 --- a/OnlTools/Jevp/StJevpBuilders/fcsMap.h +++ b/OnlTools/Jevp/StJevpBuilders/fcsMap.h @@ -128,8 +128,8 @@ Short_t HMapSCBRA[10]; Short_t HMapSCPP[10]; Short_t HMapSCJ[10]; -char* colW[4]={"Green ","Brown ","Orange","Blue "}; -char* colJ[8]={"Blue ","Orange","Violet","Black ", +const char* colW[4]={"Green ","Brown ","Orange","Blue "}; +const char* colJ[8]={"Blue ","Orange","Violet","Black ", "Yellow","Red ","Grey ","Blue "}; float leng[8]={ 6.5, 6.5, 5.0, 5.0, 3.5, 3.5, 8.0, 8.0}; @@ -347,7 +347,7 @@ int jacketColor(int ehp, int dep, int ch){ } void getName(Int_t det, Int_t id, char name[]){ - char* nameDET[6]={"EN","ES","HN","HS","PN","PS"}; + const char* nameDET[6]={"EN","ES","HN","HS","PN","PS"}; int ehp,ns,crt,slt,dep,ch; int c=getColumnNumber(det,id); int r=getRowNumber(det,id); @@ -359,7 +359,7 @@ void getName(Int_t det, Int_t id, char name[]){ } void getName(Int_t ehp, Int_t ns, Int_t dep, Int_t ch, char name[]){ - char* nameDET[6]={"EN","ES","HN","HS","PN","PS"}; + const char* nameDET[6]={"EN","ES","HN","HS","PN","PS"}; int det,id,crt,slt; getIdfromDep(ehp,ns,dep,ch,det,id,crt,slt); // printf("%1d %1d %2d %2d : %1d %3d\n",ehp,ns,dep,ch,det,id); @@ -743,9 +743,9 @@ void printMap(){ FILE *f7 = fopen("fcsEpdMap.txt","w"); FILE *fpp = fopen("fcsPPMap.txt","w"); - char* EHP[3]={"Ecal","Hcal","Pres"}; - char* CRT[5]={"EN","MN","MA","MS","ES"}; - char* DET[6]={"EN","ES","HN","HS","PN","PS"}; + const char* EHP[3]={"Ecal","Hcal","Pres"}; + const char* CRT[5]={"EN","MN","MA","MS","ES"}; + const char* DET[6]={"EN","ES","HN","HS","PN","PS"}; //Ecal for(ns=0; ns<2; ns++){ diff --git a/OnlTools/Jevp/StJevpPlot/CanvasImageBuilder.cxx b/OnlTools/Jevp/StJevpPlot/CanvasImageBuilder.cxx index 5a4018b51ae..bb1ba3d98fa 100644 --- a/OnlTools/Jevp/StJevpPlot/CanvasImageBuilder.cxx +++ b/OnlTools/Jevp/StJevpPlot/CanvasImageBuilder.cxx @@ -139,7 +139,7 @@ void CanvasImageBuilder::writeIndexFiles(FILE *f, DisplayNode *node, int page, i } } -int CanvasImageBuilder::writeIndexFromNode(FILE *f, DisplayNode *node, char *currdir, int page, int tabs) { +int CanvasImageBuilder::writeIndexFromNode(FILE *f, DisplayNode *node, const char *currdir, int page, int tabs) { int npages = 0; if(node->leaf) { fprintf(f,"%s : %d\n", currdir, page); diff --git a/OnlTools/Jevp/StJevpPlot/CanvasImageBuilder.h b/OnlTools/Jevp/StJevpPlot/CanvasImageBuilder.h index 3ab87db1913..1efb9a9e7cf 100644 --- a/OnlTools/Jevp/StJevpPlot/CanvasImageBuilder.h +++ b/OnlTools/Jevp/StJevpPlot/CanvasImageBuilder.h @@ -58,7 +58,7 @@ class CanvasImageBuilder { private: void writeIndexFiles(FILE *f, DisplayNode *node, int page, int tabs); // Does above recursively... - int writeIndexFromNode(FILE *f, DisplayNode *node, char *dir, int page, int tabs); + int writeIndexFromNode(FILE *f, DisplayNode *node, const char *dir, int page, int tabs); int writeImageFile(char *dir, DisplayNode *node, double ymax=-999); // Does above recursively... diff --git a/OnlTools/Jevp/StJevpPlot/JevpPlotSet.cxx b/OnlTools/Jevp/StJevpPlot/JevpPlotSet.cxx index 71a4410b4e6..d429c02f682 100644 --- a/OnlTools/Jevp/StJevpPlot/JevpPlotSet.cxx +++ b/OnlTools/Jevp/StJevpPlot/JevpPlotSet.cxx @@ -92,11 +92,11 @@ JevpPlotSet::JevpPlotSet(JevpServer *server) PCP; } -void JevpPlotSet::logDbVariable(char *name, double value) { +void JevpPlotSet::logDbVariable(const char *name, double value) { JevpPlotSet::staticLogDbVariable(name, value, run, lastevttm, plotsetname, clientdatadir); } -void JevpPlotSet::staticLogDbVariable(char *name, double value, int my_run, int my_time, char *my_plotsetname, char *my_clientdatadir) { +void JevpPlotSet::staticLogDbVariable(const char *name, double value, int my_run, int my_time, const char *my_plotsetname, const char *my_clientdatadir) { char fn[256]; sprintf(fn, "%s/%s", my_clientdatadir, "dbVariable.tosend"); @@ -959,7 +959,7 @@ void JevpPlotSet::writePdfFile() } // ugly, but threadsafe if parent->addServerTags() is threadsafe! -void JevpPlotSet::addServerTags(char *tags) +void JevpPlotSet::addServerTags(const char *tags) { char *tmp = (char *)malloc(strlen(tags) + 3); if(!tmp) { diff --git a/OnlTools/Jevp/StJevpPlot/JevpPlotSet.h b/OnlTools/Jevp/StJevpPlot/JevpPlotSet.h index b610424b69a..d579a00de77 100644 --- a/OnlTools/Jevp/StJevpPlot/JevpPlotSet.h +++ b/OnlTools/Jevp/StJevpPlot/JevpPlotSet.h @@ -107,7 +107,7 @@ class JevpPlotSet : public TObject { int minEvts; int maxEvts; - void addServerTags(char *tags); + void addServerTags(const char *tags); //char *getServerTags(); RtsTimer_root *processingTimer; @@ -124,8 +124,8 @@ class JevpPlotSet : public TObject { //StTriggerData *getStTriggerData(daqReader *rdr); - void logDbVariable(char *variable_name, double value); - static void staticLogDbVariable(char *name, double value, int my_run, int my_time, char *my_plotsetname, char *my_clientdatadir); + void logDbVariable(const char *variable_name, double value); + static void staticLogDbVariable(const char *name, double value, int my_run, int my_time, const char *my_plotsetname, const char *my_clientdatadir); JevpServer *parent; diff --git a/OnlTools/Jevp/StJevpServer/JevpServer.cxx b/OnlTools/Jevp/StJevpServer/JevpServer.cxx index 72cddad6886..2b413b5c0cd 100644 --- a/OnlTools/Jevp/StJevpServer/JevpServer.cxx +++ b/OnlTools/Jevp/StJevpServer/JevpServer.cxx @@ -141,7 +141,7 @@ static void sigHandler(int arg, siginfo_t *sig, void *v) l4sourceline = l4BuilderSourceLine; } - char *line_builder = ""; + const char *line_builder = ""; int plotSetLine = 0; int plotSetCallParam = 0; int builderLine = 0; @@ -1341,7 +1341,7 @@ void JevpServer::performStartRun() mem /= 1024.0; LOG("JEFF", "Start run #%d (mem: %.1lfMB)",runStatus.run, mem); - char *servername = "JevpServer"; + const char *servername = "JevpServer"; if(isL4) { servername = "L4JevpServer"; } diff --git a/OnlTools/OnlinePlots/Infrastructure/EvpServer.cxx b/OnlTools/OnlinePlots/Infrastructure/EvpServer.cxx index c47ce5c4bea..9f7612fdacc 100755 --- a/OnlTools/OnlinePlots/Infrastructure/EvpServer.cxx +++ b/OnlTools/OnlinePlots/Infrastructure/EvpServer.cxx @@ -464,7 +464,7 @@ void EvpServer::LaunchEndOfRunAction(long run) { } //------------------------------------------ -void EvpServer::SetNewTarget(char *lTarget) { +void EvpServer::SetNewTarget(const char *lTarget) { sprintf(mTarget,"%s",lTarget); if(mDebugLevel) { cout<<"New Target: "<< mTarget<fIniDir = "/a"; + static const char* inidir = "/a"; + fi->fIniDir = const_cast(inidir); fi->fFileTypes = (const char **)filetypes; //At this point target is set @@ -889,7 +890,7 @@ void ServerGui::ShowFileRun(bool run) { ShowLiveRun( !run ); } //-------------------------------------------------- -void ServerGui::ShowStatus(char *lstatus) { +void ServerGui::ShowStatus(const char *lstatus) { mRunStatusName->Clear(); mRunStatusName->AddText(0,lstatus); diff --git a/OnlTools/OnlinePlots/Infrastructure/ServerGui.h b/OnlTools/OnlinePlots/Infrastructure/ServerGui.h index 91920465364..f6e08f43f1c 100755 --- a/OnlTools/OnlinePlots/Infrastructure/ServerGui.h +++ b/OnlTools/OnlinePlots/Infrastructure/ServerGui.h @@ -212,7 +212,7 @@ class ServerGui : public TObject void ShowFileRun(bool run = true); void ShowButton(TGButton* b, Pixel_t color); - void ShowStatus(char *); + void ShowStatus(const char *); void SetEnabled(bool b = true); diff --git a/StRoot/RTS/EventTracker/gl3Histo.cxx b/StRoot/RTS/EventTracker/gl3Histo.cxx index 72a63efdcb1..1e3941fbc5d 100644 --- a/StRoot/RTS/EventTracker/gl3Histo.cxx +++ b/StRoot/RTS/EventTracker/gl3Histo.cxx @@ -15,7 +15,7 @@ //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! // //#################################################################################### -gl3Histo::gl3Histo ( char iId[10], char iTitle[100], +gl3Histo::gl3Histo (const char iId[10], const char iTitle[100], int iNBins, double iXMin, double iXMax ) { info = 0 ; if ( iNBins < 0 ) { diff --git a/StRoot/RTS/EventTracker/gl3Histo.h b/StRoot/RTS/EventTracker/gl3Histo.h index ab53f4d5c40..9f3d26fde33 100644 --- a/StRoot/RTS/EventTracker/gl3Histo.h +++ b/StRoot/RTS/EventTracker/gl3Histo.h @@ -29,7 +29,7 @@ class gl3Histo { double* info ; public: - gl3Histo ( char iId[10]="id", char iTitle[100]="name", + gl3Histo (const char iId[10]="id", const char iTitle[100]="name", int iNBins=100, double iXMin=0., double iXMax=100. ) ; ~gl3Histo ( ) ; int Fill (double x, double weight=1) ; diff --git a/StRoot/RTS/EventTracker/l3CoordinateTransformer.cxx b/StRoot/RTS/EventTracker/l3CoordinateTransformer.cxx index 36626b1d935..7249f95055e 100644 --- a/StRoot/RTS/EventTracker/l3CoordinateTransformer.cxx +++ b/StRoot/RTS/EventTracker/l3CoordinateTransformer.cxx @@ -66,7 +66,7 @@ l3CoordinateTransformer::~l3CoordinateTransformer() #include "mapbin.h" -int l3CoordinateTransformer::LoadTPCLookupTable(char *) +int l3CoordinateTransformer::LoadTPCLookupTable(const char *) { // if (TPCmap) free(TPCmap); // TPCmap = NULL; diff --git a/StRoot/RTS/EventTracker/l3CoordinateTransformer.h b/StRoot/RTS/EventTracker/l3CoordinateTransformer.h index e46eff07b72..ac003313e4d 100644 --- a/StRoot/RTS/EventTracker/l3CoordinateTransformer.h +++ b/StRoot/RTS/EventTracker/l3CoordinateTransformer.h @@ -36,7 +36,7 @@ class l3CoordinateTransformer{ l3CoordinateTransformer() ; // Init parameters and variables virtual ~l3CoordinateTransformer() ; // Delete variables - int LoadTPCLookupTable(char * filename = "/L3/etc/map.bin"); + int LoadTPCLookupTable(const char * filename = "/L3/etc/map.bin"); // Memberfunctions // raw -> global diff --git a/StRoot/RTS/include/fcfClass.hh b/StRoot/RTS/include/fcfClass.hh index a822fcbafb1..553aa3a2996 100755 --- a/StRoot/RTS/include/fcfClass.hh +++ b/StRoot/RTS/include/fcfClass.hh @@ -201,7 +201,7 @@ public: int compare(u_int *p1[3], u_int *p2[3]) ; void decode(u_int *data, fcfHit *h, u_int *sim = 0) ; // utility: from FCF to local - void print_hit(char *, fcfHit *hit) ; // utility + void print_hit(const char *, fcfHit *hit) ; // utility u_int do_swap ; // 0=no, 1=yes => set by "burn" u_int do_merge ; // merge broken rows diff --git a/StRoot/RTS/src/DAQ_BSMD/bsmdPed.cxx b/StRoot/RTS/src/DAQ_BSMD/bsmdPed.cxx index 61b505aefb4..570b46b1fb4 100644 --- a/StRoot/RTS/src/DAQ_BSMD/bsmdPed.cxx +++ b/StRoot/RTS/src/DAQ_BSMD/bsmdPed.cxx @@ -342,7 +342,7 @@ int bsmdPed::to_evb(char *buff) int bsmdPed::from_cache(char *fname) { FILE *f ; - char *fn ; + const char *fn ; init(0x3F) ; // to clear ped storage for all 6 RDOs @@ -395,7 +395,7 @@ int bsmdPed::to_cache(char *fname, u_int run) { FILE *f ; int r, p, t ; - char *fn ; + const char *fn ; if(!valid) { diff --git a/StRoot/RTS/src/DAQ_BTOW/daq_btow.cxx b/StRoot/RTS/src/DAQ_BTOW/daq_btow.cxx index 45720c0fcf1..e2e9a6e5341 100644 --- a/StRoot/RTS/src/DAQ_BTOW/daq_btow.cxx +++ b/StRoot/RTS/src/DAQ_BTOW/daq_btow.cxx @@ -136,10 +136,9 @@ daq_dta *daq_btow::handle_raw() char *from, *st ; int bytes ; char str[256] ; - char *full_name = "?" ; // just a dummy... + const char *full_name = "?" ; // just a dummy... from = 0 ; - full_name = "?" ; assert(caller) ; diff --git a/StRoot/RTS/src/DAQ_EMC/emc_reader.cxx b/StRoot/RTS/src/DAQ_EMC/emc_reader.cxx index 1185e5f6b51..ac30dc354b9 100755 --- a/StRoot/RTS/src/DAQ_EMC/emc_reader.cxx +++ b/StRoot/RTS/src/DAQ_EMC/emc_reader.cxx @@ -62,11 +62,11 @@ static char *inst2char(int inst) static struct emc_describe_t { int id ; - char *p ; - char *secp ; - char *rbp ; - char *adcr ; - char *adcd ; + const char *p ; + const char *secp ; + const char *rbp ; + const char *adcr ; + const char *adcd ; int trg_index ; int type ; // 0 Barrel, 1 Endcap int sub ; // 0 tower, 1 SMD diff --git a/StRoot/RTS/src/DAQ_EMC/emc_single_reader.cxx b/StRoot/RTS/src/DAQ_EMC/emc_single_reader.cxx index 5c204ed90d7..951afeb940d 100644 --- a/StRoot/RTS/src/DAQ_EMC/emc_single_reader.cxx +++ b/StRoot/RTS/src/DAQ_EMC/emc_single_reader.cxx @@ -8,10 +8,10 @@ #include const struct hdrs { - char *emcp ; - char *secp ; - char *rbp ; - char *adc ; + const char *emcp ; + const char *secp ; + const char *rbp ; + const char *adc ; } hdrs[2] = { { CHAR_EMCP, CHAR_EMCSECP, CHAR_EMCRBP, CHAR_EMCADCR }, { CHAR_EECP, CHAR_EECSECP, CHAR_EECRBP, CHAR_EECADCR } diff --git a/StRoot/RTS/src/DAQ_READER/daqReader.cxx b/StRoot/RTS/src/DAQ_READER/daqReader.cxx index b7e9dcdfec0..846dcec8c7a 100644 --- a/StRoot/RTS/src/DAQ_READER/daqReader.cxx +++ b/StRoot/RTS/src/DAQ_READER/daqReader.cxx @@ -82,7 +82,7 @@ daqReader::daqReader(char *mem, int size) } -daqReader::daqReader(char *name) +daqReader::daqReader(const char *name) { struct stat64 stat_buf ; @@ -1141,7 +1141,7 @@ char *daqReader::skip_then_get(int numToSkip, int num, int type) } - char *daqReader::getInputType() + const char *daqReader::getInputType() { switch(input_type) { case none: @@ -1665,7 +1665,7 @@ int daqReader::fillSummaryInfo_v02(SummaryInfo *info, gbPayload_0x02 *pay) { /////// Tonko - char *daqReader::get_sfs_name(char *right) + char *daqReader::get_sfs_name(const char *right) { if(sfs == 0) return 0 ; @@ -2024,7 +2024,7 @@ int daqReader::fillSummaryInfo_v02(SummaryInfo *info, gbPayload_0x02 *pay) { msg.head.status = 0 ; msg.ld.dword[0] = htonl(getpid()) ; - char *user ; + const char *user ; struct passwd *passwd = getpwuid(getuid()) ; if(passwd == NULL) { diff --git a/StRoot/RTS/src/DAQ_READER/daqReader.h b/StRoot/RTS/src/DAQ_READER/daqReader.h index 6b8c724d912..fb91efd2ce5 100644 --- a/StRoot/RTS/src/DAQ_READER/daqReader.h +++ b/StRoot/RTS/src/DAQ_READER/daqReader.h @@ -94,7 +94,7 @@ class daqReader { // space separated files --> read from each file in turn // daqReader(char *buffer, int size); - daqReader(char *fname) ; + daqReader(const char *fname) ; ~daqReader(void) ; void init(); @@ -111,7 +111,7 @@ class daqReader { void insert(daq_det *which, int rts_id) ; void de_insert(int rts_id) ; void Make() ; - char *get_sfs_name(char *snippet=0) ; // returns the full name of the SFS + char *get_sfs_name(const char *snippet=0) ; // returns the full name of the SFS char *get(int which, int type=EVP_TYPE_ANY) ; char *skip_then_get(int numToSkip, int num, int type=EVP_TYPE_ANY); // The following are the descriptors and pointers defining the event @@ -246,7 +246,7 @@ class daqReader { u_int L3summary[4]; int fixDatapSummary(DATAP *datap); - char *getInputType(); + const char *getInputType(); int getNextEventFilename(int num, int type); int getNextEventFilenameFromLive(int type); int getNextEventFilenameFromDir(int eventNum); diff --git a/StRoot/RTS/src/DAQ_READER/daq_det.cxx b/StRoot/RTS/src/DAQ_READER/daq_det.cxx index aeab79d64e4..78ff0a94ac9 100644 --- a/StRoot/RTS/src/DAQ_READER/daq_det.cxx +++ b/StRoot/RTS/src/DAQ_READER/daq_det.cxx @@ -313,7 +313,7 @@ daq_dta *daq_det::put(const char *bank,int c1, int c2, int c3, void *p1, void * // helpers -int checkBank(char *in, char *expect) +int checkBank(char *in, const char *expect) { char buff[12] ; diff --git a/StRoot/RTS/src/DAQ_READER/daq_det.h b/StRoot/RTS/src/DAQ_READER/daq_det.h index a26db05f326..6e75f844ab6 100644 --- a/StRoot/RTS/src/DAQ_READER/daq_det.h +++ b/StRoot/RTS/src/DAQ_READER/daq_det.h @@ -33,7 +33,7 @@ class daqReader ; class daq_det ; // helpers -extern int checkBank(char *in, char *expect) ; +extern int checkBank(char *in, const char *expect) ; extern int *legacyDetp(int rts_id, char *datap) ; diff --git a/StRoot/RTS/src/DAQ_TPX/tpxGain.cxx b/StRoot/RTS/src/DAQ_TPX/tpxGain.cxx index 504d62785f6..5923f6244e4 100644 --- a/StRoot/RTS/src/DAQ_TPX/tpxGain.cxx +++ b/StRoot/RTS/src/DAQ_TPX/tpxGain.cxx @@ -842,7 +842,7 @@ void tpxGain::do_default(int sec) return ; } -int tpxGain::from_file(char *fname, int sec) +int tpxGain::from_file(const char *fname, int sec) { FILE *f ; int s, r, p ; diff --git a/StRoot/RTS/src/DAQ_TPX/tpxGain.h b/StRoot/RTS/src/DAQ_TPX/tpxGain.h index 1e45e83537e..79d0734942c 100644 --- a/StRoot/RTS/src/DAQ_TPX/tpxGain.h +++ b/StRoot/RTS/src/DAQ_TPX/tpxGain.h @@ -152,7 +152,7 @@ class tpxGain return (gains[s-1] + r*TPX_MAX_PAD + (p-1)) ; } - int from_file(char *fname, int sector = 0) ; + int from_file(const char *fname, int sector = 0) ; // [sector 1-24][RDO 1-6][fee-index 0-35] diff --git a/StRoot/RTS/src/FCF/fcfAfterburner.cxx b/StRoot/RTS/src/FCF/fcfAfterburner.cxx index 0da34df7ca3..fb9041d8e30 100755 --- a/StRoot/RTS/src/FCF/fcfAfterburner.cxx +++ b/StRoot/RTS/src/FCF/fcfAfterburner.cxx @@ -46,7 +46,7 @@ fcfAfterburner::fcfAfterburner() If "str" is non-NULL it prepends it to the line as a label. */ -void fcfAfterburner::print_hit(char *str, struct fcfHit *h) +void fcfAfterburner::print_hit(const char *str, struct fcfHit *h) { if(str) { fprintf(stdout,"%s: ",str) ; diff --git a/StRoot/RTS/src/FCF/fcfClass.cxx b/StRoot/RTS/src/FCF/fcfClass.cxx index f78509bff87..2603c0e27e4 100755 --- a/StRoot/RTS/src/FCF/fcfClass.cxx +++ b/StRoot/RTS/src/FCF/fcfClass.cxx @@ -42,7 +42,7 @@ #include #include -static char *fcf_cvs_revision = "$Revision: 1.5 $" ; +static const char *fcf_cvs_revision = "$Revision: 1.5 $" ; #ifdef __ROOT__ // STAR Offline diff --git a/StRoot/RTS/src/RTS_EXAMPLE/rts_example.trg.C b/StRoot/RTS/src/RTS_EXAMPLE/rts_example.trg.C index 89f745fc598..a6ca863ede0 100644 --- a/StRoot/RTS/src/RTS_EXAMPLE/rts_example.trg.C +++ b/StRoot/RTS/src/RTS_EXAMPLE/rts_example.trg.C @@ -1115,7 +1115,7 @@ static int fgt_doer(daqReader *rdr, const char *do_print, int which) char s_found[128] ; daq_dta *dd ; - char *d_name = 0 ; + const char *d_name = 0 ; switch(which) { diff --git a/StRoot/RTS/src/RTS_EXAMPLE/tpx_read_gains.C b/StRoot/RTS/src/RTS_EXAMPLE/tpx_read_gains.C index 097489e2714..34a17465d28 100644 --- a/StRoot/RTS/src/RTS_EXAMPLE/tpx_read_gains.C +++ b/StRoot/RTS/src/RTS_EXAMPLE/tpx_read_gains.C @@ -5,7 +5,7 @@ int main(int argc, char *argv[]) { - char *fname = "/RTS/conf/tpx/tpx_gains.txt" ; // default + const char *fname = "/RTS/conf/tpx/tpx_gains.txt" ; // default int ret ; if(argc==2) { // override default if provided diff --git a/StRoot/RTS/src/SFS/fs_index.cxx b/StRoot/RTS/src/SFS/fs_index.cxx index 53b88e6cd54..ae9856fa89a 100644 --- a/StRoot/RTS/src/SFS/fs_index.cxx +++ b/StRoot/RTS/src/SFS/fs_index.cxx @@ -356,7 +356,7 @@ int fs_index::initmount() return 0; } -void fs_index::getFullPath(char *fullpath, char *name) +void fs_index::getFullPath(char *fullpath, const char *name) { if(name[0] == '/') { strcpy(fullpath,name); @@ -436,7 +436,7 @@ void fs_index::umount() index_created = 0; } -fs_dirent *fs_index::readdirent(char *dir, fs_dirent *ent) +fs_dirent *fs_index::readdirent(const char *dir, fs_dirent *ent) { if(ent == NULL) { ent = &_readdirent_static_; @@ -473,7 +473,7 @@ fs_dirent *fs_index::readdirent(char *dir, fs_dirent *ent) } -fs_dir *fs_index::opendir(char *dir) +fs_dir *fs_index::opendir(const char *dir) { if(!index_created) return NULL; @@ -582,7 +582,7 @@ fs_inode *fs_index::alloc_inode(const char *name, long long int off, int sz, int return n; } -int fs_index::fileSize(char *fn) +int fs_index::fileSize(const char *fn) { if(!index_created) return -1; @@ -595,7 +595,7 @@ int fs_index::fileSize(char *fn) return entry->sz; } -int fs_index::read(char *fn, char *buff, int maxsize) +int fs_index::read(const char *fn, char *buff, int maxsize) { if(!index_created) return -1; diff --git a/StRoot/RTS/src/SFS/fs_index.h b/StRoot/RTS/src/SFS/fs_index.h index 40da1212ea4..0dc88b74e76 100644 --- a/StRoot/RTS/src/SFS/fs_index.h +++ b/StRoot/RTS/src/SFS/fs_index.h @@ -131,30 +131,30 @@ class fs_index { char *pwd() { return cwd; }; // directory functions - fs_dir *opendir(char *dir); + fs_dir *opendir(const char *dir); void closedir(fs_dir *dir); fs_dirent *readdir(fs_dir *dir, fs_dirent *storage=NULL); - fs_dirent *readdirent(char *name, fs_dirent *storage=NULL); + fs_dirent *readdirent(const char *name, fs_dirent *storage=NULL); // meant for users that have memory mapped/memory sfs indexes // and want to use the buffers in place to avoid memcpy // access the data through the dirent's offset / size // - inline fs_dirent *opendirent(char *name) { return readdirent(name); }; + inline fs_dirent *opendirent(const char *name) { return readdirent(name); }; int mem_ls(fs_filelist *filelist, int recurse, fs_dir *dir); // File operations - int read(char *fn, char *buff, int sz); + int read(const char *fn, char *buff, int sz); virtual int write(char *fn, char *buff, int sz) { return -1; }; virtual int getwritevsz(fs_iovec *fsiovec, int n) { return 0; }; virtual int writev(fs_iovec *iovec, int n) { return -1; }; virtual int writev_sticky(fs_iovec *iovec, int n, int *sticky) { return -1; }; - int fileSize(char *fn); + int fileSize(const char *fn); int n_inodes; - void getFullPath(char *fullname, char *name); + void getFullPath(char *fullname, const char *name); virtual void dump(int fd)=0; wrapfile wfile; diff --git a/StRoot/StDaqLib/EMC/EMC_Reader.hh b/StRoot/StDaqLib/EMC/EMC_Reader.hh index 6755cf2c8dc..e0da6ce774b 100644 --- a/StRoot/StDaqLib/EMC/EMC_Reader.hh +++ b/StRoot/StDaqLib/EMC/EMC_Reader.hh @@ -59,7 +59,7 @@ Structure that defines Tower data format after decodification. */ struct BTOWERDATA { - char * BankType; ///< Will be filled with a 9 char array (8 letters + NULL) + const char * BankType; ///< Will be filled with a 9 char array (8 letters + NULL) unsigned int DetFlag; ///< DAQ Detector flag for BEMC, PRS, SMDE or SMDP unsigned int EventNumber; ///< Token number unsigned int PedFlag; ///< Pedestal subtracted or not (??) @@ -106,7 +106,7 @@ Structure that defines SMD data format after decodification */ struct BSMDDATA { - char *BankType; ///< Will be filled with a 9 char array (8 letters + NULL) + const char *BankType; ///< Will be filled with a 9 char array (8 letters + NULL) unsigned int DetFlag; ///< Daq detector flag unsigned int EventNumber; ///< Token number unsigned int PedFlag; ///< Pedestal subtracted or not (??) diff --git a/StRoot/StDaqLib/EVP/emcReader.cxx b/StRoot/StDaqLib/EVP/emcReader.cxx index 6ea7f973219..443841db534 100755 --- a/StRoot/StDaqLib/EVP/emcReader.cxx +++ b/StRoot/StDaqLib/EVP/emcReader.cxx @@ -99,7 +99,7 @@ int emc_t::check() return 0; } //________________________________________________________________________________ -static char *id2char(int id) +static const char *id2char(int id) { switch(id) { case BTOW_ID : @@ -111,7 +111,7 @@ static char *id2char(int id) } } -static char *inst2char(int inst) +static const char *inst2char(int inst) { switch(inst) { case 1 : @@ -144,7 +144,7 @@ int OLDEVP::DAQemcReader(char *m) struct EMCSECP *emcsecp ; struct EMCRBP *emcrbp ; struct DUMMYDATA *emcadcr, *emcadcd ; - char *p, *secp, *rbp, *adcr, *adcd ; + const char *p, *secp, *rbp, *adcr, *adcd ; u_int local_token, token ; int len, off ; diff --git a/StRoot/StDaqLib/EVP/evpSupport.cxx b/StRoot/StDaqLib/EVP/evpSupport.cxx index b45799dad52..29df17535df 100644 --- a/StRoot/StDaqLib/EVP/evpSupport.cxx +++ b/StRoot/StDaqLib/EVP/evpSupport.cxx @@ -1,6 +1,6 @@ #include "evpSupport.h" -int OLDEVP::checkBank(char *m, char *what) +int OLDEVP::checkBank(char *m, const char *what) { int i; if (m[0]!=what[0]) return -1; diff --git a/StRoot/StDaqLib/EVP/evpSupport.h b/StRoot/StDaqLib/EVP/evpSupport.h index a195a56caa9..49d6ee9d043 100755 --- a/StRoot/StDaqLib/EVP/evpSupport.h +++ b/StRoot/StDaqLib/EVP/evpSupport.h @@ -8,7 +8,7 @@ #define EVP_NO_DATA (-1) #define EVP_DATA_ERR (-2) namespace OLDEVP { -extern int checkBank(char *m, char *what) ; +extern int checkBank(char *m, const char *what) ; // UGLY UGLY hack extern u_int evp_daqbits ; diff --git a/StRoot/StDaqLib/EVP/rtsSystems.h b/StRoot/StDaqLib/EVP/rtsSystems.h index 66825661931..3fcb82963bc 100755 --- a/StRoot/StDaqLib/EVP/rtsSystems.h +++ b/StRoot/StDaqLib/EVP/rtsSystems.h @@ -476,7 +476,7 @@ so we keep it here for source compatibility #define HFT_NODES(x) ((EXT2_SYSTEM<<12) | ((HFT_SYSTEM)<<7) | (x)) -extern inline char *rts2name(int rts_id) +extern inline const char *rts2name(int rts_id) { switch(rts_id) { case TPC_SYSTEM : diff --git a/StRoot/StDaqLib/GENERIC/EventReader.cxx b/StRoot/StDaqLib/GENERIC/EventReader.cxx index 33a78f062d2..95f1b2761a4 100644 --- a/StRoot/StDaqLib/GENERIC/EventReader.cxx +++ b/StRoot/StDaqLib/GENERIC/EventReader.cxx @@ -856,7 +856,7 @@ void EventReader::setVerbose(int v) verbose = v; } -char * EventReader::findBank(char *bankid) +char * EventReader::findBank(const char *bankid) { // Fix up DATAP Bank_DATAP *pBankDATAP = (Bank_DATAP *)getDATAP(); @@ -921,7 +921,7 @@ char * EventReader::findBank(char *bankid) } -void EventReader::fprintError(int err, char *file, int line, char *userstring) +void EventReader::fprintError(int err, const char *file, int line, const char *userstring) { if (logfd==NULL) return; //no file designated if (err<0 || err>MX_MESSAGE) return; //protect against bad error code diff --git a/StRoot/StDaqLib/GENERIC/EventReader.hh b/StRoot/StDaqLib/GENERIC/EventReader.hh index f91478508f4..e0572ec0060 100644 --- a/StRoot/StDaqLib/GENERIC/EventReader.hh +++ b/StRoot/StDaqLib/GENERIC/EventReader.hh @@ -465,7 +465,7 @@ public: long NextEventOffset(); void setVerbose(int); // 0 turns off all internal printout - char * findBank(char *bankid); // navigates to pointer bnk below DATAP + char * findBank(const char *bankid); // navigates to pointer bnk below DATAP int verbose; ~EventReader(); @@ -477,7 +477,7 @@ public: int system_present(Bank_DATAP *datap, int sys); void printEventInfo(FILE *fd=stdout); - void fprintError(int err, char *file, int line, char *userstring); + void fprintError(int err, const char *file, int line, const char *userstring); int runno() { return runnum; } int errorNo() { return errnum; }; diff --git a/StRoot/StDaqLib/RICH/RichEventReader.cxx b/StRoot/StDaqLib/RICH/RichEventReader.cxx index 445b9a8026a..eff113fc652 100644 --- a/StRoot/StDaqLib/RICH/RichEventReader.cxx +++ b/StRoot/StDaqLib/RICH/RichEventReader.cxx @@ -420,7 +420,7 @@ void RichEventReader::setVerbose(int v) verbose = v; } -char * RichEventReader::findBank(char *bankid) +char * RichEventReader::findBank(const char *bankid) { // Fix up DATAP Bank_RICP *pBankDATAP = (Bank_RICP *)this->getDATAP(); diff --git a/StRoot/StDaqLib/RICH/RichEventReader.hh b/StRoot/StDaqLib/RICH/RichEventReader.hh index 07236b7a52e..3dfe8c9f954 100644 --- a/StRoot/StDaqLib/RICH/RichEventReader.hh +++ b/StRoot/StDaqLib/RICH/RichEventReader.hh @@ -123,7 +123,7 @@ public: long NextEventOffset(); void setVerbose(int); // 0 turns off all internal printout - char * findBank(char *bankid); // navigates to pointer bnk below DATAP + char * findBank(const char *bankid); // navigates to pointer bnk below DATAP int verbose; ~RichEventReader(); diff --git a/StRoot/StFgtPool/StFgtAlignmentMaker/StFgtAlignmentMaker.h b/StRoot/StFgtPool/StFgtAlignmentMaker/StFgtAlignmentMaker.h index 3e4868637f6..3f5bbea19f3 100644 --- a/StRoot/StFgtPool/StFgtAlignmentMaker/StFgtAlignmentMaker.h +++ b/StRoot/StFgtPool/StFgtAlignmentMaker/StFgtAlignmentMaker.h @@ -86,7 +86,7 @@ class StFgtAlignmentMaker : public StMaker { // 6=AVTrack and MuDST (vertex, eemc hits) : FGT+vetex+EEMC tracking (no TPC hits in MUDST) inline void setWriteTree(int v=1) {mOutTreeFile=v;} - inline void setReadTree(char* v="alignment.root") {mInTreeFile=v;} + inline void setReadTree(const char* v="alignment.root") {mInTreeFile=v;} //Set resolution for each detector to normalize residuals (also used for fake data gaussian sigma) inline void setError(Float_t fgt, Float_t vtx, Float_t vtxz, Float_t tpci, Float_t tpco, Float_t tpcz, Float_t ppt, Float_t emc) { @@ -97,7 +97,7 @@ class StFgtAlignmentMaker : public StMaker { mFakeNtrk=n; mFakeEmin=emin; mFakeEmax=emax; mFakeEtamin=etamin; mFakeEtamax=etamax; mFakePhimin=phimin; mFakePhimax=phimax; mFakeVtxSig=vsig; } inline void setRunNumber(Int_t v, Int_t s=0, Int_t d=0) {mRunNumber=v; mSeqNumber=s; mDay=d;} - inline void setReadParFile(char* v="alignment.dat") {mReadParFile=v;} + inline void setReadParFile(const char* v="alignment.dat") {mReadParFile=v;} void setStep(int discmask,int quadmask, int parmask, int hitmask_disc, int residmask, int trackType, int minHit, int minFgtHit, int minVtx, int minTpcHit, int minPromptHit, int minEemcHit, @@ -148,8 +148,8 @@ class StFgtAlignmentMaker : public StMaker { Float_t mFakeEmin, mFakeEmax, mFakeEtamin, mFakeEtamax, mFakePhimin, mFakePhimax, mFakeVtxSig; //fake track kinematics Int_t mDataSource; //! 0=reading from StEvent(primary) 1=StEvent Global, 2=AVTrack 3=Reading from TTree(alignment.root) 4=Fake Int_t mOutTreeFile; //! output Tree file - Char_t* mInTreeFile; //! input Tree file name - Char_t* mReadParFile; //! input parameter file instead of DB + const Char_t* mInTreeFile; //! input Tree file name + const Char_t* mReadParFile; //! input parameter file instead of DB Int_t mRunNumber; //! Run# for output file name Int_t mSeqNumber; //! Seq# for output file name Int_t mDay; //! Dat# for output file name diff --git a/StRoot/StFlowMaker/StFlowEvent.cxx b/StRoot/StFlowMaker/StFlowEvent.cxx index 1cbf3ad46f9..648b0705aec 100644 --- a/StRoot/StFlowMaker/StFlowEvent.cxx +++ b/StRoot/StFlowMaker/StFlowEvent.cxx @@ -376,7 +376,7 @@ TVector2 StFlowEvent::Q(StFlowSelection* pFlowSelect) { //------------------------------------------------------------- -TVector2 StFlowEvent::ReCentPar(StFlowSelection* pFlowSelect, char* TPC) { +TVector2 StFlowEvent::ReCentPar(StFlowSelection* pFlowSelect, const char* TPC) { // For LYZ // Calculate weighted recentering vector per particle for each TPC // TPC can be "TPC", "TPCE", or "TPCW" @@ -417,7 +417,7 @@ TVector2 StFlowEvent::ReCentPar(StFlowSelection* pFlowSelect, char* TPC) { //------------------------------------------------------------- -TVector2 StFlowEvent::ReCentEPPar(StFlowSelection* pFlowSelect, char* TPC) { +TVector2 StFlowEvent::ReCentEPPar(StFlowSelection* pFlowSelect, const char* TPC) { // For ana // Calculate the recentering vector per particle for each TPC // TPC can be "TPCE", "TPCW", "FTPCE", or "FTPCW" diff --git a/StRoot/StFlowMaker/StFlowEvent.h b/StRoot/StFlowMaker/StFlowEvent.h index 56b13f0c3b4..e88d2011a92 100644 --- a/StRoot/StFlowMaker/StFlowEvent.h +++ b/StRoot/StFlowMaker/StFlowEvent.h @@ -56,8 +56,8 @@ class StFlowEvent : public StObject { TVector2 Q(StFlowSelection*); TVector2 NormQ(StFlowSelection* pFlowSelect); TVector2 QPart(StFlowSelection*); - TVector2 ReCentEPPar(StFlowSelection*, char*); // for ana - TVector2 ReCentPar(StFlowSelection*, char*); // for LYZ + TVector2 ReCentEPPar(StFlowSelection*, const char*); // for ana + TVector2 ReCentPar(StFlowSelection*, const char*); // for LYZ TVector2 ReCent(Int_t selN, Int_t harN, StFlowTrack* pFlowTrack) const; TVector2 ReCentEP(Int_t selN, Int_t harN, StFlowTrack* pFlowTrack) const; Float_t q(StFlowSelection*); diff --git a/StRoot/StHbtMaker/CorrFctn/MinvCorrFctnM_vs_Phi.cxx b/StRoot/StHbtMaker/CorrFctn/MinvCorrFctnM_vs_Phi.cxx index aff6803b890..22f595c37fb 100644 --- a/StRoot/StHbtMaker/CorrFctn/MinvCorrFctnM_vs_Phi.cxx +++ b/StRoot/StHbtMaker/CorrFctn/MinvCorrFctnM_vs_Phi.cxx @@ -32,15 +32,15 @@ MinvCorrFctnM_vs_Phi::MinvCorrFctnM_vs_Phi(char* title, const int& nbins2, const float& MinvLo2, const float& MinvHi2){ // set up numerator char theTitle[100]; - char* TitNum = "MinvCorrFctnM_vs_Phi_Num"; + const char* TitNum = "MinvCorrFctnM_vs_Phi_Num"; sprintf(theTitle,"Num %s",title); mNumerator = new StHbt2DHisto(TitNum,theTitle,nbins1,MinvLo1,MinvHi1,nbins2,MinvLo2,MinvHi2); // set up denominator - char* TitDen = "MinvCorrFctnM_vs_Phi_Den"; + const char* TitDen = "MinvCorrFctnM_vs_Phi_Den"; sprintf(theTitle,"Den %s",title); mDenominator = new StHbt2DHisto(TitDen,theTitle,nbins1,MinvLo1,MinvHi1,nbins2,MinvLo2,MinvHi2); // set up difference - char* TitDif = "MinvCorrFctnM_vs_Phi_Dif"; + const char* TitDif = "MinvCorrFctnM_vs_Phi_Dif"; sprintf(theTitle,"Dif %s",title); mDifference = new StHbt2DHisto(TitDif,theTitle,nbins1,MinvLo1,MinvHi1,nbins2,MinvLo2,MinvHi2); // this next bit is unfortunately needed so that we can have many histos of same "title" diff --git a/StRoot/StHbtMaker/CorrFctn/MinvCorrFctnM_vs_Pt.cxx b/StRoot/StHbtMaker/CorrFctn/MinvCorrFctnM_vs_Pt.cxx index 4c39006043f..1d7ebfd3da2 100644 --- a/StRoot/StHbtMaker/CorrFctn/MinvCorrFctnM_vs_Pt.cxx +++ b/StRoot/StHbtMaker/CorrFctn/MinvCorrFctnM_vs_Pt.cxx @@ -37,15 +37,15 @@ MinvCorrFctnM_vs_Pt::MinvCorrFctnM_vs_Pt(char* title, const int& nbins2, const float& MinvLo2, const float& MinvHi2){ // set up numerator char theTitle[100]; - char* TitNum = "MinvCorrFctnM_vs_Pt_Num"; + const char* TitNum = "MinvCorrFctnM_vs_Pt_Num"; sprintf(theTitle,"Num %s",title); mNumerator = new StHbt2DHisto(TitNum,theTitle,nbins1,MinvLo1,MinvHi1,nbins2,MinvLo2,MinvHi2); // set up denominator - char* TitDen = "MinvCorrFctnM_vs_Pt_Den"; + const char* TitDen = "MinvCorrFctnM_vs_Pt_Den"; sprintf(theTitle,"Den %s",title); mDenominator = new StHbt2DHisto(TitDen,theTitle,nbins1,MinvLo1,MinvHi1,nbins2,MinvLo2,MinvHi2); // set up difference - char* TitDif = "MinvCorrFctnM_vs_Pt_Dif"; + const char* TitDif = "MinvCorrFctnM_vs_Pt_Dif"; sprintf(theTitle,"Dif %s",title); mDifference = new StHbt2DHisto(TitDif,theTitle,nbins1,MinvLo1,MinvHi1,nbins2,MinvLo2,MinvHi2); // this next bit is unfortunately needed so that we can have many histos of same "title" diff --git a/StRoot/StHbtMaker/CorrFctn/MinvCorrFctnY_vs_Pt.cxx b/StRoot/StHbtMaker/CorrFctn/MinvCorrFctnY_vs_Pt.cxx index 990a0f5b5d8..ee2226c9a44 100644 --- a/StRoot/StHbtMaker/CorrFctn/MinvCorrFctnY_vs_Pt.cxx +++ b/StRoot/StHbtMaker/CorrFctn/MinvCorrFctnY_vs_Pt.cxx @@ -40,15 +40,15 @@ MinvCorrFctnY_vs_Pt::MinvCorrFctnY_vs_Pt(char* title, const int& nbins2, const float& MinvLo2, const float& MinvHi2){ char theTitle[100]; // set up numerator - char* TitNum = "MinvCorrFctnY_vs_Pt_Num"; + const char* TitNum = "MinvCorrFctnY_vs_Pt_Num"; sprintf(theTitle,"Num %s",title); mNumerator = new StHbt2DHisto(TitNum,theTitle,nbins1,MinvLo1,MinvHi1,nbins2,MinvLo2,MinvHi2); // set up denominator - char* TitDen = "MinvCorrFctnY_vs_Pt_Den"; + const char* TitDen = "MinvCorrFctnY_vs_Pt_Den"; sprintf(theTitle,"Den %s",title); mDenominator = new StHbt2DHisto(TitDen,theTitle,nbins1,MinvLo1,MinvHi1,nbins2,MinvLo2,MinvHi2); // set up difference - char* TitDif = "MinvCorrFctnY_vs_Pt_Dif"; + const char* TitDif = "MinvCorrFctnY_vs_Pt_Dif"; sprintf(theTitle,"Dif %s",title); mDifference = new StHbt2DHisto(TitDif,theTitle,nbins1,MinvLo1,MinvHi1,nbins2,MinvLo2,MinvHi2); // this next bit is unfortunately needed so that we can have many histos of same "title" diff --git a/StRoot/StHbtMaker/Cut/helensLaPV0Cut.h b/StRoot/StHbtMaker/Cut/helensLaPV0Cut.h index 9a9ddc2f801..645a0400cef 100644 --- a/StRoot/StHbtMaker/Cut/helensLaPV0Cut.h +++ b/StRoot/StHbtMaker/Cut/helensLaPV0Cut.h @@ -109,7 +109,7 @@ class helensLaPV0Cut : public StHbtV0Cut { long mNV0sPassed; long mNV0sFailed; - char* V0Type; // String selecting v0 (la,antil,k0) + const char* V0Type; // String selecting v0 (la,antil,k0) #ifdef __ROOT__ ClassDef(helensLaPV0Cut, 1) diff --git a/StRoot/StHbtMaker/Cut/helensV0Cut.h b/StRoot/StHbtMaker/Cut/helensV0Cut.h index e836e60905d..a9905761ae4 100644 --- a/StRoot/StHbtMaker/Cut/helensV0Cut.h +++ b/StRoot/StHbtMaker/Cut/helensV0Cut.h @@ -109,7 +109,7 @@ class helensV0Cut : public StHbtV0Cut { long mNV0sPassed; long mNV0sFailed; - char* V0Type; // String selecting v0 (la,antil,k0) + const char* V0Type; // String selecting v0 (la,antil,k0) #ifdef __ROOT__ ClassDef(helensV0Cut, 1) diff --git a/StRoot/StHighptPool/StHiMicroAnalysis/StBadDcaAnalysis.cxx b/StRoot/StHighptPool/StHiMicroAnalysis/StBadDcaAnalysis.cxx index cc908f851eb..2d079a3aca9 100644 --- a/StRoot/StHighptPool/StHiMicroAnalysis/StBadDcaAnalysis.cxx +++ b/StRoot/StHighptPool/StHiMicroAnalysis/StBadDcaAnalysis.cxx @@ -71,7 +71,7 @@ StBadDcaAnalysis::initHistograms() char name[500]; - char* cPM[2] = {"Plus","Minus"}; + const char* cPM[2] = {"Plus","Minus"}; for(int ipm=0; ipm<2; ipm++){ diff --git a/StRoot/StHighptPool/StHiMicroAnalysis/StDcaAnalysis.cxx b/StRoot/StHighptPool/StHiMicroAnalysis/StDcaAnalysis.cxx index 2906387bb87..ec7fccb032f 100644 --- a/StRoot/StHighptPool/StHiMicroAnalysis/StDcaAnalysis.cxx +++ b/StRoot/StHighptPool/StHiMicroAnalysis/StDcaAnalysis.cxx @@ -74,7 +74,7 @@ StDcaAnalysis::initHistograms() */ // int netabin=6; double etamin=-.5,etamax=.5; - char* type[] = {"Mean","Rms","Num" }; + const char* type[] = {"Mean","Rms","Num" }; for(int i=0; i<3; i++){ // global pt diff --git a/StRoot/StPeCMaker/StPeCLumiMaker.cxx b/StRoot/StPeCMaker/StPeCLumiMaker.cxx index 138fad6283c..cb00a1c5109 100644 --- a/StRoot/StPeCMaker/StPeCLumiMaker.cxx +++ b/StRoot/StPeCMaker/StPeCLumiMaker.cxx @@ -91,7 +91,7 @@ Int_t StPeCLumiMaker::InitRun(Int_t runnr) { StIOMaker* pIOMaker = (StIOMaker*)GetMaker("IO"); if ( pIOMaker) { uDstFileName = pIOMaker->GetFile() ; - char* ccc = "/" ; + const char* ccc = "/" ; Ssiz_t slashPosition = uDstFileName.Last(*ccc) ; if ( slashPosition != -1 && slashPosition < uDstFileName.Length() ) diff --git a/StRoot/StPeCMaker/StPeCMaker.cxx b/StRoot/StPeCMaker/StPeCMaker.cxx index 382bf52747a..f337c976f70 100644 --- a/StRoot/StPeCMaker/StPeCMaker.cxx +++ b/StRoot/StPeCMaker/StPeCMaker.cxx @@ -264,7 +264,7 @@ Int_t StPeCMaker::InitRun(Int_t runnr) { if (pIOMaker) { treeFileName = pIOMaker->GetFile(); - char* ccc = "/"; + const char* ccc = "/"; Ssiz_t slashPosition = treeFileName.Last(*ccc); if (slashPosition != -1 && slashPosition < treeFileName.Length()) diff --git a/StRoot/StPxlSimMaker/DIGMAPS/diginitialize.cxx b/StRoot/StPxlSimMaker/DIGMAPS/diginitialize.cxx index 6f3ac4c1d0b..540a28ad0d3 100644 --- a/StRoot/StPxlSimMaker/DIGMAPS/diginitialize.cxx +++ b/StRoot/StPxlSimMaker/DIGMAPS/diginitialize.cxx @@ -46,7 +46,7 @@ DIGInitialize::DIGInitialize() //______________________________________________________________________________ // -DIGInitialize::DIGInitialize(char *name, char *title, TString aCP, TString aCFN, TString action) : TNamed(name,title) +DIGInitialize::DIGInitialize(const char *name, const char *title, TString aCP, TString aCFN, TString action) : TNamed(name,title) { // --- open config file: diff --git a/StRoot/StPxlSimMaker/DIGMAPS/diginitialize.h b/StRoot/StPxlSimMaker/DIGMAPS/diginitialize.h index 38bf0098235..b0707f3d820 100644 --- a/StRoot/StPxlSimMaker/DIGMAPS/diginitialize.h +++ b/StRoot/StPxlSimMaker/DIGMAPS/diginitialize.h @@ -35,7 +35,7 @@ class DIGMAPS; class DIGInitialize : public TNamed { public: DIGInitialize(); - DIGInitialize(char *name,char *title, TString aCP, TString aCFN, TString action); + DIGInitialize(const char *name, const char *title, TString aCP, TString aCFN, TString action); virtual ~DIGInitialize(); void SetConfigPath(TString aCP) ; void SetConfigFileName(TString aCFN) ; diff --git a/StRoot/StSpectraPool/StRareMaker/StRareMaker.cxx b/StRoot/StSpectraPool/StRareMaker/StRareMaker.cxx index cc607a59995..0233b24633b 100644 --- a/StRoot/StSpectraPool/StRareMaker/StRareMaker.cxx +++ b/StRoot/StSpectraPool/StRareMaker/StRareMaker.cxx @@ -59,7 +59,7 @@ double dEdx_formula(double momentum, double mass); ClassImp(StRareMaker) -StRareMaker::StRareMaker(const Char_t *name, Char_t* fileName) : StMaker(name) { +StRareMaker::StRareMaker(const Char_t *name, const Char_t* fileName) : StMaker(name) { mRareEvent = new StRareEvent(); out = new TFile(fileName, "RECREATE"); out->SetCompressionLevel(2); @@ -73,7 +73,7 @@ StRareMaker::StRareMaker(const Char_t *name, Char_t* fileName) : StMaker(name) { mL3TrackCut = new StAcceptAllL3Tracks(); } -StRareMaker::StRareMaker(const Char_t *name, Char_t* fileName, +StRareMaker::StRareMaker(const Char_t *name, const Char_t* fileName, StRareEventCut* cut, StRareTrackCut* track) : StMaker(name) { out = new TFile(fileName, "RECREATE"); out->SetCompressionLevel(2); @@ -87,7 +87,7 @@ StRareMaker::StRareMaker(const Char_t *name, Char_t* fileName, mL3TrackCut = 0; } -StRareMaker::StRareMaker(const Char_t *name, Char_t* fileName, +StRareMaker::StRareMaker(const Char_t *name, const Char_t* fileName, StRareEventCut* cut, StRareTrackCut* trackCut, StL3RareTrackCut* l3trackCut) : StMaker(name) { diff --git a/StRoot/StSpectraPool/StRareMaker/StRareMaker.h b/StRoot/StSpectraPool/StRareMaker/StRareMaker.h index 03dc2f916fc..39dab7e2daa 100644 --- a/StRoot/StSpectraPool/StRareMaker/StRareMaker.h +++ b/StRoot/StSpectraPool/StRareMaker/StRareMaker.h @@ -52,10 +52,10 @@ class StRareMaker : public StMaker { public: - StRareMaker(const Char_t *name="RareParticles", Char_t* fileName="RareEvent.root"); - StRareMaker(const Char_t *name, Char_t* fileName, StRareEventCut* cut, StRareTrackCut* track); + StRareMaker(const Char_t *name="RareParticles", const Char_t* fileName="RareEvent.root"); + StRareMaker(const Char_t *name, const Char_t* fileName, StRareEventCut* cut, StRareTrackCut* track); StRareMaker(const Char_t *name, - Char_t* fileName, + const Char_t* fileName, StRareEventCut* cut, StRareTrackCut* trackCut, StL3RareTrackCut* l3trackCut); diff --git a/StRoot/StSpectraPool/StRareMaker/StReadRare.cxx b/StRoot/StSpectraPool/StRareMaker/StReadRare.cxx index 0e403478a38..deebc6f42b7 100644 --- a/StRoot/StSpectraPool/StRareMaker/StReadRare.cxx +++ b/StRoot/StSpectraPool/StRareMaker/StReadRare.cxx @@ -35,7 +35,7 @@ StReadRare::StReadRare() } -StReadRare::StReadRare(Int_t nEvents, Char_t* histoFileName) +StReadRare::StReadRare(Int_t nEvents, const Char_t* histoFileName) { mNEvents = nEvents; diff --git a/StRoot/StSpectraPool/StRareMaker/StReadRare.h b/StRoot/StSpectraPool/StRareMaker/StReadRare.h index 277a9e59dbd..70965112bae 100644 --- a/StRoot/StSpectraPool/StRareMaker/StReadRare.h +++ b/StRoot/StSpectraPool/StRareMaker/StReadRare.h @@ -15,7 +15,7 @@ class StReadRare { public: StReadRare(); - StReadRare(Int_t nEvents, Char_t* histoFileName="RareEventPlots.root"); + StReadRare(Int_t nEvents, const Char_t* histoFileName="RareEventPlots.root"); virtual ~StReadRare(){}; void Init(); Int_t Run(); diff --git a/StRoot/StSpinPool/StFcsCosmicMaker/StFcsCosmicMaker.cxx b/StRoot/StSpinPool/StFcsCosmicMaker/StFcsCosmicMaker.cxx index ed30e335f32..c1d75362e7a 100644 --- a/StRoot/StSpinPool/StFcsCosmicMaker/StFcsCosmicMaker.cxx +++ b/StRoot/StSpinPool/StFcsCosmicMaker/StFcsCosmicMaker.cxx @@ -49,7 +49,7 @@ Int_t StFcsCosmicMaker::Init(){ } mFile=new TFile(mFilename,"RECREATE"); - char* nameEHP[kFcsEHP] = {"Ecal","Hcal","Pres"}; + const char* nameEHP[kFcsEHP] = {"Ecal","Hcal","Pres"}; char t[100],t2[100]; for(int ehp=0; ehp<2; ehp++){ sprintf(t,"%4s_ADC",nameEHP[ehp]); diff --git a/StRoot/StSpinPool/StFcsMIPMaker/StFcsMIPMaker.cxx b/StRoot/StSpinPool/StFcsMIPMaker/StFcsMIPMaker.cxx index 1c5ef61ce7f..1242ce92b90 100755 --- a/StRoot/StSpinPool/StFcsMIPMaker/StFcsMIPMaker.cxx +++ b/StRoot/StSpinPool/StFcsMIPMaker/StFcsMIPMaker.cxx @@ -48,8 +48,8 @@ Int_t StFcsMIPMaker::Init(){ printf("StFcsMIPMaker::Init - Opening %s\n",mFilename); mFile=new TFile(mFilename,"RECREATE"); - char* nameEHP[kFcsEHP] = {"Ecal","Hcal","Pres"}; - char* nameNS[kFcsNorthSouth] = {"N","S"}; + const char* nameEHP[kFcsEHP] = {"Ecal","Hcal","Pres"}; + const char* nameNS[kFcsNorthSouth] = {"N","S"}; char f[100], t[100]; //histogram file names char adcsum_name[100];//1D hist names char adcsum_title[100]; //1D hist titles diff --git a/StRoot/StSpinPool/StFcsQaMaker/StFcsQaMaker.cxx b/StRoot/StSpinPool/StFcsQaMaker/StFcsQaMaker.cxx index 812760b34ef..b704b382a20 100644 --- a/StRoot/StSpinPool/StFcsQaMaker/StFcsQaMaker.cxx +++ b/StRoot/StSpinPool/StFcsQaMaker/StFcsQaMaker.cxx @@ -46,8 +46,8 @@ Int_t StFcsQaMaker::Init(){ } mFile=new TFile(mFilename,"RECREATE"); - char* nameEHP[kFcsEHP] = {"Ecal","Hcal","Pres"}; - char* nameNS[kFcsNorthSouth] = {"N","S"}; + const char* nameEHP[kFcsEHP] = {"Ecal","Hcal","Pres"}; + const char* nameNS[kFcsNorthSouth] = {"N","S"}; char t[100],t2[100],t3[100]; mDataSize = new TH1F("DataSize","DataSize",100,-1.0,7.0); diff --git a/StRoot/StSpinPool/StFcsTrgQaMaker/StFcsTrgQaMaker.cxx b/StRoot/StSpinPool/StFcsTrgQaMaker/StFcsTrgQaMaker.cxx index 90f2aea51e0..7b8780d635a 100644 --- a/StRoot/StSpinPool/StFcsTrgQaMaker/StFcsTrgQaMaker.cxx +++ b/StRoot/StSpinPool/StFcsTrgQaMaker/StFcsTrgQaMaker.cxx @@ -45,7 +45,7 @@ Int_t StFcsTrgQaMaker::Init(){ int yday=mRun/1000; sprintf(mFilename,"%d/%d.trgQa.root",yday,mRun); }else if(mFilename==0){ - static char* fname = "fcs.trgqa.root"; + static char* fname = const_cast("fcs.trgqa.root"); mFilename=fname; } printf("StFcsTrgQaMaker::Init - Opening %s\n",mFilename); diff --git a/StRoot/StSpinPool/StFmsTriggerMaker/StFmsTriggerMaker.cxx b/StRoot/StSpinPool/StFmsTriggerMaker/StFmsTriggerMaker.cxx index 378ba2f82d7..ba9539bfff7 100644 --- a/StRoot/StSpinPool/StFmsTriggerMaker/StFmsTriggerMaker.cxx +++ b/StRoot/StSpinPool/StFmsTriggerMaker/StFmsTriggerMaker.cxx @@ -712,12 +712,12 @@ void StFmsTriggerMaker::writeFmsLayer1ToFpdLayer2(Crate& sim, int t) int StFmsTriggerMaker::loadRegisters(int runNumber) { MYSQL mysql; - char* host1 = "db04.star.bnl.gov"; //offline DB which has online DB copies from past year (a hack! don't tell Dmitry!) - char* host2 = "onldb2.starp.bnl.gov"; //this is online DB for current run, cannot access from ofl/rcas + const char* host1 = "db04.star.bnl.gov"; //offline DB which has online DB copies from past year (a hack! don't tell Dmitry!) + const char* host2 = "onldb2.starp.bnl.gov"; //this is online DB for current run, cannot access from ofl/rcas const char* user = ""; const char* pass = ""; // See http://drupal.star.bnl.gov/STAR/comp/db/onlinedb/online-sever-port-map - char* host = host1; + const char* host = host1; int year; if(mForceRun==0){ mDBTime=GetDBTime(); diff --git a/StRoot/StSpinPool/StSpinDbMaker/StSpinDbMaker.cxx b/StRoot/StSpinPool/StSpinDbMaker/StSpinDbMaker.cxx index 6bef1f5ef2a..cd39dcc719b 100644 --- a/StRoot/StSpinPool/StSpinDbMaker/StSpinDbMaker.cxx +++ b/StRoot/StSpinPool/StSpinDbMaker/StSpinDbMaker.cxx @@ -187,7 +187,7 @@ void StSpinDbMaker::optimizeTables (){ } - char *polDir="scrambled"; + string polDir="scrambled"; if(isPolDirTrans()) polDir="Transverse"; if(isPolDirLong()) polDir="Longitudinal"; @@ -487,9 +487,9 @@ void StSpinDbMaker::print(int level) { int yellBx=(bXstar+getBucketOffsets()[yellRing]/3)%SPINDbMaxBXings; int spin8=spin8usingBX48(bx48); int spin4=spin4usingBX48(bx48); - char *ftt="empty "; + const char *ftt="empty "; if (isBXfilledUsingBX48(bx48))ftt="filled"; - char *mtt="use "; + const char *mtt="use "; if(isMaskedUsingBX48(bx48))mtt="*mask*"; printf(" %3d 0x%02x %2d %6s %6s %3d %3d %3d\n",bXstar,spin8,spin4,ftt,mtt,bx48,blueBx,yellBx); // printf("bx48=%d mU=%d bxStar=%d mR=%d\n", bx48,isMaskedUsingBX48(bx48),bXstar,mTabSpinBXmask->bXmask[bXstar]); diff --git a/StRoot/StStrangeMuDstMaker/StStrangeMuDstPlayer.cxx b/StRoot/StStrangeMuDstMaker/StStrangeMuDstPlayer.cxx index 4baa79811ee..349fea08b79 100755 --- a/StRoot/StStrangeMuDstMaker/StStrangeMuDstPlayer.cxx +++ b/StRoot/StStrangeMuDstMaker/StStrangeMuDstPlayer.cxx @@ -1,3 +1,5 @@ +#include + #include "StChain.h" #include "StIOMaker/StIOMaker.h" #include "StEventMaker/StEventMaker.h" @@ -17,13 +19,13 @@ ClassImp(StrangeMuDstPlayer) char empty = '\0'; char slash = '/'; -void ParseFileName(Char_t *output, Char_t **file, Char_t **dir) { - if ((*file = strrchr(output,slash))) { +void ParseFileName(const Char_t *output, Char_t **file, Char_t **dir) { + if ((*file = std::strrchr(const_cast(output),slash))) { (*file)++; *dir = new char[strlen(output)+5]; strncpy(*dir,output,(strlen(output)-strlen(*file))); } else { - *file = output; + *file = const_cast(output); *dir = ∅ } } @@ -53,7 +55,7 @@ StrangeMuDstPlayer::StrangeMuDstPlayer() { xiDcaBachelorToPrimVertex = 0.; } -void StrangeMuDstPlayer::Make(Int_t NEvents, StFile* input, Char_t* output) { +void StrangeMuDstPlayer::Make(Int_t NEvents, StFile* input, const Char_t* output) { StStrangeMuDstMaker *muDstMakers[3]; StStrangeMuDstMaker *v0MuDstMaker, *xiMuDstMaker, *kinkMuDstMaker; @@ -166,7 +168,7 @@ void StrangeMuDstPlayer::Make(Int_t NEvents, StFile* input, Char_t* output) { } } -void StrangeMuDstPlayer::Filter(Int_t NEvents, StFile* input, Char_t* output) { +void StrangeMuDstPlayer::Filter(Int_t NEvents, StFile* input, const Char_t* output) { StStrangeMuDstMaker *oldMuDstMaker=0; StStrangeMuDstMaker *newMuDstMakers[3]; @@ -366,7 +368,7 @@ void StrangeMuDstPlayer::Filter(Int_t NEvents, StFile* input, Char_t* output) { } } -void StrangeMuDstPlayer::Play(Int_t NEvents, StFile* input, Char_t* output) { +void StrangeMuDstPlayer::Play(Int_t NEvents, StFile* input, const Char_t* output) { StStrangeMuDstMaker *oldMuDstMaker=0; StStrangeMuDstMaker *newMuDstMakers[3]; @@ -592,7 +594,7 @@ void StrangeMuDstPlayer::Play(Int_t NEvents, StFile* input, Char_t* output) { } } -void StrangeMuDstPlayer::Copy(Int_t NEvents, StFile* input, Char_t* output) { +void StrangeMuDstPlayer::Copy(Int_t NEvents, StFile* input, const Char_t* output) { StStrangeMuDstMaker *oldMuDstMaker=0; StStrangeMuDstMaker *newMuDstMakers[3]; diff --git a/StRoot/StStrangeMuDstMaker/StStrangeMuDstPlayer.h b/StRoot/StStrangeMuDstMaker/StStrangeMuDstPlayer.h index 18344c8e27f..0f1a0ac55ff 100644 --- a/StRoot/StStrangeMuDstMaker/StStrangeMuDstPlayer.h +++ b/StRoot/StStrangeMuDstMaker/StStrangeMuDstPlayer.h @@ -7,10 +7,10 @@ class StrangeMuDstPlayer { public: StrangeMuDstPlayer(); virtual ~StrangeMuDstPlayer() {} - void Make(Int_t NEvents, StFile* input, Char_t *output="evMuDst.root"); - void Filter(Int_t NEvents, StFile* input, Char_t *output="evMuDst.root"); - void Play(Int_t NEvents, StFile* input, Char_t *output="evMuDst.root"); - void Copy(Int_t NEvents, StFile* input, Char_t *output="evMuDst.root"); + void Make(Int_t NEvents, StFile* input, const Char_t *output="evMuDst.root"); + void Filter(Int_t NEvents, StFile* input, const Char_t *output="evMuDst.root"); + void Play(Int_t NEvents, StFile* input, const Char_t *output="evMuDst.root"); + void Copy(Int_t NEvents, StFile* input, const Char_t *output="evMuDst.root"); void DoFileSplit(Bool_t val = kTRUE); void DoMC(Bool_t val = kTRUE); void DoT0Abort(Bool_t val = kTRUE); diff --git a/StRoot/StSvtClusterMaker/StSvtHitMaker.cxx b/StRoot/StSvtClusterMaker/StSvtHitMaker.cxx index 523913ef3a0..1dcde3c182e 100644 --- a/StRoot/StSvtClusterMaker/StSvtHitMaker.cxx +++ b/StRoot/StSvtClusterMaker/StSvtHitMaker.cxx @@ -742,7 +742,7 @@ Int_t StSvtHitMaker::Finish(){ } //________________________________________________________________________ -void StSvtHitMaker::SetFileNames(char* filen, char* filec){ +void StSvtHitMaker::SetFileNames(const char* filen, const char* filec){ filenameN = filen; filenameC = filec; } diff --git a/StRoot/StSvtClusterMaker/StSvtHitMaker.h b/StRoot/StSvtClusterMaker/StSvtHitMaker.h index 5a243cd6fbd..baae901b548 100644 --- a/StRoot/StSvtClusterMaker/StSvtHitMaker.h +++ b/StRoot/StSvtClusterMaker/StSvtHitMaker.h @@ -106,7 +106,7 @@ class StSvtHitMaker : public StMaker void TransformIntoSpacePoint(); void SaveIntoNtuple(int numOfCluster, int index); void SetWriteNtuple(int iwrite){iWrite = iwrite;}; - void SetFileNames(char* name1="/dev/null", char* name2="/dev/null"); + void SetFileNames(const char* name1="/dev/null", const char* name2="/dev/null"); Int_t Eval(); double LaserTemperatureCorrection(); @@ -145,8 +145,8 @@ class StSvtHitMaker : public StMaker TH1F *mZHitResolution; //! TH2F *mHitResolution; //! - char* filenameN; - char* filenameC; + const char* filenameN; + const char* filenameC; ClassDef(StSvtHitMaker,0) //virtual base class for Makers diff --git a/StRoot/StSvtDaqMaker/StSvtDaqData.cc b/StRoot/StSvtDaqMaker/StSvtDaqData.cc index 5d57b5d5a95..2fbeb9a7dc0 100644 --- a/StRoot/StSvtDaqMaker/StSvtDaqData.cc +++ b/StRoot/StSvtDaqMaker/StSvtDaqData.cc @@ -52,7 +52,7 @@ StSvtDaqData::StSvtDaqData() : StSvtData() {} -StSvtDaqData::StSvtDaqData(const char* config, StSVTReader* reader, char* option, int run, int event, int trigger) : +StSvtDaqData::StSvtDaqData(const char* config, StSVTReader* reader, const char* option, int run, int event, int trigger) : StSvtData(config, run, event, trigger) { // The Same as StSvtHybridCollection, with two additional parameters: @@ -66,7 +66,7 @@ StSvtDaqData::StSvtDaqData(const char* config, StSVTReader* reader, char* option setData(reader,option); } -StSvtDaqData::StSvtDaqData(StSvtConfig* config, StSVTReader* reader, char* option, int run, int event, int trigger) : +StSvtDaqData::StSvtDaqData(StSvtConfig* config, StSVTReader* reader, const char* option, int run, int event, int trigger) : StSvtData(config, run, event, trigger) { // The Same as StSvtHybridCollection, with two additional parameters: @@ -80,7 +80,7 @@ StSvtDaqData::StSvtDaqData(StSvtConfig* config, StSVTReader* reader, char* optio setData(reader,option); } -int StSvtDaqData::setData(StSVTReader* reader, char* option) +int StSvtDaqData::setData(StSVTReader* reader, const char* option) { int status, index; diff --git a/StRoot/StSvtDaqMaker/StSvtDaqData.hh b/StRoot/StSvtDaqMaker/StSvtDaqData.hh index 09898bf0891..f5abe73240b 100644 --- a/StRoot/StSvtDaqMaker/StSvtDaqData.hh +++ b/StRoot/StSvtDaqMaker/StSvtDaqData.hh @@ -30,10 +30,10 @@ class StSvtDaqData: public StSvtData { public: StSvtDaqData(); - StSvtDaqData(const char* config, StSVTReader* reader=0, char* option = "ZS", int run=0, int event=0, int trigger=0); - StSvtDaqData(StSvtConfig* config, StSVTReader* reader=0, char* option = "ZS", int run=0, int event=0, int trigger=0); + StSvtDaqData(const char* config, StSVTReader* reader=0, const char* option = "ZS", int run=0, int event=0, int trigger=0); + StSvtDaqData(StSvtConfig* config, StSVTReader* reader=0, const char* option = "ZS", int run=0, int event=0, int trigger=0); - int setData(StSVTReader* reader, char* option = "ZS"); + int setData(StSVTReader* reader, const char* option = "ZS"); protected: diff --git a/StRoot/StSvtDaqMaker/StSvtDaqMaker.cxx b/StRoot/StSvtDaqMaker/StSvtDaqMaker.cxx index 0fc5b087ac2..6d08885bb14 100644 --- a/StRoot/StSvtDaqMaker/StSvtDaqMaker.cxx +++ b/StRoot/StSvtDaqMaker/StSvtDaqMaker.cxx @@ -83,7 +83,7 @@ ClassImp(StSvtDaqMaker) //_____________________________________________________________________________ - StSvtDaqMaker::StSvtDaqMaker(const char *name, char* config, char* data):StMaker(name) + StSvtDaqMaker::StSvtDaqMaker(const char *name, const char* config, const char* data):StMaker(name) { fConfig = config; fDataType = data; diff --git a/StRoot/StSvtDaqMaker/StSvtDaqMaker.h b/StRoot/StSvtDaqMaker/StSvtDaqMaker.h index bff98c3daf2..cbe9fcb60f3 100644 --- a/StRoot/StSvtDaqMaker/StSvtDaqMaker.h +++ b/StRoot/StSvtDaqMaker/StSvtDaqMaker.h @@ -60,8 +60,8 @@ class TObjectSet; class StSvtDaqMaker : public StMaker { private: - char *fConfig; //! - char *fDataType; //! + const char *fConfig; //! + const char *fDataType; //! StSvtHybridDaqData *fData; //! StSvtDaqData *fSvtData; //! @@ -79,10 +79,10 @@ class StSvtDaqMaker : public StMaker { protected: public: - StSvtDaqMaker(const char *name="SvtDaq", char* config="FULL", char* data="ZS"); + StSvtDaqMaker(const char *name="SvtDaq", const char* config="FULL", const char* data="ZS"); virtual ~StSvtDaqMaker(); - void SetConfiguration(char* config){fConfig = config;} - void SetDataType(char* data){fDataType = data;} + void SetConfiguration(const char* config){fConfig = config;} + void SetDataType(const char* data){fDataType = data;} Int_t SetSvtData(); Int_t SetSvtPed(); Int_t SetSvtRMSPed(); diff --git a/StRoot/StSvtDaqMaker/StSvtHybridDaqData.cc b/StRoot/StSvtDaqMaker/StSvtHybridDaqData.cc index 2358711c653..162bf58ca2d 100644 --- a/StRoot/StSvtDaqMaker/StSvtHybridDaqData.cc +++ b/StRoot/StSvtDaqMaker/StSvtHybridDaqData.cc @@ -39,7 +39,7 @@ ClassImp(StSvtHybridDaqData) -StSvtHybridDaqData::StSvtHybridDaqData(int barrel, int ladder, int wafer, int hybrid, StSVTReader* reader, char* option) : +StSvtHybridDaqData::StSvtHybridDaqData(int barrel, int ladder, int wafer, int hybrid, StSVTReader* reader, const char* option) : StSvtHybridData(barrel, ladder, wafer, hybrid) { assert(sizeof(TPCSequence)==sizeof(StSequence)); @@ -51,7 +51,7 @@ StSvtHybridDaqData::StSvtHybridDaqData(int barrel, int ladder, int wafer, int hy setHybridData(reader,option); } -int StSvtHybridDaqData::setHybridData(StSVTReader* reader, char* option) +int StSvtHybridDaqData::setHybridData(StSVTReader* reader, const char* option) { // fills the data members of this object, // so one can access the data through the two methods mentioned below. diff --git a/StRoot/StSvtDaqMaker/StSvtHybridDaqData.hh b/StRoot/StSvtDaqMaker/StSvtHybridDaqData.hh index b811de0999e..00059c91299 100644 --- a/StRoot/StSvtDaqMaker/StSvtHybridDaqData.hh +++ b/StRoot/StSvtDaqMaker/StSvtHybridDaqData.hh @@ -25,9 +25,9 @@ class StSVTReader; class StSvtHybridDaqData: public StSvtHybridData { public: - StSvtHybridDaqData(int barrel, int ladder, int wafer, int hybrid, StSVTReader* reader=0, char* option="ZS"); + StSvtHybridDaqData(int barrel, int ladder, int wafer, int hybrid, StSVTReader* reader=0, const char* option="ZS"); - int setHybridData(StSVTReader* reader, char* option = "ZS"); + int setHybridData(StSVTReader* reader, const char* option = "ZS"); protected: diff --git a/StRoot/StSvtPool/SvtMatchedTree/SvtMatchedTree.h b/StRoot/StSvtPool/SvtMatchedTree/SvtMatchedTree.h index 2d765cf460a..0675800d5f8 100644 --- a/StRoot/StSvtPool/SvtMatchedTree/SvtMatchedTree.h +++ b/StRoot/StSvtPool/SvtMatchedTree/SvtMatchedTree.h @@ -16,7 +16,7 @@ class SvtMatchedTree : public StMaker { void Print(Option_t *opt="") const; void SetMinNoHits(Int_t MinNoHits=0) {fMinNoHits = MinNoHits;} void SetpCut(Double_t pCut=0.0) {fpCut = pCut;} - void SetOut(Char_t *Out="Event") {fOut = Out;} + void SetOut(const Char_t *Out="Event") {fOut = Out;} void MakeListOfRotations(); private: TFile *fFile; @@ -24,7 +24,7 @@ class SvtMatchedTree : public StMaker { EventT *fEvent; Int_t fMinNoHits; Double_t fpCut; - Char_t *fOut; + const Char_t *fOut; ClassDef(SvtMatchedTree,1) }; #endif diff --git a/StRoot/StTofCalibMaker/StTofCalibMaker.cxx b/StRoot/StTofCalibMaker/StTofCalibMaker.cxx index e366ad1feeb..10dd634a873 100644 --- a/StRoot/StTofCalibMaker/StTofCalibMaker.cxx +++ b/StRoot/StTofCalibMaker/StTofCalibMaker.cxx @@ -466,7 +466,7 @@ Int_t StTofCalibMaker::initParameters(int runnumber) if(Debug()) gMessMgr->Info("","OS") << " Number of rows read in: " << numRows << " for INL tables" << endm; - Char_t *boardName; + const Char_t *boardName; Short_t boardId; Short_t tdcId; Float_t INLcorr[1024]; diff --git a/StRoot/StTofUtil/StTofrGeometry.cxx b/StRoot/StTofUtil/StTofrGeometry.cxx index 9ee0d6b7234..21115662e07 100644 --- a/StRoot/StTofUtil/StTofrGeometry.cxx +++ b/StRoot/StTofUtil/StTofrGeometry.cxx @@ -48,9 +48,9 @@ Bool_t StTofrNode::mDebug = kFALSE; Double_t const StTofrGeomSensor::mSensorDy = 10.35; // Actual module length; -char* const StTofrGeometry::sectorPref = "BSEC"; -char* const StTofrGeometry::trayPref = "BTRA"; -char* const StTofrGeometry::senPref = "BRMD"; +const char* const StTofrGeometry::sectorPref = "BSEC"; +const char* const StTofrGeometry::trayPref = "BTRA"; +const char* const StTofrGeometry::senPref = "BRMD"; //_____________________________________________________________________________ StTofrNode::StTofrNode(TVolumeView *element, TVolumeView *top) diff --git a/StRoot/StTofUtil/StTofrGeometry.h b/StRoot/StTofUtil/StTofrGeometry.h index 795707923a3..c7b977bdd31 100644 --- a/StRoot/StTofUtil/StTofrGeometry.h +++ b/StRoot/StTofUtil/StTofrGeometry.h @@ -362,9 +362,9 @@ class StTofrGeometry : public TNamed { static Bool_t mDebug; //!Control message printing of this class - static char* const sectorPref ;//= "BSEC"; - static char* const trayPref ;//= "BTRA"; - static char* const senPref ;//= "BRMD"; + static const char* const sectorPref ;//= "BSEC"; + static const char* const trayPref ;//= "BTRA"; + static const char* const senPref ;//= "BRMD"; protected: //void InitFromXdf(const char* xdffile); diff --git a/StRoot/StTofpMatchMaker/StTofpMatchMaker.h b/StRoot/StTofpMatchMaker/StTofpMatchMaker.h index 68b9c365a8c..e88c594193d 100644 --- a/StRoot/StTofpMatchMaker/StTofpMatchMaker.h +++ b/StRoot/StTofpMatchMaker/StTofpMatchMaker.h @@ -89,7 +89,7 @@ class StTofpMatchMaker : public StMaker { void setMinHitsPerTrack(Int_t); void setMinFitPointsPerTrack(Int_t); void setMaxDCA(Float_t); - void setHistoFileName(Char_t*); + void setHistoFileName(const Char_t*); Bool_t doPrintMemoryInfo; //! Bool_t doPrintCpuInfo; //! @@ -204,7 +204,7 @@ inline void StTofpMatchMaker::setStandardTrackGeometry(){mOuterTrackGeometry=fal inline void StTofpMatchMaker::setMinHitsPerTrack(Int_t nhits){mMinHitsPerTrack=nhits;} inline void StTofpMatchMaker::setMinFitPointsPerTrack(Int_t nfitpnts){mMinFitPointsPerTrack=nfitpnts;} inline void StTofpMatchMaker::setMaxDCA(Float_t maxdca){mMaxDCA=maxdca;} -inline void StTofpMatchMaker::setHistoFileName(Char_t* filename){mHistoFileName=filename;} +inline void StTofpMatchMaker::setHistoFileName(const Char_t* filename){mHistoFileName=filename;} inline void StTofpMatchMaker::createHistograms(Bool_t histos){mHisto = histos;} inline bool StTofpMatchMaker::validAdc(float adc){return((adc>=mMinValidAdc) && (adc<=mMaxValidAdc));} inline bool StTofpMatchMaker::validTdc(float tdc){return((tdc>=mMinValidTdc) && (tdc<=mMaxValidTdc));} diff --git a/StRoot/StTofrMatchMaker/StTofrMatchMaker.h b/StRoot/StTofrMatchMaker/StTofrMatchMaker.h index 5f792850287..0f00248b139 100644 --- a/StRoot/StTofrMatchMaker/StTofrMatchMaker.h +++ b/StRoot/StTofrMatchMaker/StTofrMatchMaker.h @@ -133,7 +133,7 @@ class StTofrMatchMaker : public StMaker { void setMinFitPointsPerTrack(Int_t); void setMinFitPointsOverMax(Float_t); void setMaxDCA(Float_t); - void setHistoFileName(Char_t*); + void setHistoFileName(const Char_t*); void setNtupleFileName(Char_t*); void setSaveGeometry(Bool_t geomSave=kFALSE); @@ -382,7 +382,7 @@ inline void StTofrMatchMaker::setMinFitPointsOverMax(Float_t ratio) {mMinFitPoin inline void StTofrMatchMaker::setMaxDCA(Float_t maxdca){mMaxDCA=maxdca;} -inline void StTofrMatchMaker::setHistoFileName(Char_t* filename){mHistoFileName=filename;} +inline void StTofrMatchMaker::setHistoFileName(const Char_t* filename){mHistoFileName=filename;} inline void StTofrMatchMaker::setCreateHistoFlag(Bool_t histos){mHisto = histos;} diff --git a/StRoot/St_trg_Maker/St_trg_duplicated.code b/StRoot/St_trg_Maker/St_trg_duplicated.code index c052a703257..d2f63468139 100644 --- a/StRoot/St_trg_Maker/St_trg_duplicated.code +++ b/StRoot/St_trg_Maker/St_trg_duplicated.code @@ -167,7 +167,7 @@ void St_trg_Maker::SWITCH(Emc)(St_dst_TrgDet *dst1) { int St_trg_Maker::SWITCH(Daq)(St_DataSet *herb,St_dst_TrgDet *dst1,St_dst_L0_Trigger *dst2, St_dst_L1_Trigger *dst3,St_dst_L2_Trigger *dst4) { - char *oo,*ptr,isLaser=0,isPhysics=0,isPulser=0,thisEventOk=0; + char *ptr,isLaser=0,isPhysics=0,isPulser=0,thisEventOk=0; fVictorPrelim=(StDAQReader*)(herb->GetObject()); assert(fVictorPrelim); fVictor=fVictorPrelim->getTRGReader(); assert(fVictor); assert(fVictor->thereIsTriggerData()); // No TRG bank in .daq file. Perhaps a pedestal or laser run? @@ -193,7 +193,7 @@ int St_trg_Maker::SWITCH(Daq)(St_DataSet *herb,St_dst_TrgDet *dst1,St_dst_L0_Tri if((m_Mode&2)&&isLaser) thisEventOk=7; if((m_Mode&4)&&isPulser) thisEventOk=7; - oo="unkown"; + const char *oo="unkown"; if(isPhysics) oo="Physics"; if(isLaser) oo="Laser"; if(isPulser) oo="Pulser"; diff --git a/StRoot/St_trg_Maker/year2003.cxx b/StRoot/St_trg_Maker/year2003.cxx index d80fb30a13d..340b03e5ec5 100644 --- a/StRoot/St_trg_Maker/year2003.cxx +++ b/StRoot/St_trg_Maker/year2003.cxx @@ -177,7 +177,7 @@ void St_trg_Maker::Emc2003(St_dst_TrgDet *dst1) { int St_trg_Maker::Daq2003(St_DataSet *herb,St_dst_TrgDet *dst1,St_dst_L0_Trigger *dst2, St_dst_L1_Trigger *dst3,St_dst_L2_Trigger *dst4) { - char *oo,*ptr,isLaser=0,isPhysics=0,isPulser=0,thisEventOk=0; + char *ptr,isLaser=0,isPhysics=0,isPulser=0,thisEventOk=0; fVictorPrelim=(StDAQReader*)(herb->GetObject()); assert(fVictorPrelim); fVictor=fVictorPrelim->getTRGReader(); assert(fVictor); @@ -222,7 +222,7 @@ int St_trg_Maker::Daq2003(St_DataSet *herb,St_dst_TrgDet *dst1,St_dst_L0_Trigger if((m_Mode&4)&&isPulser) thisEventOk=7; - oo = "unknown"; + const char *oo = "unknown"; if(isPhysics) oo="Physics"; if(isLaser) oo="Laser"; if(isPulser) oo="Pulser"; diff --git a/StRoot/Stl3Util/base/St_l3_Coordinate_Transformer.cxx b/StRoot/Stl3Util/base/St_l3_Coordinate_Transformer.cxx index 042ac7cd125..9f48b022782 100644 --- a/StRoot/Stl3Util/base/St_l3_Coordinate_Transformer.cxx +++ b/StRoot/Stl3Util/base/St_l3_Coordinate_Transformer.cxx @@ -72,7 +72,7 @@ St_l3_Coordinate_Transformer::~St_l3_Coordinate_Transformer() -int St_l3_Coordinate_Transformer::LoadTPCLookupTable(char * mapfilename) +int St_l3_Coordinate_Transformer::LoadTPCLookupTable(const char * mapfilename) { #ifdef Solaris diff --git a/StRoot/Stl3Util/base/St_l3_Coordinate_Transformer.h b/StRoot/Stl3Util/base/St_l3_Coordinate_Transformer.h index 0ada216c363..e8510b88ffe 100644 --- a/StRoot/Stl3Util/base/St_l3_Coordinate_Transformer.h +++ b/StRoot/Stl3Util/base/St_l3_Coordinate_Transformer.h @@ -50,7 +50,7 @@ class St_l3_Coordinate_Transformer{ St_l3_Coordinate_Transformer() ; // Init parameters and variables virtual ~St_l3_Coordinate_Transformer() ; // Delete variables - int LoadTPCLookupTable(char * filename = "/L3/etc/map.bin"); + int LoadTPCLookupTable(const char * filename = "/L3/etc/map.bin"); // Memberfunctions // raw -> global diff --git a/StRoot/Stl3Util/gl3/gl3Histo.cxx b/StRoot/Stl3Util/gl3/gl3Histo.cxx index e974db430cf..480f0b1d145 100644 --- a/StRoot/Stl3Util/gl3/gl3Histo.cxx +++ b/StRoot/Stl3Util/gl3/gl3Histo.cxx @@ -16,7 +16,7 @@ //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! // //#################################################################################### -gl3Histo::gl3Histo ( char iId[10], char iTitle[100], +gl3Histo::gl3Histo (const char iId[10], const char iTitle[100], int iNBins, double iXMin, double iXMax ) { info = 0 ; if ( iNBins < 0 ) { diff --git a/StRoot/Stl3Util/gl3/gl3Histo.h b/StRoot/Stl3Util/gl3/gl3Histo.h index 292242c7a17..1abc343da64 100644 --- a/StRoot/Stl3Util/gl3/gl3Histo.h +++ b/StRoot/Stl3Util/gl3/gl3Histo.h @@ -29,7 +29,7 @@ class gl3Histo { double* info ; public: - gl3Histo ( char iId[10]="id", char iTitle[100]="name", + gl3Histo ( const char iId[10]="id", const char iTitle[100]="name", int iNBins=100, double iXMin=0., double iXMax=100. ) ; ~gl3Histo ( ) ; int Fill (double x, double weight=1) ;