From 84aac932ca789cccc36d84a8d58985e03a1fed6d Mon Sep 17 00:00:00 2001 From: hristov Date: Fri, 7 Apr 2006 15:29:12 +0000 Subject: [PATCH] Coding conventions (Ivana) --- MUON/AliMUONDigitizerV3.cxx | 4 ++-- MUON/AliMUONRawWriter.cxx | 10 +++++----- MUON/AliMUONSt345SlatSegmentationV2.cxx | 7 +++++++ MUON/AliMUONTrigger.cxx | 18 +++++++++--------- MUON/AliMUONTriggerDecisionV1.cxx | 4 ++-- MUON/AliMUONTriggerDecisionV1.h | 2 +- MUON/AliMUONTriggerSegmentationV2.cxx | 3 ++- MUON/mapping/AliMpPCB.h | 6 +++--- MUON/mapping/AliMpSt345Reader.cxx | 22 +++++++++++----------- MUON/mapping/AliMpTrigger.cxx | 6 +++--- MUON/mapping/AliMpTriggerReader.cxx | 24 ++++++++++++------------ 11 files changed, 57 insertions(+), 49 deletions(-) diff --git a/MUON/AliMUONDigitizerV3.cxx b/MUON/AliMUONDigitizerV3.cxx index aca71413fb9..8dbf71c15e0 100644 --- a/MUON/AliMUONDigitizerV3.cxx +++ b/MUON/AliMUONDigitizerV3.cxx @@ -600,9 +600,9 @@ AliMUONDigitizerV3::GenerateNoisyDigitsForOneCathode(Int_t detElemId, Int_t cath Int_t maxIx = seg->MaxPadIndexX(); Int_t maxIy = seg->MaxPadIndexY(); - static const Double_t probToBeOutsideNsigmas = 1 - TMath::Erf(fgkNSigmas/TMath::Sqrt(2.0)); + static const Double_t kProbToBeOutsideNsigmas = 1 - TMath::Erf(fgkNSigmas/TMath::Sqrt(2.0)); - Int_t nofNoisyPads = TMath::Nint(probToBeOutsideNsigmas*nofPads); + Int_t nofNoisyPads = TMath::Nint(kProbToBeOutsideNsigmas*nofPads); if ( !nofNoisyPads ) return; nofNoisyPads = diff --git a/MUON/AliMUONRawWriter.cxx b/MUON/AliMUONRawWriter.cxx index f328bc32593..eee209aa8b5 100644 --- a/MUON/AliMUONRawWriter.cxx +++ b/MUON/AliMUONRawWriter.cxx @@ -236,7 +236,7 @@ Int_t AliMUONRawWriter::WriteTrackerDDL(Int_t iCh) fTrackerTimer.Start(kFALSE); - static const Int_t MAXADC = (1<<12)-1; // We code the charge on a 12 bits ADC. + static const Int_t kMAXADC = (1<<12)-1; // We code the charge on a 12 bits ADC. // resets TClonesArray* muonDigits = 0; fSubEventArray->Delete(); @@ -285,13 +285,13 @@ Int_t AliMUONRawWriter::WriteTrackerDDL(Int_t iCh) padX = digit->PadX(); padY = digit->PadY(); charge = digit->ADC(); - if ( charge > MAXADC ) + if ( charge > kMAXADC ) { // This is most probably an error in the digitizer (which should insure - // the adc is below MAXADC), so make it a (non-fatal) error indeed. + // the adc is below kMAXADC), so make it a (non-fatal) error indeed. AliError(Form("adc value %d above %x. Setting to %x", - charge,MAXADC,MAXADC)); - charge = MAXADC; + charge,kMAXADC,kMAXADC)); + charge = kMAXADC; } cathode = digit->Cathode(); detElemId = digit->DetElemId(); diff --git a/MUON/AliMUONSt345SlatSegmentationV2.cxx b/MUON/AliMUONSt345SlatSegmentationV2.cxx index fd89e9d0beb..8a3be728e4f 100644 --- a/MUON/AliMUONSt345SlatSegmentationV2.cxx +++ b/MUON/AliMUONSt345SlatSegmentationV2.cxx @@ -22,6 +22,13 @@ // the mapping package +// ------------------------------------- +// Class AliMUONSt345SlatSegmentation +// ------------------------------------- +// Segmentation for MUON slat stations using +// the mapping package + + #include "AliMUONSt345SlatSegmentationV2.h" #include "AliMUONConstants.h" diff --git a/MUON/AliMUONTrigger.cxx b/MUON/AliMUONTrigger.cxx index 00e7e659e5b..29b03f2be2b 100644 --- a/MUON/AliMUONTrigger.cxx +++ b/MUON/AliMUONTrigger.cxx @@ -74,15 +74,15 @@ void AliMUONTrigger::Trigger() AliRunLoader* runLoader = gAlice->GetRunLoader(); - AliLoader * MUONLoader = runLoader->GetLoader("MUONLoader"); - MUONLoader->LoadDigits("READ"); + AliLoader * muonLoader = runLoader->GetLoader("MUONLoader"); + muonLoader->LoadDigits("READ"); // Creating MUON data container - AliMUONData* MUONData = new AliMUONData(MUONLoader,"MUON","MUON"); - MUONData->SetTreeAddress("D"); - MUONData->GetDigits(); + AliMUONData* muonData = new AliMUONData(muonLoader,"MUON","MUON"); + muonData->SetTreeAddress("D"); + muonData->GetDigits(); Int_t idebug = 1; // Creating MUONTriggerDecision - AliMUONTriggerDecision* decision = new AliMUONTriggerDecision(MUONLoader ,idebug,MUONData); + AliMUONTriggerDecision* decision = new AliMUONTriggerDecision(muonLoader ,idebug,muonData); AliMUONDigit * mDigit; Int_t tracks[10]; Int_t charges[10]; @@ -90,10 +90,10 @@ void AliMUONTrigger::Trigger() for(Int_t ichamber=10; ichamber<14; ichamber++) { Int_t idigit, ndigits; - ndigits = (Int_t) MUONData->Digits(ichamber)->GetEntriesFast(); + ndigits = (Int_t) muonData->Digits(ichamber)->GetEntriesFast(); // printf(">>> Chamber Cathode ndigits %d %d %d\n",ichamber,icathode,ndigits); for(idigit=0; idigit(MUONData->Digits(ichamber)->At(idigit)); + mDigit = static_cast(muonData->Digits(ichamber)->At(idigit)); digits[0] = mDigit->PadX(); digits[1] = mDigit->PadY(); digits[2] = mDigit->Cathode(); @@ -108,7 +108,7 @@ void AliMUONTrigger::Trigger() decision->AddDigit(ichamber, tracks, charges, digits, digitindex ); } // loop on digits } // loop on chambers - MUONData->ResetDigits(); + muonData->ResetDigits(); decision->Trigger(); decision->ClearDigits(); diff --git a/MUON/AliMUONTriggerDecisionV1.cxx b/MUON/AliMUONTriggerDecisionV1.cxx index 189e8b519be..a97a3236e43 100644 --- a/MUON/AliMUONTriggerDecisionV1.cxx +++ b/MUON/AliMUONTriggerDecisionV1.cxx @@ -1631,7 +1631,7 @@ void AliMUONTriggerDecisionV1::DigitFiredCircuit(Int_t circuit, Int_t cathode, } //_______________________________________________________________________ -const Int_t AliMUONTriggerDecisionV1::CircuitSortedAsBoard[234]={ +const Int_t AliMUONTriggerDecisionV1::fgkCircuitSortedAsBoard[234]={ 911, 811, 812, 711, 712, 611, 612, 613, 411, 412, 413, 311, 312, 211, 212, 111, 921, 821, 822, 721, 722, 621, 622, 623, 624, 521, 522, 523, 524, 421, 422, 423, 424, 321, 322, 221, 222, 121, 931, 831, 832, 731, 732, 631, 632, 633, 634, 531, 532, 533, 534, 431, 432, 433, 434, 331, 332, 231, 232, 131, @@ -1675,7 +1675,7 @@ Int_t AliMUONTriggerDecisionV1::CircuitNumber(Int_t idCircuit) const { //_______________________________________________________________________ Int_t AliMUONTriggerDecisionV1::Board2Circuit(Int_t iboard) const { // returns Circuit number corresponding to iboard - Int_t idCircuit = CircuitSortedAsBoard[iboard]; + Int_t idCircuit = fgkCircuitSortedAsBoard[iboard]; return CircuitNumber(idCircuit); } diff --git a/MUON/AliMUONTriggerDecisionV1.h b/MUON/AliMUONTriggerDecisionV1.h index f56a4fd7179..c4a6672831f 100644 --- a/MUON/AliMUONTriggerDecisionV1.h +++ b/MUON/AliMUONTriggerDecisionV1.h @@ -72,7 +72,7 @@ class AliMUONTriggerDecisionV1 : public TTask Int_t Board2Circuit(Int_t iboard) const; Int_t CircuitNumber(Int_t idCircuit) const; Int_t ModuleNumber(Int_t idModule) const; - static const Int_t CircuitSortedAsBoard[234]; // circuit Id. number + static const Int_t fgkCircuitSortedAsBoard[234]; // circuit Id. number ClassDef(AliMUONTriggerDecisionV1,1) // Trigger Decision class diff --git a/MUON/AliMUONTriggerSegmentationV2.cxx b/MUON/AliMUONTriggerSegmentationV2.cxx index ec42d8ed967..ac76dce7600 100644 --- a/MUON/AliMUONTriggerSegmentationV2.cxx +++ b/MUON/AliMUONTriggerSegmentationV2.cxx @@ -385,7 +385,8 @@ AliMUONTriggerSegmentationV2::GetPadGlo2Loc(Int_t ixGlo, Int_t iyGlo, //_____________________________________________________________________________ void -AliMUONTriggerSegmentationV2::GiveTestPoints(Int_t&,Float_t*,Float_t*) const +AliMUONTriggerSegmentationV2::GiveTestPoints(Int_t& /*n*/, + Float_t* /*x*/, Float_t*/*y*/) const { // Not implemented diff --git a/MUON/mapping/AliMpPCB.h b/MUON/mapping/AliMpPCB.h index 60292b4d8c8..3978dde0771 100644 --- a/MUON/mapping/AliMpPCB.h +++ b/MUON/mapping/AliMpPCB.h @@ -64,8 +64,8 @@ class AliMpPCB : public TObject AliMpPCB(const char* id, AliMpMotifSpecial* ms); - AliMpPCB(const AliMpPCB&); - AliMpPCB& operator=(const AliMpPCB&); + AliMpPCB(const AliMpPCB& o); + AliMpPCB& operator=(const AliMpPCB& o); virtual ~AliMpPCB(); @@ -78,7 +78,7 @@ class AliMpPCB : public TObject AliMpPCB* Clone(const TArrayI& manuids, Int_t ixOffset, Double_t xOffset) const; - void Copy(TObject&) const; + void Copy(TObject& o) const; /** Add a motif to this PCB. (ix,iy) are the coordinates of one corner of the motif, in pad-units. Which corner depends on the sign(s) of (ix,iy): diff --git a/MUON/mapping/AliMpSt345Reader.cxx b/MUON/mapping/AliMpSt345Reader.cxx index 251f618adce..39f1592fdda 100644 --- a/MUON/mapping/AliMpSt345Reader.cxx +++ b/MUON/mapping/AliMpSt345Reader.cxx @@ -106,8 +106,8 @@ AliMpSt345Reader::ReadPCB(const char* pcbType) char line[80]; - const TString sizeKeyword("SIZES"); - const TString motifKeyword("MOTIF"); + const TString kSizeKeyword("SIZES"); + const TString kMotifKeyword("MOTIF"); AliMpPCB* pcb = 0; @@ -117,10 +117,10 @@ AliMpSt345Reader::ReadPCB(const char* pcbType) TString sline(line); - if ( sline(0,sizeKeyword.Length()) == sizeKeyword ) + if ( sline(0,kSizeKeyword.Length()) == kSizeKeyword ) { - std::istringstream sin(sline(sizeKeyword.Length(), - sline.Length()-sizeKeyword.Length()).Data()); + std::istringstream sin(sline(kSizeKeyword.Length(), + sline.Length()-kSizeKeyword.Length()).Data()); float padSizeX = 0.0; float padSizeY = 0.0; float pcbSizeX = 0.0; @@ -130,10 +130,10 @@ AliMpSt345Reader::ReadPCB(const char* pcbType) pcb = new AliMpPCB(pcbType,padSizeX,padSizeY,pcbSizeX,pcbSizeY); } - if ( sline(0,motifKeyword.Length()) == motifKeyword ) + if ( sline(0,kMotifKeyword.Length()) == kMotifKeyword ) { - std::istringstream sin(sline(motifKeyword.Length(), - sline.Length()-motifKeyword.Length()).Data()); + std::istringstream sin(sline(kMotifKeyword.Length(), + sline.Length()-kMotifKeyword.Length()).Data()); TString sMotifType; int ix; int iy; @@ -172,7 +172,7 @@ AliMpSt345Reader::ReadSlat(const char* slatType, AliMpPlaneType planeType) char line[80]; - const TString pcbKeyword("PCB"); + const TString kpcbKeyword("PCB"); AliMpSlat* slat = new AliMpSlat(slatType, planeType); @@ -182,9 +182,9 @@ AliMpSt345Reader::ReadSlat(const char* slatType, AliMpPlaneType planeType) TString sline(AliMpHelper::Normalize(line)); - if ( sline(0,pcbKeyword.Length()) == pcbKeyword ) + if ( sline(0,kpcbKeyword.Length()) == kpcbKeyword ) { - TString tmp(sline(pcbKeyword.Length()+1,sline.Length()-pcbKeyword.Length())); + TString tmp(sline(kpcbKeyword.Length()+1,sline.Length()-kpcbKeyword.Length())); Ssiz_t blankPos = tmp.First(' '); if ( blankPos < 0 ) { diff --git a/MUON/mapping/AliMpTrigger.cxx b/MUON/mapping/AliMpTrigger.cxx index 6996b433dd3..c40e3c87d8e 100644 --- a/MUON/mapping/AliMpTrigger.cxx +++ b/MUON/mapping/AliMpTrigger.cxx @@ -78,11 +78,11 @@ AliMpTrigger::AdoptLayer(AliMpSlat* slat) // Check that we keep our size constant. - const Double_t precision = 1E-3; + const Double_t kPrecision = 1E-3; if ( GetSize() > 0 && - ( !::IsEqual(slat->DX(),fDX,precision) || - !::IsEqual(slat->DY(),fDY,precision) ) + ( !::IsEqual(slat->DX(),fDX,kPrecision) || + !::IsEqual(slat->DY(),fDY,kPrecision) ) ) { AliError(Form("In %s trying to add a layer (%e,%e) of a different size than " diff --git a/MUON/mapping/AliMpTriggerReader.cxx b/MUON/mapping/AliMpTriggerReader.cxx index ebe9d22840d..836e13742a8 100644 --- a/MUON/mapping/AliMpTriggerReader.cxx +++ b/MUON/mapping/AliMpTriggerReader.cxx @@ -597,9 +597,9 @@ AliMpTriggerReader::ReadPCB(const char* pcbType) char line[80]; - const TString sizeKeyword("SIZES"); - const TString motifKeyword("MOTIF"); - const TString motifSpecialKeyword("SPECIAL_MOTIF"); + const TString kSizeKeyword("SIZES"); + const TString kMotifKeyword("MOTIF"); + const TString kMotifSpecialKeyword("SPECIAL_MOTIF"); AliMpPCB* pcb = 0; @@ -609,10 +609,10 @@ AliMpTriggerReader::ReadPCB(const char* pcbType) TString sline(line); - if ( sline(0,sizeKeyword.Length()) == sizeKeyword ) + if ( sline(0,kSizeKeyword.Length()) == kSizeKeyword ) { - std::istringstream sin(sline(sizeKeyword.Length(), - sline.Length()-sizeKeyword.Length()-1).Data()); + std::istringstream sin(sline(kSizeKeyword.Length(), + sline.Length()-kSizeKeyword.Length()-1).Data()); float padSizeX = 0.0; float padSizeY = 0.0; float pcbSizeX = 0.0; @@ -623,10 +623,10 @@ AliMpTriggerReader::ReadPCB(const char* pcbType) pcbSizeX*scale,pcbSizeY*scale); } - if ( sline(0,motifSpecialKeyword.Length()) == motifSpecialKeyword ) + if ( sline(0,kMotifSpecialKeyword.Length()) == kMotifSpecialKeyword ) { - std::istringstream sin(sline(motifSpecialKeyword.Length(), - sline.Length()-motifSpecialKeyword.Length()).Data()); + std::istringstream sin(sline(kMotifSpecialKeyword.Length(), + sline.Length()-kMotifSpecialKeyword.Length()).Data()); TString sMotifSpecial; TString sMotifType; sin >> sMotifSpecial >> sMotifType; @@ -639,10 +639,10 @@ AliMpTriggerReader::ReadPCB(const char* pcbType) pcb = new AliMpPCB(pcbType,specialMotif); } - if ( sline(0,motifKeyword.Length()) == motifKeyword ) + if ( sline(0,kMotifKeyword.Length()) == kMotifKeyword ) { - std::istringstream sin(sline(motifKeyword.Length(), - sline.Length()-motifKeyword.Length()).Data()); + std::istringstream sin(sline(kMotifKeyword.Length(), + sline.Length()-kMotifKeyword.Length()).Data()); TString sMotifType; int ix; int iy; -- 2.43.0