ATLAS Offline Software
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
7 
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
29 class Identifier;
30 class IdentifierHash;
31 
36 class 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 
50  virtual SCT_OnlineId getOnlineIdFromHash(const IdentifierHash& hash, const EventContext& ctx) const = 0;
51 
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
ISCT_CablingTool::getSerialNumberFromHash
virtual SCT_SerialNumber getSerialNumberFromHash(const IdentifierHash &hash, const EventContext &ctx) const =0
ISCT_CablingTool::getRobIdFromHash
virtual std::uint32_t getRobIdFromHash(const IdentifierHash &hash) const =0
return the rob/rod Id, given a hash (used by simulation encoders)
ISCT_CablingTool::getAllRods
virtual void getAllRods(std::vector< std::uint32_t > &usersVector) const =0
fill a users vector with all the RodIds
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
SCT_OnlineId
Definition: SCT_OnlineId.h:22
ISCT_CablingTool::size
virtual unsigned int size(const EventContext &ctx) const =0
ISCT_CablingTool::DeclareInterfaceID
DeclareInterfaceID(ISCT_CablingTool, 1, 0)
Creates the InterfaceID and interfaceID() method.
ISCT_CablingTool::size
virtual unsigned int size() const =0
size of the data structure (for the SCT should be 8176, one for each module side)
ISCT_CablingTool
Definition: ISCT_CablingTool.h:36
ISCT_CablingTool::getAllRods
virtual void getAllRods(std::vector< std::uint32_t > &usersVector, const EventContext &ctx) const =0
ISCT_CablingTool::getOnlineIdFromHash
virtual SCT_OnlineId getOnlineIdFromHash(const IdentifierHash &hash, const EventContext &ctx) const =0
ISCT_CablingTool::getHashesForRod
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
ISCT_CablingTool::getHashFromSerialNumber
virtual IdentifierHash getHashFromSerialNumber(const SCT_SerialNumber &sn, const EventContext &ctx) const =0
ISCT_CablingTool::getRobIdFromOfflineId
virtual std::uint32_t getRobIdFromOfflineId(const Identifier &offlineId, const EventContext &ctx) const =0
ISCT_CablingTool::~ISCT_CablingTool
virtual ~ISCT_CablingTool()=default
no-op destructor
ISCT_CablingTool::getHashFromOnlineId
virtual IdentifierHash getHashFromOnlineId(const SCT_OnlineId &onlineId, const bool withWarnings=true) const =0
return offline hash, given the online Id (used by decoders)
ISCT_CablingTool::getOnlineIdFromOfflineId
virtual SCT_OnlineId getOnlineIdFromOfflineId(const Identifier &offlineId, const EventContext &ctx) const =0
ISCT_CablingTool::getHashFromOnlineId
virtual IdentifierHash getHashFromOnlineId(const SCT_OnlineId &onlineId, const EventContext &ctx, const bool withWarnings=true) const =0
ISCT_CablingTool::getHashesForRod
virtual void getHashesForRod(std::vector< IdentifierHash > &usersVector, const std::uint32_t rodId, const EventContext &ctx) const =0
ISCT_CablingTool::getRobIdFromOfflineId
virtual std::uint32_t getRobIdFromOfflineId(const Identifier &offlineId) const =0
return the rob/rod Id, given an offlineId (used by simulation encoders)
ISCT_CablingTool::empty
virtual bool empty(const EventContext &ctx) const =0
ISCT_CablingTool::getHashFromSerialNumber
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...
SCT_SerialNumber
Definition: SCT_SerialNumber.h:22
ISCT_CablingTool::getSerialNumberFromHash
virtual SCT_SerialNumber getSerialNumberFromHash(const IdentifierHash &hash) const =0
get module serial number from hash, needed during filling of data structure
CaloCondBlobAlgs_fillNoiseFromASCII.hash
dictionary hash
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:109
SCT_SerialNumber.h
ISCT_CablingTool::getOnlineIdFromHash
virtual SCT_OnlineId getOnlineIdFromHash(const IdentifierHash &hash) const =0
return the online Id, given a hash (used by simulation encoders)
SCT_OnlineId.h
ISCT_CablingTool::getOnlineIdFromOfflineId
virtual SCT_OnlineId getOnlineIdFromOfflineId(const Identifier &offlineId) const =0
return the online Id, given an offlineId
ISCT_CablingTool::getRobIdFromHash
virtual std::uint32_t getRobIdFromHash(const IdentifierHash &hash, const EventContext &ctx) const =0
IdentifierHash
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Definition: IdentifierHash.h:25
ISCT_CablingTool::empty
virtual bool empty() const =0
is the data structure empty?
Identifier
Definition: IdentifierFieldParser.cxx:14