|
ATLAS Offline Software
|
Go to the documentation of this file.
9 , ISvcLocator* pSvcLocator )
28 return StatusCode::SUCCESS;
40 if(writeHandle.isValid()) {
41 ATH_MSG_DEBUG(
"CondHandle " << writeHandle.fullKey() <<
" is already valid."
42 <<
". In theory this should not be called, but may happen"
43 <<
" if multiple concurrent events are being processed out of order.");
45 return StatusCode::SUCCESS;
50 if (!strawStatusHandle.isValid()){
51 ATH_MSG_FATAL(
"No access to conditions " << strawStatusHandle.key());
52 return StatusCode::FAILURE;
56 if (!strawStatusHandle.range(
range)){
57 ATH_MSG_ERROR(
"Failed to get validity range of " << strawStatusHandle.key());
58 return StatusCode::FAILURE;
64 if (statusSummary ==
nullptr) {
65 ATH_MSG_ERROR(
"Null pointer to the straw status summary container");
66 return StatusCode::FAILURE;
70 std::unique_ptr<TRTCond::AliveStraws> writeCdo{std::make_unique<TRTCond::AliveStraws>()};
74 if (not trtDetEleHandle.isValid() or elements==
nullptr) {
76 return StatusCode::FAILURE;
88 unsigned int nstraws = 0;
89 if (trtDetEleHandle.isValid()){
92 nstraws =
el->nStraws();
97 for (
unsigned int i=0;
i<nstraws ;
i++) {
112 writeCdo->update(i_total,i_wheel,
phi);
118 if (writeHandle.record(
range, std::move(writeCdo)).isFailure()) {
119 ATH_MSG_ERROR(
"Could not record AliveStraws " << writeHandle.key()
120 <<
" with EventRange " <<
range
121 <<
" into Conditions Store");
122 return StatusCode::FAILURE;
125 return StatusCode::SUCCESS;
132 if (
det == -1) arrayindex = 1;
133 else if (
det == -2) {
134 if (lay < 6) arrayindex = 2;
137 else if (
det == 1) arrayindex = 4;
139 if (lay < 6) arrayindex = 5;
142 else ATH_MSG_WARNING(
" detector value is: " <<
det <<
", out of range -2, -1, 1, 2, so THIS IS NOT TRT!!!");
149 if (lay == 0) arrayindex = 0;
150 else if (lay == 1) arrayindex = 1;
151 else if (lay == 2) arrayindex = 2;
153 else if (
det == -2) {
154 for (
int i=0;
i<14; ++
i){
155 if (lay==
i) arrayindex=
i+3;
159 if (lay == 0) arrayindex = 17;
160 else if (lay == 1) arrayindex = 18;
161 else if (lay == 2) arrayindex = 19;
164 for (
int i=0;
i<14; ++
i){
165 if (lay==
i) arrayindex=
i+20;
168 else ATH_MSG_WARNING(
" detector value is: " <<
det <<
", out of range -2, -1, 1, 2, so THIS IS NOT TRT!!!");
def retrieve(aClass, aKey=None)
Identifier layer_id(int barrel_ec, int phi_module, int layer_or_wheel, int straw_layer) const
For an individual straw layer.
SG::ReadCondHandleKey< InDetDD::TRT_DetElementContainer > m_trtDetEleContKey
int straw_max(const Identifier &id) const
Scalar phi() const
phi method
IdentifierHash straw_hash(Identifier straw_id) const
straw hash from id - optimized
TRTStrawCondAlg(const std::string &name, ISvcLocator *pSvcLocator)
#define ATH_MSG_VERBOSE(x)
const_id_iterator straw_layer_end(void) const
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
An algorithm that can be simultaneously executed in multiple threads.
int findArrayLocalWheelIndex(const int det, const int lay) const
SG::WriteCondHandleKey< TRTCond::AliveStraws > m_strawWriteKey
::StatusCode StatusCode
StatusCode definition for legacy code.
bool findStatus(const IdentifierHash &hashID) const
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
int layer_or_wheel(const Identifier &id) const
StatusCode initialize(bool used=true)
int phi_module(const Identifier &id) const
virtual StatusCode initialize() override
SG::ReadCondHandleKey< TRTCond::StrawStatusSummary > m_strawStatusSummaryKey
virtual StatusCode execute(const EventContext &ctx) const override
#define ATH_MSG_WARNING(x)
const TRT_BaseElement * getDetectorElement(const IdentifierHash &hash) const
const_id_iterator straw_layer_begin(void) const
Iterators over full set of straw_layer ids. Straw_layer ids are sorted.
Class to hold collection of TRT detector elements.
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
IdentifierHash straw_layer_hash(Identifier straw_layer_id) const
straw_layer hash from id - optimized
int findArrayTotalIndex(const int det, const int lay) const
Identifier straw_id(int barrel_ec, int phi_module, int layer_or_wheel, int straw_layer, int straw) const
Three ways of getting id for a single straw: