Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-04-09 07:49:15

0001 /*
0002  * Copyright (c) 2019 Opticks Team. All Rights Reserved.
0003  *
0004  * This file is part of Opticks
0005  * (see https://bitbucket.org/simoncblyth/opticks).
0006  *
0007  * Licensed under the Apache License, Version 2.0 (the "License"); 
0008  * you may not use this file except in compliance with the License.  
0009  * You may obtain a copy of the License at
0010  *
0011  *   http://www.apache.org/licenses/LICENSE-2.0
0012  *
0013  * Unless required by applicable law or agreed to in writing, software 
0014  * distributed under the License is distributed on an "AS IS" BASIS, 
0015  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  
0016  * See the License for the specific language governing permissions and 
0017  * limitations under the License.
0018  */
0019 
0020 // TEST=SAbbrevTest SAbbrev=INFO om-t
0021 
0022 #include <string>
0023 #include <vector>
0024 
0025 #include "SAbbrev.hh"
0026 
0027 #include "OPTICKS_LOG.hh"
0028 
0029 void test_0()
0030 {
0031     LOG(info); 
0032     std::vector<std::string> ss = { 
0033         "Acrylic",
0034         "Air", 
0035         "Aluminium",
0036         "Bialkali",
0037         "DeadWater",
0038         "ESR",
0039         "Foam",
0040         "GdDopedLS",
0041         "IwsWater",
0042         "LiquidScintillator",
0043         "MineralOil",
0044         "Nitrogen",
0045         "NitrogenGas",
0046         "Nylon",
0047         "OwsWater",
0048         "PPE",
0049         "PVC",
0050         "Pyrex",
0051         "Rock",
0052         "StainlessSteel",
0053         "Tyvek",
0054         "UnstStainlessSteel",
0055         "Vacuum",
0056         "OpaqueVacuum",
0057         "Water",
0058         "GlassSchottF2"
0059     } ;
0060 
0061     SAbbrev ab(ss);
0062     ab.dump(); 
0063 
0064 }
0065 
0066 void test_1()
0067 {
0068     LOG(info); 
0069     std::vector<std::string> ss = { 
0070         "Acrylic",
0071         "Air", 
0072         "Aluminium",
0073         "Bialkali",
0074         "DeadWater",
0075         "ESR",
0076         "Foam",
0077         "GdDopedLS",
0078         "IwsWater",
0079         "LiquidScintillator",
0080         "MineralOil",
0081         "Nitrogen",
0082         "NitrogenGas",
0083         "Nylon",
0084         "OwsWater",
0085         "PPE",
0086         "PVC",
0087         "Pyrex",
0088         "Rock",
0089         "StainlessSteel",
0090         "Tyvek",
0091         "UnstStainlessSteel",
0092         "Vacuum",
0093         "OpaqueVacuum",
0094         "Water",
0095         "GlassSchottF2",
0096         "photocathode",
0097         "photocathode_3inch",
0098         "photocathode_MCP20inch",
0099         "photocathode_MCP8inch",
0100         "photocathode_Ham20inch",
0101         "photocathode_Ham8inch",
0102         "photocathode_HZC9inch",
0103         "G4_STAINLESS-STEEL"
0104     } ;
0105 
0106     SAbbrev ab(ss);
0107     ab.dump(); 
0108 }
0109 
0110 
0111 void test_2()
0112 {
0113     LOG(info); 
0114     std::vector<std::string> ss = {
0115         "PipeSteel",
0116         "PipeStainlessSteel"
0117     };
0118     SAbbrev ab(ss);
0119     ab.dump(); 
0120 }
0121 
0122 void test_3()
0123 {
0124      SAbbrev::FromString(R"LITERAL(
0125 Copper
0126 PipeAl6061
0127 C4F10
0128 PipeAl2219F
0129 VeloStainlessSteel
0130 Vacuum
0131 PipeBeTV56
0132 PipeSteel316LN
0133 PipeBe
0134 Celazole
0135 PipeTitaniumG5
0136 AW7075
0137 PipeAl6082
0138 FutureFibre
0139 Technora
0140 Brass
0141 PipeSteel
0142 BakeOutAerogel
0143 Rich2CarbonFibre
0144 RichSoftIron
0145 Rich1GasWindowQuartz
0146 Kovar
0147 HpdIndium
0148 HpdWindowQuartz
0149 HpdS20PhCathode
0150 HpdChromium
0151 HpdKapton
0152 Supra36Hpd
0153 RichHpdSilicon
0154 RichHpdVacuum
0155 Rich1Nitrogen
0156 Rich1MirrorCarbonFibre
0157 R1RadiatorGas
0158 Rich1MirrorGlassSimex
0159 Rich1Mirror2SupportMaterial
0160 Rich1G10
0161 Rich1PMI
0162 Rich1DiaphramMaterial
0163 Air
0164 )LITERAL")->dump() ; 
0165 
0166 } 
0167 
0168 
0169 
0170 
0171 
0172 
0173 int main(int argc, char** argv )
0174 {
0175     OPTICKS_LOG(argc, argv);
0176  
0177     //test_0(); 
0178     //test_1(); 
0179     //test_2(); 
0180     test_3(); 
0181 
0182     return 0 ; 
0183 }
0184 
0185 /*
0186         "ADTableStainlessSteel": "AS",
0187         "Acrylic": "Ac",
0188         "Air": "Ai",
0189         "Aluminium": "Al",
0190         "Bialkali": "Bk",
0191         "DeadWater": "Dw",
0192         "ESR": "ES",
0193         "Foam": "Fo",
0194         "GdDopedLS": "Gd",
0195         "IwsWater": "Iw",
0196         "LiquidScintillator": "LS",
0197         "MineralOil": "MO",
0198         "Nitrogen": "Ni",
0199         "NitrogenGas": "NG",
0200         "Nylon": "Ny",
0201         "OwsWater": "Ow",
0202         "PPE": "PP",
0203         "PVC": "PV",
0204         "Pyrex": "Py",
0205         "Rock": "Rk",
0206         "StainlessSteel": "SS",
0207         "Tyvek": "Ty",
0208         "UnstStainlessSteel": "US",
0209         "Vacuum": "Vm",
0210         "OpaqueVacuum": "OV",
0211         "Water": "Wt",
0212         "GlassSchottF2": "F2"
0213 */
0214