PandaRoot
FsmDetTypes.h
Go to the documentation of this file.
1 //****************************************************************************
2 //* This file is part of PandaRoot. *
3 //* *
4 //* PandaRoot is distributed under the terms of the *
5 //* GNU General Public License (GPL) version 3, *
6 //* copied verbatim in the file "LICENSE". *
7 //* *
8 //* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9 //* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10 //* The authors are listed in the file "AUTHORS". *
11 //****************************************************************************
12 
13 //==========================================================================
14 // File and Version Information:
15 // $Id: FsmDetTypes.hh,v 1.4 2006/10/05 14:05:53 aida Exp $
16 //
17 //--------------------------------------------------------------------------
18 // Description:
19 // this structure is helpful for the easy treatment of the individual subdetectors.
20 // Attention: the correct order for "enum" and "FsmDetName::name" is mandatory"
21 //
22 // Author List:
23 // Bertram Kopf (Original author)
24 //
25 //
26 //==========================================================================
27 
28 #ifndef FSMDETTYPES_H
29 #define FSMDETTYPES_H
30 
31 struct FsmDetEnum {
32  enum {
33  Mvd = 0,
35  Tpc,
36  Stt,
37  Tof,
38  Drc,
43  Muo,
55  }; // attention: if you want to add/remove detectors don't forget to modify FsmDetName; keep an eye on the correct order!!!
56 };
57 
58 struct FsmDetName {
59  static const std::string &name(unsigned int t)
60  {
61  static std::string detName[FsmDetEnum::numSystems + 1] = {"Mvd", "Mvd2", "Tpc", "Stt", "Tof", "Drc", "EmcBarrel", "EmcBwCap", "EmcFwCap", "EmcFS", "Muo",
62  "Dch1", "Dch2", "Dch3", "Dch4", "Dch5", "Dch6", "Dch7", "Dch8", "FwkRch", "CmpDet", "unknown"};
63  if (t >= FsmDetEnum::numSystems)
65  return detName[t];
66  }
67 };
68 
69 #endif
static const std::string & name(unsigned int t)
Definition: FsmDetTypes.h:59