ATLAS Offline Software
isPrimitive.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 
6 // STL include(s):
7 #include <vector>
8 #include <algorithm>
9 
10 // Local include(s):
11 #include "isPrimitive.h"
12 
13 namespace D3PD {
14 
24  bool isPrimitive( const std::string& type ) {
25 
26  //
27  // Create an internal list of primitive type names. This
28  // only has to be done once.
29  //
30  static const std::vector< std::string > primitives = {
31  // Normal C++ type names:
32  "bool",
33  "char",
34  "unsigned char",
35  "short",
36  "unsigned short",
37  "int",
38  "unsigned int",
39  "long",
40  "unsigned long",
41  "long long",
42  "unsigned long long",
43  "float",
44  "double",
45  // ROOT type names:
46  "Bool_t",
47  "Char_t",
48  "UChar_t",
49  "Short_t",
50  "UShort_t",
51  "Int_t",
52  "UInt_t",
53  "Long_t",
54  "ULong_t",
55  "Long64_t",
56  "ULong64_t",
57  "Float_t",
58  "Double_t",
59  };
60 
61  return ( std::find( primitives.begin(), primitives.end(), type ) ==
62  primitives.end() ? false : true );
63  }
64 
65 } // namespace D3PD
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
D3PD::isPrimitive
bool isPrimitive(const std::string &type)
This function is used in the code generator to determine from a type name if it's a primitive type or...
Definition: isPrimitive.cxx:24
isPrimitive.h
D3PD
Block filler tool for noisy FEB information.
Definition: InnerDetector/InDetMonitoring/InDetGlobalMonitoring/macros/EnhancedPrimaryVertexMonitoring/TrigD3PD/ChainGroup.h:21
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78