1234567891011121314151617181920212223242526272829303132333435363738394041 |
- #ifndef UPIDCONVERTER_H
- #define UPIDCONVERTER_H
- // C++ headers
- #include <map>
- // ROOT headers
- #include "TNamed.h"
- //_________________
- class UPIDConverter : public TNamed {
- public:
- typedef enum {
- ePDG = -1,
- ePluto,
- eUrQMD,
- eWerner
- } EConvention;
- UPIDConverter();
- Int_t GetPDGCode(const Int_t pid, const EConvention pidType);
- static UPIDConverter* Instance();
- private:
- // We should use 'EConvention' as the map key type, however this confused rootcint.
- // For the time being use UInt_t instead, hopefully fix this later (FIXME).
- typedef std::map<UInt_t, std::map<Int_t, Int_t> > ConversionTableMap;
- void LoadConversionTable(const EConvention pidType);
- ConversionTableMap fConversionTables;
- static UPIDConverter* fgInstance;
- ClassDef(UPIDConverter, 0);
- };
- #endif
|