ATLAS Offline Software
Loading...
Searching...
No Matches
LATOMEMapping.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
7#include "ByteStreamData/RawEvent.h" //for OFFLINE_FRAGMENTS_NAMESPACE
8#include "GaudiKernel/MsgStream.h"
9#include <iostream>
10#include <fstream>
11
12
13using namespace OFFLINE_FRAGMENTS_NAMESPACE;
14
15typedef std::map<int, HWIdentifier> latome_map;
16
17void LATOMEMapping::fill(latome_map& toFill, const std::string& inputfile,
18 MsgStream& log) {
19 std::ifstream ifs(inputfile);
20 if (ifs.fail()) log << MSG::ERROR << "Fail to read" << inputfile << endmsg;
21 int value, key;
22 while (ifs >> value >> key) {
23 if (value != -999) toFill[key] = HWIdentifier(value);
24 }
25}
#define endmsg
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, const std::string &inputfile, MsgStream &log)