ATLAS Offline Software
Loading...
Searching...
No Matches
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
7using namespace OFFLINE_FRAGMENTS_NAMESPACE;
8
9typedef std::map<int, HWIdentifier> latome_map;
10
11void add_to_map(latome_map* map, int value, int key) {
12 HWIdentifier identifier(value);
13 (*map)[key] = identifier;
14}
15
16void 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}
void add_to_map(latome_map *map, int value, int key)
std::map< int, HWIdentifier > latome_map
Tool to get LATOME SC and SCID mapping file and fill std::map variable with it.
static void fill(std::map< int, HWIdentifier > *toFill, std::string inputfile)
STL class.