ATLAS Offline Software
Loading...
Searching...
No Matches
RegionDataFromFile.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef MUONCALIB_REGIONDATAFROMFILE_H
6#define MUONCALIB_REGIONDATAFROMFILE_H
7
8#include <iosfwd>
9#include <vector>
10
11namespace MuonCalib {
12
16 struct MultilayerId {
17 MultilayerId() = default;
18 MultilayerId(int st, int e, int p, int m) : stName(st), eta(e), phi(p), ml(m) {}
19 int stName{-1};
20 int eta{-1};
21 int phi{-1};
22 int ml{-1};
23 };
24
29 public:
31 typedef std::vector<id_type> id_vec;
32
33 public:
36 id_vec getIdentifiers(int regionId) const;
37
39 unsigned int nregions() const;
40
41 void setNRegions(unsigned int nreg) {
42 m_nregions = nreg;
43 m_identifiersPerRegions.resize(nreg);
44 }
45
48 bool addRegion(int regionIndex, const id_vec& ids);
49
51 void clear();
52
53 std::istream& read(std::istream& is);
54 std::ostream& write(std::ostream& os) const;
55
56 private:
57 typedef std::vector<id_vec> id_vec_vec;
58
60 unsigned int m_nregions;
62 };
63
64} // namespace MuonCalib
65
66std::istream& operator>>(std::istream& is, MuonCalib::RegionDataFromFile& data);
67std::ostream& operator<<(std::ostream& os, const MuonCalib::RegionDataFromFile& data);
68
69#endif
char data[hepevt_bytes_allocation_ATLAS]
Definition HepEvt.cxx:11
std::istream & operator>>(std::istream &is, MuonCalib::RegionDataFromFile &data)
std::ostream & operator<<(std::ostream &os, const MuonCalib::RegionDataFromFile &data)
Manages the I/O of the list of multilayers belonging to a calibration region.
std::ostream & write(std::ostream &os) const
std::istream & read(std::istream &is)
unsigned int m_nregions
map containing all identifiers for a given region id
id_vec getIdentifiers(int regionId) const
returns a vector containing all identifiers for the given regionId, returns an empty vector if the re...
void setNRegions(unsigned int nreg)
bool addRegion(int regionIndex, const id_vec &ids)
returns false if the region was already present, nothing is added in that case
unsigned int nregions() const
returns the number of regions
std::vector< id_type > id_vec
std::vector< id_vec > id_vec_vec
CscCalcPed - algorithm that finds the Cathode Strip Chamber pedestals from an RDO.
Holds the station, eta, phi and multilayer Ids for a given multilayer.
MultilayerId(int st, int e, int p, int m)