From e6bcb23fee8b220d7ad4220a37bdb8863f70df41 Mon Sep 17 00:00:00 2001 From: "Stephen A. Wood" <saw@jlab.org> Date: Thu, 26 Sep 2013 15:24:05 -0400 Subject: [PATCH] .h file cleanup. Fix indentation, remove some commented lines. --- src/THcDCHit.h | 14 +++++------ src/THcDCLookupTTDConv.h | 4 +-- src/THcDCTrack.h | 51 ++++++++++++++++++-------------------- src/THcDCWire.h | 2 +- src/THcDriftChamber.h | 15 ----------- src/THcDriftChamberPlane.h | 4 +-- src/THcHitList.h | 4 +-- src/THcRawDCHit.h | 8 +++--- src/THcSpacePoint.h | 6 ++--- 9 files changed, 45 insertions(+), 63 deletions(-) diff --git a/src/THcDCHit.h b/src/THcDCHit.h index c0bbc7b..80302bd 100644 --- a/src/THcDCHit.h +++ b/src/THcDCHit.h @@ -16,13 +16,13 @@ class THcDCHit : public TObject { public: - THcDCHit( THcDCWire* wire=NULL, Int_t rawtime=0, Double_t time=0.0, - THcDriftChamberPlane* wp=0) : - fWire(wire), fRawTime(rawtime), fTime(time), fWirePlane(wp), + THcDCHit( THcDCWire* wire=NULL, Int_t rawtime=0, Double_t time=0.0, + THcDriftChamberPlane* wp=0) : + fWire(wire), fRawTime(rawtime), fTime(time), fWirePlane(wp), fDist(0.0), ftrDist(kBig) { - ConvertTimeToDist(); - fCorrected = 0; - } + ConvertTimeToDist(); + fCorrected = 0; + } virtual ~THcDCHit() {} virtual Double_t ConvertTimeToDist(); @@ -74,7 +74,7 @@ protected: THcDriftChamber* fChamber; //! Pointer to parent wire plane - private: +private: THcDCHit( const THcDCHit& ); THcDCHit& operator=( const THcDCHit& ); diff --git a/src/THcDCLookupTTDConv.h b/src/THcDCLookupTTDConv.h index b0091ae..95623b1 100644 --- a/src/THcDCLookupTTDConv.h +++ b/src/THcDCLookupTTDConv.h @@ -13,8 +13,8 @@ class THcDCLookupTTDConv : public THcDCTimeToDistConv{ public: - THcDCLookupTTDConv(Double_t T0, Double_t MaxDriftDistance, Double_t BinSize, - Int_t NumBins, Double_t* Table); + THcDCLookupTTDConv(Double_t T0, Double_t MaxDriftDistance, Double_t BinSize, + Int_t NumBins, Double_t* Table); virtual ~THcDCLookupTTDConv(); diff --git a/src/THcDCTrack.h b/src/THcDCTrack.h index 4c263a4..a9b84c6 100644 --- a/src/THcDCTrack.h +++ b/src/THcDCTrack.h @@ -56,34 +56,31 @@ public: // TObject functions redefined virtual void Clear( Option_t* opt="" ); - protected: - Int_t fnSP; /* Number of space points in this track */ - /* Should we have a list of pointers to space points - instead of their indices? */ - // Int_t fspID[10]; /* List of space points in this track */ - THcSpacePoint* fSp[10]; /* List of space points in this track */ +protected: + Int_t fnSP; /* Number of space points in this track */ + THcSpacePoint* fSp[10]; /* List of space points in this track */ - Int_t fNHits; - Int_t fNfree; /* Number of degrees of freedom */ - struct Hit { - // This is the same structure as in THcSpacePoint. Can we not - // duplicate this? - THcDCHit* dchit; - Double_t distCorr; - Int_t lr; - }; - std::vector<Hit> fHits; /* List of hits for this track */ - //std::vector<THcDCHit*> fHits; /* List of hits for this track */ - std::vector<Double_t> fCoords; /* Coordinate on each plane */ - std::vector<Double_t> fResiduals; /* Residual on each plane */ - std::vector<Double_t> fDoubleResiduals; /* Residual on each plane for single stub mode */ - Double_t fX_fp, fY_fp, fZ_fp; - Double_t fXp_fp, fYp_fp; - Double_t fChi2_fp; - - virtual void AddHit(THcDCHit * hit, Double_t dist, Int_t lr); - - private: + Int_t fNHits; + Int_t fNfree; /* Number of degrees of freedom */ + struct Hit { + // This is the same structure as in THcSpacePoint. Can we not + // duplicate this? + THcDCHit* dchit; + Double_t distCorr; + Int_t lr; + }; + std::vector<Hit> fHits; /* List of hits for this track */ + //std::vector<THcDCHit*> fHits; /* List of hits for this track */ + std::vector<Double_t> fCoords; /* Coordinate on each plane */ + std::vector<Double_t> fResiduals; /* Residual on each plane */ + std::vector<Double_t> fDoubleResiduals; /* Residual on each plane for single stub mode */ + Double_t fX_fp, fY_fp, fZ_fp; + Double_t fXp_fp, fYp_fp; + Double_t fChi2_fp; + + virtual void AddHit(THcDCHit * hit, Double_t dist, Int_t lr); + +private: // Hide copy ctor and op= THcDCTrack( const THcDCTrack& ); THcDCTrack& operator=( const THcDCTrack& ); diff --git a/src/THcDCWire.h b/src/THcDCWire.h index 7f2ab5b..0e3ce6d 100644 --- a/src/THcDCWire.h +++ b/src/THcDCWire.h @@ -15,7 +15,7 @@ class THcDCWire : public TObject { public: THcDCWire( Int_t num=0, Double_t pos=0.0, Double_t offset=0.0, - THcDCTimeToDistConv* ttd=NULL ) : + THcDCTimeToDistConv* ttd=NULL ) : fNum(num), fFlag(0), fPos(pos), fTOffset(offset), fTTDConv(ttd) {} virtual ~THcDCWire() {} diff --git a/src/THcDriftChamber.h b/src/THcDriftChamber.h index 1e507bb..d9e1afa 100644 --- a/src/THcDriftChamber.h +++ b/src/THcDriftChamber.h @@ -115,21 +115,6 @@ protected: Int_t* plusminus, Double_t* stub); std::vector<THcDCHit*> fHits; /* All hits for this chamber */ - // A simple structure until we figure out what we are doing. -#if 0 - struct SpacePoint { - Double_t x; - Double_t y; - Int_t nhits; - Int_t ncombos; - // THcDCHit* hits[MAX_HITS_PER_POINT]; - std::vector<THcDCHit*> hits; - Double_t stub[4]; - void Clear(Option_t* opt="") {nhits=0;ncombos=0;hits.clear();}; - SpacePoint() {nhits=0;ncombos=0;hits.clear();}; - void SetXY(Double_t xa, Double_t ya) {x = xa; y = ya;}; - }; -#endif TClonesArray *fSpacePoints; Int_t fNSpacePoints; Int_t fEasySpacePoint; /* This event is an easy space point */ diff --git a/src/THcDriftChamberPlane.h b/src/THcDriftChamberPlane.h index 4213b73..d6aa10c 100644 --- a/src/THcDriftChamberPlane.h +++ b/src/THcDriftChamberPlane.h @@ -26,7 +26,7 @@ class THcHodoscope; class THcDriftChamberPlane : public THaSubDetector { - public: +public: THcDriftChamberPlane( const char* name, const char* description, Int_t planenum, THaDetectorBase* parent = NULL); virtual ~THcDriftChamberPlane(); @@ -68,7 +68,7 @@ class THcDriftChamberPlane : public THaSubDetector { Double_t* GetPlaneCoef() { return fPlaneCoef; } THcDriftChamberPlane(); // for ROOT I/O - protected: +protected: TClonesArray* fParentHitList; diff --git a/src/THcHitList.h b/src/THcHitList.h index d96383b..494866b 100644 --- a/src/THcHitList.h +++ b/src/THcHitList.h @@ -20,7 +20,7 @@ using namespace std; class THcHitList { - public: +public: virtual ~THcHitList(); @@ -39,7 +39,7 @@ class THcHitList { THaDetMap* fdMap; - protected: +protected: ClassDef(THcHitList,0) }; diff --git a/src/THcRawDCHit.h b/src/THcRawDCHit.h index 7aca52b..4eb2c55 100644 --- a/src/THcRawDCHit.h +++ b/src/THcRawDCHit.h @@ -7,9 +7,9 @@ class THcRawDCHit : public THcRawHit { - public: +public: - THcRawDCHit(Int_t plane=0, Int_t counter=0) : THcRawHit(plane, counter), + THcRawDCHit(Int_t plane=0, Int_t counter=0) : THcRawHit(plane, counter), fNHits(0) { } THcRawDCHit& operator=( const THcRawDCHit& ); @@ -27,9 +27,9 @@ class THcRawDCHit : public THcRawHit { Int_t fNHits; Int_t fTDC[MAXHITS]; - protected: +protected: - private: +private: ClassDef(THcRawDCHit, 0); // DC hit class }; diff --git a/src/THcSpacePoint.h b/src/THcSpacePoint.h index 04307e1..bf63699 100644 --- a/src/THcSpacePoint.h +++ b/src/THcSpacePoint.h @@ -14,8 +14,8 @@ class THcSpacePoint : public TObject { public: - THcSpacePoint(Int_t nhits=0, Int_t ncombos=0) : - fNHits(nhits), fNCombos(ncombos) { + THcSpacePoint(Int_t nhits=0, Int_t ncombos=0) : + fNHits(nhits), fNCombos(ncombos) { fHits.clear(); } virtual ~THcSpacePoint() {} @@ -72,7 +72,7 @@ public: // we need figure out how to avoid confusion between number and index. Int_t fNChamber; - protected: +protected: Double_t fX; Double_t fY; -- GitLab