UPIDConverter.h 814 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #ifndef UPIDCONVERTER_H
  2. #define UPIDCONVERTER_H
  3. // C++ headers
  4. #include <map>
  5. // ROOT headers
  6. #include "TNamed.h"
  7. //_________________
  8. class UPIDConverter : public TNamed {
  9. public:
  10. typedef enum {
  11. ePDG = -1,
  12. ePluto,
  13. eUrQMD,
  14. eWerner
  15. } EConvention;
  16. UPIDConverter();
  17. Int_t GetPDGCode(const Int_t pid, const EConvention pidType);
  18. static UPIDConverter* Instance();
  19. private:
  20. // We should use 'EConvention' as the map key type, however this confused rootcint.
  21. // For the time being use UInt_t instead, hopefully fix this later (FIXME).
  22. typedef std::map<UInt_t, std::map<Int_t, Int_t> > ConversionTableMap;
  23. void LoadConversionTable(const EConvention pidType);
  24. ConversionTableMap fConversionTables;
  25. static UPIDConverter* fgInstance;
  26. ClassDef(UPIDConverter, 0);
  27. };
  28. #endif