Skip to content

Commit

Permalink
Fix GCC warning: unused variables
Browse files Browse the repository at this point in the history
  • Loading branch information
plexoos committed Nov 8, 2022
1 parent ece597d commit f0d560d
Show file tree
Hide file tree
Showing 44 changed files with 48 additions and 181 deletions.
2 changes: 1 addition & 1 deletion StRoot/StDaqLib/EVP/ssdReader.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ static int unpackRaw(int rb, int mz, int what, char *mem)
{

u_char *adcdata ;
int as, ch, strip, cou ;
int as, ch;
u_char *dta ;
int row ;

Expand Down
5 changes: 1 addition & 4 deletions StRoot/StDaqLib/RICH/RichEventReader.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,6 @@ void RichEventReader::InitEventReader(int fdes, long offset, int MMap)
//#define MX_MAP_SIZE 0x20000000
#define MX_MAP_SIZE 32768*4 /*max event size in RICH*/

off_t FileLength;

// cout << "Initializing EventReader with a MAPPED file" << endl;

//initialize the error strings
Expand All @@ -181,7 +179,6 @@ void RichEventReader::InitEventReader(int fdes, long offset, int MMap)
ERROR(ERR_FILE);
next_event_offset = -1;
}
FileLength = buf.st_size;

Bank_RICP lr;

Expand Down Expand Up @@ -401,7 +398,7 @@ EventInfo RichEventReader::getEventInfo()

void RichEventReader::printEventInfo(FILE * fd)
{
EventInfo ei = getEventInfo();
// EventInfo ei = getEventInfo();
// ei.printEventInfo(fd);
}

