-
Notifications
You must be signed in to change notification settings - Fork 129
Open
Description
It would be good to structure the source code better.
Suggestions:
- Put the interface headers in an include directory. This nearly all the header files I think.
- Put (and install) the header files in their own directory. For example
include/hcana/HEADER.h. - This leads to use cases like:
#include "hcana/THcParmList.h"
(note this doesn't have to happen in the current source code include directories can be added to compiler flags).
- This header name space then leads to clearer class names. (Using class name prefixes is old fashioned and ignores the namespace feature of C++).
#include "hcana/ParameterList.h"
- Clearer header file and class names leads us finally to functional separation. Perhaps by detector type: (note this is just a suggestion)
#include "hcana/cer/Cherenkov.h"
#include "hcana/cer/CherenkovHit.h"
Here is how it could look:
hcana/include
├── beam
│ ├── BCMCurrent.h
│ ├── RasteredBeam.h
│ ├── Raster.h
│ └── RasterRawHit.h
├── cer
│ ├── Aerogel.h
│ ├── AerogelHit.h
│ ├── Cherenkov.h
│ └── CherenkovHit.h
├── core
│ ├── Analyzer.h
│ ├── ConfigEvtHandler.h
│ ├── DetectorMap.h
│ ├── DummySpectrometer.h
│ ├── Formula.h
│ ├── Globals.h
│ ├── HallCSpectrometer.h
│ ├── HitList.h
│ ├── Interface.h
│ ├── ParmList.h
│ ├── PeriodicReport.h
│ ├── Run.h
│ ├── RunParameters.h
│ └── SignalHit.h
├── dc
│ ├── DC.h
│ ├── DCHit.h
│ ├── DCLookupTTDConv.h
│ ├── DCTimeToDistConv.h
│ ├── DCTrack.h
│ ├── DCWire.h
│ ├── DriftChamber.h
│ └── DriftChamberPlane.h
├── hodo
│ ├── HodoEff.h
│ ├── HodoHit.h
│ ├── Hodoscope.h
│ └── ScintillatorPlane.h
├── phys
├── raw
│ ├── RawAdcHit.h
│ ├── RawDCHit.h
│ ├── RawHit.h
│ ├── RawHodoHit.h
│ ├── RawShowerHit.h
│ └── RawTdcHit.h
├── recon
│ ├── CoinTime.h
│ ├── ExtTarCor.h
│ ├── PrimaryKine.h
│ ├── ReactionPoint.h
│ ├── SecondaryKine.h
│ └── SpacePoint.h
├── scaler
│ ├── Scaler9001.h
│ ├── Scaler9250.h
│ └── ScalerEvtHandler.h
├── shower
│ ├── ShowerArray.h
│ ├── Shower.h
│ ├── ShowerHit.h
│ └── ShowerPlane.h
└── trig
├── TimeSyncEvtHandler.h
├── TrigApp.h
├── TrigDet.h
├── TrigRawHit.h
└── TIBlobModule.h
Again, this is just a suggestion to help others understand the code, and is common practice in C++ projects.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels