ATLAS Offline Software
Loading...
Searching...
No Matches
ISCT_CablingTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef ISCT_CablingTool_h
6#define ISCT_CablingTool_h
14
15//InnerDetector
16//to ensure clients can actually use the conversion constructors, include these here (otherwise could be forward declared)
19
20//Gaudi includes
21#include "GaudiKernel/EventContext.h"
22#include "GaudiKernel/IAlgTool.h"
23
24//standard includes
25#include <cstdint> //C++11
26#include <vector>
27
28//fwd declarations
29class Identifier;
30class IdentifierHash;
31
36class ISCT_CablingTool: virtual public IAlgTool {
37 public:
39 virtual ~ISCT_CablingTool() = default;
40
43
45 virtual IdentifierHash getHashFromOnlineId(const SCT_OnlineId& onlineId, const bool withWarnings = true) const = 0;
46 virtual IdentifierHash getHashFromOnlineId(const SCT_OnlineId& onlineId, const EventContext& ctx, const bool withWarnings = true) const = 0;
47
49 virtual SCT_OnlineId getOnlineIdFromHash(const IdentifierHash& hash) const = 0;
50 virtual SCT_OnlineId getOnlineIdFromHash(const IdentifierHash& hash, const EventContext& ctx) const = 0;
51
53 virtual std::uint32_t getRobIdFromHash(const IdentifierHash& hash) const = 0;
54 virtual std::uint32_t getRobIdFromHash(const IdentifierHash& hash, const EventContext& ctx) const = 0;
55
57 virtual SCT_OnlineId getOnlineIdFromOfflineId(const Identifier& offlineId) const = 0;
58 virtual SCT_OnlineId getOnlineIdFromOfflineId(const Identifier& offlineId, const EventContext& ctx) const = 0;
59
61 virtual std::uint32_t getRobIdFromOfflineId(const Identifier& offlineId) const = 0;
62 virtual std::uint32_t getRobIdFromOfflineId(const Identifier& offlineId, const EventContext& ctx) const = 0;
63
65 virtual unsigned int size() const = 0;
66 virtual unsigned int size(const EventContext& ctx) const = 0;
67
69 virtual bool empty() const = 0;
70 virtual bool empty(const EventContext& ctx) const = 0;
71
74 virtual IdentifierHash getHashFromSerialNumber(const SCT_SerialNumber& sn, const EventContext& ctx) const = 0;
75
78 virtual SCT_SerialNumber getSerialNumberFromHash(const IdentifierHash& hash, const EventContext& ctx) const = 0;
79
81 virtual void getAllRods(std::vector<std::uint32_t>& usersVector) const = 0;
82 virtual void getAllRods(std::vector<std::uint32_t>& usersVector, const EventContext& ctx) const = 0;
83
85 virtual void getHashesForRod(std::vector<IdentifierHash>& usersVector, const std::uint32_t rodId) const = 0;
86 virtual void getHashesForRod(std::vector<IdentifierHash>& usersVector, const std::uint32_t rodId, const EventContext& ctx) const = 0;
87};
88
89#endif // ISCT_CablingTool_h
Header file for a utility class to hold the online id.
Header file for a utility class to hold the serial number.
Client interface to the cabling, providing conversions between online and offline identifiers.
virtual IdentifierHash getHashFromSerialNumber(const SCT_SerialNumber &sn) const =0
get hash from a module serial number, needed in the conditions tool because configurations are stored...
virtual std::uint32_t getRobIdFromHash(const IdentifierHash &hash, const EventContext &ctx) const =0
virtual bool empty() const =0
is the data structure empty?
virtual SCT_OnlineId getOnlineIdFromHash(const IdentifierHash &hash) const =0
return the online Id, given a hash (used by simulation encoders)
virtual IdentifierHash getHashFromSerialNumber(const SCT_SerialNumber &sn, const EventContext &ctx) const =0
virtual SCT_SerialNumber getSerialNumberFromHash(const IdentifierHash &hash, const EventContext &ctx) const =0
virtual void getHashesForRod(std::vector< IdentifierHash > &usersVector, const std::uint32_t rodId, const EventContext &ctx) const =0
virtual SCT_OnlineId getOnlineIdFromOfflineId(const Identifier &offlineId, const EventContext &ctx) const =0
virtual void getHashesForRod(std::vector< IdentifierHash > &usersVector, const std::uint32_t rodId) const =0
fill a user's vector with all the hash ids which belong to a given rod
virtual std::uint32_t getRobIdFromOfflineId(const Identifier &offlineId) const =0
return the rob/rod Id, given an offlineId (used by simulation encoders)
virtual unsigned int size(const EventContext &ctx) const =0
virtual unsigned int size() const =0
size of the data structure (for the SCT should be 8176, one for each module side)
virtual std::uint32_t getRobIdFromOfflineId(const Identifier &offlineId, const EventContext &ctx) const =0
DeclareInterfaceID(ISCT_CablingTool, 1, 0)
Creates the InterfaceID and interfaceID() method.
virtual SCT_OnlineId getOnlineIdFromHash(const IdentifierHash &hash, const EventContext &ctx) const =0
virtual SCT_SerialNumber getSerialNumberFromHash(const IdentifierHash &hash) const =0
get module serial number from hash, needed during filling of data structure
virtual bool empty(const EventContext &ctx) const =0
virtual void getAllRods(std::vector< std::uint32_t > &usersVector) const =0
fill a users vector with all the RodIds
virtual SCT_OnlineId getOnlineIdFromOfflineId(const Identifier &offlineId) const =0
return the online Id, given an offlineId
virtual void getAllRods(std::vector< std::uint32_t > &usersVector, const EventContext &ctx) const =0
virtual std::uint32_t getRobIdFromHash(const IdentifierHash &hash) const =0
return the rob/rod Id, given a hash (used by simulation encoders)
virtual ~ISCT_CablingTool()=default
no-op destructor
virtual IdentifierHash getHashFromOnlineId(const SCT_OnlineId &onlineId, const bool withWarnings=true) const =0
return offline hash, given the online Id (used by decoders)
virtual IdentifierHash getHashFromOnlineId(const SCT_OnlineId &onlineId, const EventContext &ctx, const bool withWarnings=true) const =0
This is a "hash" representation of an Identifier.
SCT_OnlineId is a class to hold an online id number and provide check on validity,...
SCT_SerialNumber is a class to hold a serial number and provide check on validity,...