Expand Down
40 changes: 1 addition & 39 deletions StRoot/StFgtPool/StFgtClusterTools/StFgtGenAVEMaker.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -326,8 +326,6 @@ void StFgtGenAVEMaker::fillStripHistos(Float_t r, Float_t phi, Int_t iD, Int_t i

Double_t maxRCharge=-9999;
Double_t maxPhiCharge=-9999;
Double_t maxRChargeUncert=-9999;
Double_t maxPhiChargeUncert=-9999;
Int_t maxRInd=-1;
Int_t maxPInd=-1;
Int_t maxRTb=-1;
Expand All @@ -352,12 +350,8 @@ void StFgtGenAVEMaker::fillStripHistos(Float_t r, Float_t phi, Int_t iD, Int_t i
Short_t disc, quadrant,strip;
Char_t layer;
//These variables will store the APV number at which the relevant stuff happens for the overall quad.
Int_t APVmaxRCharge=-9999;
Int_t APVmaxPhiCharge=-9999;
//Int_t APVmaxRChargeUncert=-9999;
//Int_t APVmaxPhiChargeUncert=-9999;
Int_t APVmaxRInd=-1;
Int_t APVmaxPInd=-1;
Int_t APVmaxRTb=-1;
Int_t APVmaxPTb=-1;
Int_t APVmaxRAdc=-1;
Expand Down Expand Up @@ -411,15 +405,12 @@ void StFgtGenAVEMaker::fillStripHistos(Float_t r, Float_t phi, Int_t iD, Int_t i
clusterChargeP=-9999;
}
maxPhiCharge=pStrip.charge;
maxPhiChargeUncert=pStrip.chargeUncert;
maxPInd=i;
maxPAdc=-9999;
maxSigAdcP=-9999;
numFSigP=0;
firstFSigTbP=-1;
firstTbSigP=-1;
APVmaxPhiCharge=-1;
APVmaxPInd=-1;
APVmaxPAdc=-1;
APVmaxSigAdcP=-1;
APVnumFSigP=-1;
Expand Down Expand Up @@ -482,14 +473,11 @@ void StFgtGenAVEMaker::fillStripHistos(Float_t r, Float_t phi, Int_t iD, Int_t i

maxRCharge=pStrip.charge;
maxRInd=i;
maxRChargeUncert=pStrip.chargeUncert;
maxRAdc=-9999;
maxSigAdcR=-9999;
numFSigR=0;
firstFSigTbR=-1;
firstTbSigR=-1;
APVmaxRCharge=-1;
APVmaxRInd=-1;
APVmaxRAdc=-1;
APVmaxSigAdcR=-1;
APVnumFSigR=-1;
Expand Down Expand Up @@ -645,7 +633,6 @@ void StFgtGenAVEMaker::fillStripHistos(Float_t r, Float_t phi, Int_t iD, Int_t i
{

// cout <<" part of p cluster " << endl;
float intPCharge=(float)pStrips[iD*4+iq][maxPInd].charge+(float)pStrips[iD*4+iq][maxPInd-1].charge+(float)pStrips[iD*4+iq][maxPInd+1].charge;
float chi2Ndf;
float amp;
float t0;
Expand Down Expand Up @@ -683,7 +670,6 @@ void StFgtGenAVEMaker::fillStripHistos(Float_t r, Float_t phi, Int_t iD, Int_t i
{

// cout <<" part of R cluster " << endl;
float intRCharge=(float)pStrips[iD*4+iq][maxRInd].charge+(float)pStrips[iD*4+iq][maxRInd-1].charge+(float)pStrips[iD*4+iq][maxRInd+1].charge;
float chi2Ndf;
float amp;
float t0;
Expand Down Expand Up @@ -893,8 +879,8 @@ Double_t StFgtGenAVEMaker::findClosestPoint(float mx, float bx, float my, float
{
dist2=mDist;
//recalculate distance with proper alignment
float tmpX, tmpY,tmpZ,tmpP,tmpR;
#ifdef COSMIC
float tmpX, tmpY,tmpZ,tmpP,tmpR;
getAlign(iD,phi,r,tmpX,tmpY,tmpZ,tmpP,tmpR);
Double_t xExpUpdate=mx*tmpZ+bx;
Double_t yExpUpdate=my*tmpZ+by;
Expand Down Expand Up @@ -1557,14 +1543,12 @@ Bool_t StFgtGenAVEMaker::getTrack(vector<AVPoint>& points, Double_t ipZ)

Double_t StFgtGenAVEMaker::getRPhiRatio(vector<generalCluster>::iterator hitIterBegin, vector<generalCluster>::iterator hitIterEnd)
{
Short_t quad;
Char_t layer;
Int_t numR=0;
Int_t numPhi=0;
vector<generalCluster>::iterator hitIter=hitIterBegin;
for(;hitIter!=hitIterEnd;hitIter++)
{
quad=hitIter->quad;
layer=hitIter->layer;

if(layer=='R')
Expand All @@ -1590,28 +1574,6 @@ Int_t StFgtGenAVEMaker::Make()
StFgtGeneralBase::Make();
unsigned int oldNumTracks=m_tracks.size();

// cout <<"eff disk : " << m_effDisk <<endl;

// cout <<" mtracks size: " << m_tracks.size() << " oldnum: "<< oldNumTracks <<endl;
for(int i=0;i<6;i++)
{
// cout <<"there are " << pClusters[i]->size() << " clusters in disk " << i <<endl;
for(int j=0;j<pClusters[i]->size();j++)
{
/* if((*(pClusters[i]))[j].layer=='R')
cout <<"R layer, ";
else
cout <<"Phi layer, ";*/
Int_t seedType=(*(pClusters[i]))[j].seedType;
Double_t posPhi=(*(pClusters[i]))[j].posPhi;
Double_t posR=(*(pClusters[i]))[j].posR;
Int_t clusSize=(*(pClusters[i]))[j].clusterSize;
Double_t charge=(*(pClusters[i]))[j].clusterCharge;
Int_t cntGeoId=(*(pClusters[i]))[j].centralStripGeoId;
// cout <<"cluster pos phi: " << posPhi <<" posR: " << posR <<" clusSize: " << clusSize << " charge: "<< charge <<" geoId: "<< cntGeoId <<" seedT : " << seedType<<endl;
}
}

for(int iD=0;iD<6;iD++)
{
(*outTxtFile) <<" In Disc " << iD << " we have clusters with geo id: ";
Expand Down
5 changes: 0 additions & 5 deletions StRoot/StFgtPool/StFgtClusterTools/StFgtGenPlotter.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,9 @@ Int_t StFgtGenPlotter::Make()
cout <<"general make " <<endl;
StFgtGeneralBase::Make();
cout <<" making cluster plotter " <<endl;
Int_t realEvtNr=0;

Float_t x;
Float_t y;
Int_t prvGeoId=-1;
for(int iDx=0;iDx<kFgtNumDiscs;iDx++)
{

Expand Down Expand Up @@ -160,9 +158,6 @@ Int_t StFgtGenPlotter::Make()

Int_t numStrips=hitIter->clusterSize;
///check if at least one of the strips has a valid seed)
Short_t quad, disc, strip;
Char_t layer;
Bool_t containsSeed=true; // just take all clusters

if(hitIter->layer=='R')
{
Expand Down
10 changes: 0 additions & 10 deletions StRoot/StPeCMaker/StPeCMaker.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,6 @@ Int_t StPeCMaker::Init() {
if(!pevent) LOG_INFO << "StPeCMaker Init: unable to make instance of StPeCEvent ---------- " << endm;
trigger = new StPeCTrigger();
trigger->setInfoLevel(infoLevel);
char test[] = "ZDC_monitor";

geant = new StPeCGeant();
LOG_INFO << "StPeCMaker Init: before branch add ---------- " << endm;
Expand Down Expand Up @@ -298,11 +297,8 @@ Int_t StPeCMaker::Make()
// Int_t flag = kStOk;
LOG_INFO << "StPeCMaker make: just in ---------- " << endm;

Int_t NTracks = 0 ;
int tw = 0 ;
int ok = 0 ;
int returnValue = 0;
int gReturn = 0;
//
// 26-APR 2012 RD we comment the whole muDst part NEEDS TO BE FIXED
// 12-JULY2012 RD this is still in need of a fix, I return to StMuDst for triggerEfficiency studies
Expand All @@ -312,10 +308,8 @@ Int_t StPeCMaker::Make()


// LOG_INFO << "StPeCMaker make: trigger selected ---------- " << triggerChoice<< endm;
NTracks = muDst->globalTracks()->GetEntries();

StL0Trigger &trig = muDst->event()->l0Trigger();
tw = trig.triggerWord();

returnValue = trigger->process(muDst, triggerChoice);
// LOG_INFO << "StPeCMaker make: trigger return ---------- " <<returnValue<< endm;
Expand All @@ -340,9 +334,7 @@ Int_t StPeCMaker::Make()
returnValue = trigger->process(event, triggerChoice);

StSPtrVecTrackNode& tempn = event->trackNodes();
NTracks = tempn.size();

tw = event->l0Trigger()->triggerWord(); // end of StEvent 18-NOV
pevent->setTOFgeometry(mBTofGeom);
ok = pevent->fill(event);

Expand All @@ -356,10 +348,8 @@ Int_t StPeCMaker::Make()
return kStOK;
}
LOG_INFO << "StPeCMaker make: using both StMuDst and StEvent ---------- " << endm;
NTracks = muDst->globalTracks()->GetEntries();

StL0Trigger &trig = muDst->event()->l0Trigger();
tw = trig.triggerWord();

returnValue = trigger->process(muDst, triggerChoice);
pevent->setTOFgeometry(mBTofGeom);
Expand Down
2 changes: 0 additions & 2 deletions StRoot/StPxlSimMaker/DIGMAPS/digmaps.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1421,11 +1421,9 @@ void DIGMAPS::InspectEvent(Int_t EventNumber)
{
DIGAction *myAction = GetAction();
Char_t *myDoit = myAction->GetDoit();
Int_t myIntAction = 0;
Char_t action2[200] = "plot";
if(!strncmp( action2, myDoit,strlen(action2)) ){
cout<<" WE CAN PLOT THAT !"<<endl;
myIntAction=2;
}else{
cout<<" No action plot done before !"<<endl;
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ Int_t StFcsEcalHcalMipMaker::Init(){

const char* nameEH[2] = {"Ecal","Hcal"};
const char* nameNS[kFcsNorthSouth] = {"N","S"};
char f[100], t[100]; //histogram file names

for(int eh=0; eh<2; eh++){
mNClu[eh] = new TH1F(Form("NCluster_%s",nameEH[eh]),
Expand Down
3 changes: 0 additions & 3 deletions StRoot/StSpinPool/StFcsEpdQaMaker/StFcsEpdQaMaker.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,8 @@ Int_t StFcsEpdQaMaker::Make(){
StSPtrVecFcsHit& hits = mFcsCollection->hits(det);
for (int i=0; i<nhit; i++){
int id = hits[i]->id();
int ehp = hits[i]->ehp();
int ns = hits[i]->ns();
int dep = hits[i]->dep();
int ch = hits[i]->channel();
int ntb = hits[i]->nTimeBin();
int pp,tt;
mFcsDb->getEPDfromId(det,id,pp,tt);
if(pp==11) pp=10; //HACK for run21 map
Expand Down
8 changes: 3 additions & 5 deletions StRoot/StSpinPool/StFcsEventDisplay/StFcsEventDisplay.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,6 @@ int StFcsEventDisplay::Make(){
float ymax=220;
float yoff[kFcsNDet]={100.0,100.0,-100.0,-100.0,100.0,100.0};
float xoff[kFcsNDet]={ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0};
float stgcOffX=0.0;
float stgcOffY=0.0;
float cTxSize=0.01;
float eTxSize=0.007;
TH2F* frame;
Expand Down Expand Up @@ -220,10 +218,8 @@ int StFcsEventDisplay::Make(){
for(int det=0; det<kFcsNDet; det++){
StSPtrVecFcsHit& hits = mFcsColl->hits(det);
StSPtrVecFcsCluster& clusters = mFcsColl->clusters(det);
StSPtrVecFcsPoint& points = mFcsColl->points(det);
int nh=mFcsColl->numberOfHits(det);
int nc=mFcsColl->numberOfClusters(det);
int np=mFcsColl->numberOfPoints(det);
if(mDebug>0) LOG_INFO << Form("StFcsEventDisplay Det=%1d nhit=%4d nclu=%3d",det,nh,nc) << endm;

//first all towers
Expand Down Expand Up @@ -268,7 +264,7 @@ int StFcsEventDisplay::Make(){
double zepd=375.0;
double zfcs=710.0+13.90+15.0;
double zr=zfcs/zepd;
int pp,tt,id,n;
int pp,tt,n;
double x[5],y[5];
mFcsDb->getEPDfromId(det,hit->id(),pp,tt);
mEpdgeo->GetCorners(100*pp+tt,&n,x,y);
Expand Down Expand Up @@ -335,6 +331,8 @@ int StFcsEventDisplay::Make(){
}

#ifdef ___USESTGC___
float stgcOffX=0.0;
float stgcOffY=0.0;
//STGC
if(mStgcColl){
for(int det=0; det<kStgcNDet; det++){
Expand Down
5 changes: 0 additions & 5 deletions StRoot/StSpinPool/StFcsQaMaker/StFcsQaMaker.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -206,11 +206,8 @@ Int_t StFcsQaMaker::Make() {
}
}

//tof multiplicity from trigger data
int tofmult = 0;
//check if FCS was readout for this event
if(trg){
tofmult = trg->tofMultiplicity();
unsigned short detmask=trg->getTrgDetMask();
printf("TrgDetMask = %4x\n",detmask);
if(! ((detmask >> 30) & 0x1)){ //FCS_ID=30 but detmask is 16bit:O
Expand Down Expand Up @@ -336,7 +333,6 @@ Int_t StFcsQaMaker::Make() {
mEsum[2]->Fill(etot[0]+etot[1]+etot[2]+etot[3]);

if(mDump>0){
int oldid=-1;
for (int i=0; i<nhit; i++){
int id = hits[i]->id();
int ehp = hits[i]->ehp();
Expand All @@ -357,7 +353,6 @@ Int_t StFcsQaMaker::Make() {
int max=0, min=4000;
for(int j=0; j<ntb; j++){
unsigned int adc=hits[i]->adc(j);
unsigned int tb =hits[i]->timebin(j);
if(adc>max) max=adc;
if(adc<min) min=adc;
printf("%4d ",adc);
Expand Down
2 changes: 1 addition & 1 deletion StRoot/StSpinPool/StFmsTriggerMaker/Crate.hh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ static inline unsigned long long bswap_64(unsigned long long x) {

using namespace std;

static const char* crateNames[] = { 0, "L1", "BC1", "MXQ", "MIX", "BCW", "BCE", "FEQ", "BBC", "BBQ", "FMS", "QT1", "QT2", "QT3", "QT4" };
//static const char* crateNames[] = { 0, "L1", "BC1", "MXQ", "MIX", "BCW", "BCE", "FEQ", "BBC", "BBQ", "FMS", "QT1", "QT2", "QT3", "QT4" };

// L1 crate
const int TF201_BASE_ADDRESS = 0x10000000;
Expand Down
3 changes: 1 addition & 2 deletions StRoot/StSpinPool/StFmsTriggerMaker/StFmsBitCheckMaker.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ void printCount(int id, const char* name, unsigned int n[MAXDT][4][32][4], int r
printf("\n");
printf("%8d %15s Mismatch\% = ",run,name);
int dt=MAXD;
int d=dt-MAXD;
float mm=float(nt[dt]-ng[dt])/float(nt[dt])*100.0;
printf("%6.3f ",mm);
MM[dt][id]=mm;
Expand Down Expand Up @@ -285,7 +284,7 @@ int StFmsBitCheckMaker::Make(){
if(! (cratemask>>QT4_CONF_NUM) & 0x1) return kStOK;

static int dbc0 = -999;
unsigned long long bxinghi,bxing1,bxinglo,bx,bxdiff;
unsigned long long bxinghi,bxing1,bxinglo,bx;
bxinghi = td->bcData(3);
bxing1 = td->bcData(10);
bxinglo = (bxing1 << 16) + td->bcData(11);
Expand Down
3 changes: 1 addition & 2 deletions StRoot/StSpinPool/StWalgo2011/St2011W_EacessMuDst.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ St2011WMaker::accessETOW(){
}

wEve->etow.etowIn=1; //tag usable ETOW data
const char *maxIdName=0;
double maxADC=0,adcSum=0;
int maxSec=-1,maxSub=-1,maxEta=-1;

Expand Down Expand Up @@ -151,7 +150,7 @@ St2011WMaker::accessETOW(){
wEve->etow.ene[isec*mxEtowSub+isub][ieta]=ene;
wEve->etow.stat[isec*mxEtowSub+isub][ieta]=0;

if(maxADC<adc) { maxIdName=x->name; maxADC=adc; maxSec=isec; maxSub=isub; maxEta=ieta;}
if(maxADC<adc) { maxADC=adc; maxSec=isec; maxSub=isub; maxEta=ieta;}
adcSum+=adc;

}
Expand Down
4 changes: 2 additions & 2 deletions StRoot/StSpinPool/StWalgo2011/St2011W_Ealgo.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ St2011WMaker::analyzeESMD(){
assert(T.cluster.nTower>0); // internal logical error

//id of strips pointed by prim and glob tracks in each plane
int hitStrip[2]={-1,-1}; int hitStripGlob[2]={-1,-1};
int hitStrip[2]={-1,-1};

int isec=T.pointTower.iPhi/mxEtowSub;
int layer[2]={((isec+2)%3) +1, (isec%3) +1};
Expand Down Expand Up @@ -364,7 +364,7 @@ St2011WMaker::analyzeESMD(){
T.hitSector=sectorId;
T.esmdGlobStrip[iuv]=stripPtrGlob->stripStructId.stripId-stripId;
T.esmdDca[iuv]=dca; T.esmdDcaGlob[iuv]=dcaGlob;
hitStrip[iuv]=stripId; hitStripGlob[iuv]=stripPtrGlob->stripStructId.stripId;
hitStrip[iuv]=stripId;

// set integration range for smd energy
int str1=stripId - parE_nSmdStrip; if(str1<1) str1=1;
Expand Down
Loading

0 comments on commit f0d560d

Please sign in to comment.