ATLAS Offline Software
LATOMEMapping.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 using namespace OFFLINE_FRAGMENTS_NAMESPACE;
8 
9 typedef std::map<int, HWIdentifier> latome_map;
10 
11 void add_to_map(latome_map* map, int value, int key) {
12  HWIdentifier identifier(value);
13  (*map)[key] = identifier;
14 }
15 
16 void LATOMEMapping::fill(latome_map *toFill, std::string inputfile) {
17  std::ifstream ifs(inputfile);
18  if (ifs.fail()) std::cout << "Fail to read" << inputfile << std::endl;
19  int value, key;
20  while (ifs >> value >> key) {
21  if (value != -999) add_to_map(toFill, value, key);
22  }
23 }
OFFLINE_FRAGMENTS_NAMESPACE
Definition: RawEvent.h:22
LATOMEMapping.h
Tool to get LATOME SC and SCID mapping file and fill std::map variable with it.
athena.value
value
Definition: athena.py:122
xAOD::identifier
identifier
Definition: UncalibratedMeasurement_v1.cxx:15
latome_map
std::map< int, HWIdentifier > latome_map
Definition: LATOMEMapping.cxx:9
add_to_map
void add_to_map(latome_map *map, int value, int key)
Definition: LATOMEMapping.cxx:11
LATOMEMapping::fill
static void fill(std::map< int, HWIdentifier > *toFill, std::string inputfile)
Definition: LATOMEMapping.cxx:16
FullCPAlgorithmsTest_CA.inputfile
dictionary inputfile
Definition: FullCPAlgorithmsTest_CA.py:59
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37