ATLAS Offline Software
Loading...
Searching...
No Matches
TRTStrawStatusRead Class Reference

#include <TRTStrawStatusRead.h>

Inheritance diagram for TRTStrawStatusRead:
Collaboration diagram for TRTStrawStatusRead:

Public Types

typedef TRTCond::StrawStatusMultChanContainer StrawStatusContainer

Public Member Functions

 TRTStrawStatusRead (const std::string &name, ISvcLocator *pSvcLocator)
virtual ~TRTStrawStatusRead ()=default
virtual StatusCode initialize () override
virtual StatusCode execute (const EventContext &ctx) override
 Execute method.
virtual StatusCode finalize () override
virtual StatusCode writeToTextFile (const std::string &filename)
virtual const StrawStatusContainergetStrawStatusContainer () const
virtual const StrawStatusContainergetStrawStatusPermanentContainer () const
virtual const StrawStatusContainergetStrawStatusHTContainer () const
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual bool isClonable () const override
 Specify if the algorithm is clonable.
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
virtual bool filterPassed (const EventContext &ctx) const
 Get filter decision:
virtual void setFilterPassed (bool state, const EventContext &ctx) const
 Set filter decision:
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Protected Member Functions

virtual bool isReEntrant () const override final
 Legacy algorithms are not thread-safe.
void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

const TRT_IDm_trtid {}
 trt id helper
ToolHandle< ITRT_StrawStatusSummaryToolm_status {this, "TRT_StrawStatusSummaryTool", "InDetTRTStrawStatusSummaryTool", ""}
SG::ReadCondHandleKey< StrawStatusContainerm_statReadKey {this, "StatReadKeyName", "/TRT/Cond/Status", "StrawStatus in-key"}
SG::ReadCondHandleKey< StrawStatusContainerm_permReadKey {this, "PermReadKeyName", "/TRT/Cond/StatusPermanent", "StrawStatusPermanent in-key"}
SG::ReadCondHandleKey< StrawStatusContainerm_statHTReadKey {this, "StatHTReadKeyName", "/TRT/Cond/StatusHT", "StrawStatusHT in-key"}
Gaudi::Property< std::string > m_printfolder {this, "FolderToPrint", ""}
Gaudi::Property< std::string > m_outputfile {this, "OutputFile", "StrawStatusDump_Writer.txt"}
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default).
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default).
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Definition at line 23 of file TRTStrawStatusRead.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

◆ StrawStatusContainer

Constructor & Destructor Documentation

◆ TRTStrawStatusRead()

TRTStrawStatusRead::TRTStrawStatusRead ( const std::string & name,
ISvcLocator * pSvcLocator )

Definition at line 25 of file TRTStrawStatusRead.cxx.

25 : AthAlgorithm(name, pSvcLocator)
26{
27}
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.

◆ ~TRTStrawStatusRead()

virtual TRTStrawStatusRead::~TRTStrawStatusRead ( )
virtualdefault

Member Function Documentation

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ execute()

StatusCode TRTStrawStatusRead::execute ( const EventContext & ctx)
overridevirtual

Execute method.

Implements AthAlgorithm.

Definition at line 51 of file TRTStrawStatusRead.cxx.

52{
53
54 StatusCode sc = StatusCode::SUCCESS;
55
56 ATH_MSG_INFO(" Dump the Straw Status to text file name: "<< m_outputfile);
58 if (sc.isFailure())
59 {
60 ATH_MSG_ERROR(" Error writing the text file");
61 }
62
63 return sc;
64}
#define ATH_MSG_ERROR(x)
#define ATH_MSG_INFO(x)
static Double_t sc
virtual StatusCode writeToTextFile(const std::string &filename)
Gaudi::Property< std::string > m_outputfile
::StatusCode StatusCode
StatusCode definition for legacy code.

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ extraOutputDeps()

const DataObjIDColl & AthCommonAlgorithm< Gaudi::Algorithm >::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 89 of file AthCommonAlgorithm.cxx.

54{
55 // If we didn't find any symlinks to add, just return the collection
56 // from the base class. Otherwise, return the extended collection.
57 if (!m_extendedExtraObjects.empty()) {
59 }
61}
Common base class for algorithms.

◆ filterPassed()

virtual bool AthCommonAlgorithm< Gaudi::Algorithm >::filterPassed ( const EventContext & ctx) const
inlinevirtualinherited

Get filter decision:

Definition at line 93 of file AthCommonAlgorithm.h.

93 {
94 return execState( ctx ).filterPassed();
95 }
virtual bool filterPassed(const EventContext &ctx) const
Get filter decision:

◆ finalize()

StatusCode TRTStrawStatusRead::finalize ( )
overridevirtual

Definition at line 66 of file TRTStrawStatusRead.cxx.

67{
68 return StatusCode::SUCCESS;
69}

◆ getStrawStatusContainer()

const TRTStrawStatusRead::StrawStatusContainer * TRTStrawStatusRead::getStrawStatusContainer ( ) const
virtual

Definition at line 376 of file TRTStrawStatusRead.cxx.

377{
378
379 SG::ReadCondHandle<TRTCond::StrawStatusMultChanContainer> rtc(m_statReadKey);
380 const StrawStatusContainer *strawstatuscontainer = *rtc;
381 return strawstatuscontainer;
382}
SG::ReadCondHandleKey< StrawStatusContainer > m_statReadKey
TRTCond::StrawStatusMultChanContainer StrawStatusContainer

◆ getStrawStatusHTContainer()

const TRTStrawStatusRead::StrawStatusContainer * TRTStrawStatusRead::getStrawStatusHTContainer ( ) const
virtual

Definition at line 392 of file TRTStrawStatusRead.cxx.

393{
394
395 SG::ReadCondHandle<TRTCond::StrawStatusMultChanContainer> rtc(m_statHTReadKey);
396 const StrawStatusContainer *strawstatuscontainer = *rtc;
397 return strawstatuscontainer;
398}
SG::ReadCondHandleKey< StrawStatusContainer > m_statHTReadKey

◆ getStrawStatusPermanentContainer()

const TRTStrawStatusRead::StrawStatusContainer * TRTStrawStatusRead::getStrawStatusPermanentContainer ( ) const
virtual

Definition at line 384 of file TRTStrawStatusRead.cxx.

385{
386
387 SG::ReadCondHandle<TRTCond::StrawStatusMultChanContainer> rtc(m_permReadKey);
388 const StrawStatusContainer *strawstatuscontainer = *rtc;
389 return strawstatuscontainer;
390}
SG::ReadCondHandleKey< StrawStatusContainer > m_permReadKey

◆ initialize()

StatusCode TRTStrawStatusRead::initialize ( )
overridevirtual

Definition at line 29 of file TRTStrawStatusRead.cxx.

30{
31 // Get ID helper
32 ATH_MSG_INFO("TRTStrawStatusRead::initialize");
33 ATH_CHECK(detStore()->retrieve(m_trtid, "TRT_ID"));
34
35 // Get tool
36 ATH_CHECK(m_status.retrieve());
37
38 // Read keys
39 ATH_CHECK(m_statReadKey.initialize());
40 ATH_CHECK(m_permReadKey.initialize());
41 ATH_CHECK(m_statHTReadKey.initialize());
42
43 if( m_printfolder.empty() or (m_printfolder!="Status" and m_printfolder!="StatusHT" and m_printfolder!="StatusPermanent") ){
44 ATH_MSG_ERROR("You must specify the proper FolderToPrint, it could be 'Status', 'StatusHT' or 'StatusPermanent' ");
45 return StatusCode::FAILURE;
46 }
47
48 return StatusCode::SUCCESS;
49}
#define ATH_CHECK
Evaluate an expression and check for errors.
const ServiceHandle< StoreGateSvc > & detStore() const
const TRT_ID * m_trtid
trt id helper
Gaudi::Property< std::string > m_printfolder
ToolHandle< ITRT_StrawStatusSummaryTool > m_status

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ isClonable()

virtual bool AthCommonAlgorithm< Gaudi::Algorithm >::isClonable ( ) const
inlineoverridevirtualinherited

Specify if the algorithm is clonable.

Only relevant for non-reentrant algorithms. Actual number of clones needs to be set via the "Cardinality" property.

Reimplemented in AFP_DigiTop, AlgB, AlgT, BCM_Digitization, CscDigitBuilder, CscDigitToCscRDO, G4AtlasAlg, G4RunAlg, HGTD_Digitization, HiveAlgBase, InDet::GNNSeedingTrackMaker, InDet::SCT_Clusterization, InDet::SiSPGNNTrackMaker, InDet::SiSPSeededTrackFinder, InDet::SiTrackerSpacePointFinder, ISF::SimKernelMT, ITk::StripDigitization, ITkPixelCablingAlg, ITkStripCablingAlg, LArHitEMapMaker, LArTTL1Maker, LUCID_DigiTop, LVL1::L1TopoSimulation, MergeCalibHits, MergeGenericMuonSimHitColl, MergeHijingPars, MergeMcEventCollection, MergeTrackRecordCollection, MergeTruthJets, MergeTruthParticles, MuonDigitizer, PileUpMTAlg, PixelDigitization, RoIBResultToxAOD, SCT_ByteStreamErrorsTestAlg, SCT_CablingCondAlgFromCoraCool, SCT_CablingCondAlgFromText, SCT_ConditionsParameterTestAlg, SCT_ConditionsSummaryTestAlg, SCT_ConfigurationConditionsTestAlg, SCT_Digitization, SCT_FlaggedConditionTestAlg, SCT_LinkMaskingTestAlg, SCT_MajorityConditionsTestAlg, SCT_ModuleVetoTestAlg, SCT_MonitorConditionsTestAlg, SCT_PrepDataToxAOD, SCT_RawDataToxAOD, SCT_ReadCalibChipDataTestAlg, SCT_ReadCalibDataTestAlg, SCT_RODVetoTestAlg, SCT_SensorsTestAlg, SCT_SiliconConditionsTestAlg, SCT_StripVetoTestAlg, SCT_TdaqEnabledTestAlg, SCT_TestCablingAlg, SCTEventFlagWriter, SCTRawDataProvider, SCTSiLorentzAngleTestAlg, SCTSiPropertiesTestAlg, SGInputLoader, Simulation::BeamEffectsAlg, TileHitVecToCnt, TileMuonFitter, TilePulseForTileMuonReceiver, TileRawChannelMaker, TRTDigitization, and ZDC_DigiTop.

Definition at line 68 of file AthCommonAlgorithm.h.

68 {
69 return true;
70 }

◆ isReEntrant()

virtual bool AthAlgorithm::isReEntrant ( ) const
inlinefinaloverrideprotectedvirtualinherited

Legacy algorithms are not thread-safe.

Definition at line 47 of file AthAlgorithm.h.

47{ return false; }

◆ msg()

MsgStream & AthCommonMsg< Gaudi::Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< Gaudi::Algorithm >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ setFilterPassed()

virtual void AthCommonAlgorithm< Gaudi::Algorithm >::setFilterPassed ( bool state,
const EventContext & ctx ) const
inlinevirtualinherited

Set filter decision:

Reimplemented in AthFilterAlgorithm.

Definition at line 99 of file AthCommonAlgorithm.h.

99 {
101 }
virtual void setFilterPassed(bool state, const EventContext &ctx) const
Set filter decision:

◆ sysExecute()

StatusCode AthCommonAlgorithm< Gaudi::Algorithm >::sysExecute ( const EventContext & ctx)
overridevirtualinherited

Execute an algorithm.

We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.

Reimplemented in AthAnalysisAlgorithm.

Definition at line 80 of file AthCommonAlgorithm.cxx.

41{
42 return BaseAlg::sysExecute (ctx);
43}

◆ sysInitialize()

StatusCode AthCommonAlgorithm< Gaudi::Algorithm >::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >.

Reimplemented in AthAnalysisAlgorithm, AthFilterAlgorithm, AthHistogramAlgorithm, HypoBase, InputMakerBase, and PyAthena::Alg.

Definition at line 60 of file AthCommonAlgorithm.cxx.

71 {
73
74 if (sc.isFailure()) {
75 return sc;
76 }
77
78 ServiceHandle<ICondSvc> cs("CondSvc",name());
79 for (auto h : outputHandles()) {
80 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
81 // do this inside the loop so we don't create the CondSvc until needed
82 if ( cs.retrieve().isFailure() ) {
83 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
85 }
86 if (cs->regHandle(this,*h).isFailure()) {
88 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
89 << " with CondSvc");
90 }
91 }
92 }
93 return sc;
94}
#define ATH_MSG_WARNING(x)
virtual StatusCode sysInitialize() override
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }

◆ writeToTextFile()

StatusCode TRTStrawStatusRead::writeToTextFile ( const std::string & filename)
virtual

Definition at line 71 of file TRTStrawStatusRead.cxx.

72{
73 std::ofstream outfile(filename.c_str());
74
75 int stat, bec, lay, sec, slay, straw, level;
76 int deadba0[32];
77 int deadba1[32];
78 int deadba2[32];
79 int deadbc0[32];
80 int deadbc1[32];
81 int deadbc2[32];
82 int deadea[14];
83 int deadec[14];
84 for (int i = 0; i < 32; i++)
85 {
86 deadba0[i] = 0;
87 deadba1[i] = 0;
88 deadba2[i] = 0;
89 deadbc0[i] = 0;
90 deadbc1[i] = 0;
91 deadbc2[i] = 0;
92 }
93 for (int i = 0; i < 14; i++)
94 {
95 deadea[i] = 0;
96 deadec[i] = 0;
97 }
98 int ngood = 0;
99
100 if (m_printfolder == "Status")
101 {
102 ATH_MSG_INFO(" Dump To File: StrawStatus ");
104
105 getStrawStatusContainer()->getall(flatcontainer);
106
107 std::cout << " Status write output file in the same format as input " << std::endl;
108 for (TRTCond::StrawStatusContainer::FlatContainer::const_iterator
109 it = flatcontainer.begin();
110 it != flatcontainer.end(); ++it)
111 {
112 TRTCond::ExpandedIdentifier id = it->first;
113 const TRTCond::StrawStatus *status = it->second;
114 bec = id.becindextoid(id.index(1));
115 lay = id.index(2);
116 sec = id.index(3);
117 slay = id.index(4);
118 straw = id.index(5);
119 level = id.level();
120 stat = int(status->getstatus());
121 if (stat != TRTCond::StrawStatus::Good)
122 {
123 // record this straw in the output file in same format as in the original input text file
124 if (level == 4)
125 straw = -1;
126 if (level == 3)
127 {
128 straw = -1;
129 slay = -1;
130 }
131 if (level == 2)
132 {
133 straw = -1;
134 slay = -1;
135 sec = -1;
136 }
137 outfile << bec << " " << sec << " " << slay << " " << straw << " " << lay << " " << TRTCond::StrawStatus::Dead << std::endl;
138 }
139 }
140 std::cout << " Check all straws: " << " ( Good = " << TRTCond::StrawStatus::Good << " Dead = " << TRTCond::StrawStatus::Dead << std::endl;
141 for (std::vector<Identifier>::const_iterator it = m_trtid->straw_layer_begin(); it != m_trtid->straw_layer_end(); ++it)
142 {
143 int nStrawsInLayer = m_trtid->straw_max(*it);
144 for (int i = 0; i <= nStrawsInLayer; i++)
145 {
146
147 Identifier id = m_trtid->straw_id(*it, i);
148 bec = m_trtid->barrel_ec(id);
149 lay = m_trtid->layer_or_wheel(id);
150 sec = m_trtid->phi_module(id);
151
152
153 stat = m_status->getStatus(id, Gaudi::Hive::currentContext());
154 if (stat != TRTCond::StrawStatus::Good)
155 {
156 if (bec == -2)
157 {
158 deadec[lay]++;
159 }
160 else if (bec == 2)
161 {
162 deadea[lay]++;
163 }
164 else if (bec == -1)
165 {
166 if (lay == 0)
167 deadbc0[sec]++;
168 if (lay == 1)
169 deadbc1[sec]++;
170 if (lay == 2)
171 deadbc2[sec]++;
172 }
173 else if (bec == 1)
174 {
175 if (lay == 0)
176 deadba0[sec]++;
177 if (lay == 1)
178 deadba1[sec]++;
179 if (lay == 2)
180 deadba2[sec]++;
181 }
182 }
183 }
184 }
185 }
186
187 if (m_printfolder == "StatusHT")
188 {
189 ATH_MSG_INFO(" Dump To File: StrawStatus HT ");
191 getStrawStatusHTContainer()->getall(flatcontainerHT);
192
193 ATH_MSG_INFO(" bec lay gas (Xe=2 Ar=4)");
194 for (std::vector<Identifier>::const_iterator it = m_trtid->straw_layer_begin(); it != m_trtid->straw_layer_end(); ++it)
195 {
196 Identifier id = m_trtid->straw_id(*it, 1);
197 bec = m_trtid->barrel_ec(id);
198 lay = m_trtid->layer_or_wheel(id);
199 sec = m_trtid->phi_module(id);
200 slay = m_trtid->straw_layer(id);
201 // print gas status for sector 1, strawlayer 1, straw 1 in this layer-or-wheel
202 if (sec == 1 && slay == 1)
203 {
204
205 int stat = int(m_status->getStatusHT(id, Gaudi::Hive::currentContext()));
206
207 ATH_MSG_INFO(bec << " " << lay << " " << stat);
208 }
209 }
210
211 for (TRTCond::StrawStatusContainer::FlatContainer::const_iterator
212 it = flatcontainerHT.begin();
213 it != flatcontainerHT.end(); ++it)
214 {
215 TRTCond::ExpandedIdentifier id = it->first;
216 const TRTCond::StrawStatus *status = it->second;
217 outfile << id << " " << int(status->getstatus()) << std::endl;
218 }
219 }
220
221 if (m_printfolder == "StatusPermanent")
222 {
223 ATH_MSG_INFO(" Dump To File: StrawStatus permanent ");
224
226
227 getStrawStatusPermanentContainer()->getall(flatcontainerpermanent);
228
229 std::cout << " StatusPermanent cobntainer first straws: " << std::endl;
230 for (TRTCond::StrawStatusContainer::FlatContainer::const_iterator
231 it = flatcontainerpermanent.begin();
232 it != flatcontainerpermanent.end(); ++it)
233 {
234 TRTCond::ExpandedIdentifier id = it->first;
235 const TRTCond::StrawStatus *status = it->second;
236 bec = id.becindextoid(id.index(1));
237 lay = id.index(2);
238 sec = id.index(3);
239 slay = id.index(4);
240 straw = id.index(5);
241 stat = int(status->getstatus());
242 if (stat != TRTCond::StrawStatus::Good)
243 {
244 outfile << bec << " " << sec << " " << straw << " " << slay << " " << lay << " " << stat << std::endl;
245
246 if (bec == -2)
247 {
248 deadec[lay]++;
249 }
250 else if (bec == 2)
251 {
252 deadea[lay]++;
253 }
254 else if (bec == -1)
255 {
256 if (lay == 0)
257 deadbc0[sec]++;
258 if (lay == 1)
259 deadbc1[sec]++;
260 if (lay == 2)
261 deadbc2[sec]++;
262 }
263 else if (bec == 1)
264 {
265 if (lay == 0)
266 deadba0[sec]++;
267 if (lay == 1)
268 deadba1[sec]++;
269 if (lay == 2)
270 deadba2[sec]++;
271 }
272 }
273 else
274 {
275 ngood++;
276 }
277
278 if (straw == 0 && slay == 0)
279 std::cout << bec << " " << sec << " " << straw << " " << slay << " " << lay << " " << stat << std::endl;
280 }
281 std::cout << " First straws: " << " ( Good = " << TRTCond::StrawStatus::Good << " Dead = " << TRTCond::StrawStatus::Dead << " ) " << std::endl;
282
283 for (std::vector<Identifier>::const_iterator it = m_trtid->straw_layer_begin(); it != m_trtid->straw_layer_end(); ++it)
284 {
285 int nStrawsInLayer = m_trtid->straw_max(*it);
286 for (int i = 0; i <= nStrawsInLayer; i++)
287 {
288
289 Identifier id = m_trtid->straw_id(*it, i);
290 bec = m_trtid->barrel_ec(id);
291 lay = m_trtid->layer_or_wheel(id);
292 sec = m_trtid->phi_module(id);
293 slay = m_trtid->straw_layer(id);
294 straw = m_trtid->straw(id);
295 stat = int(m_status->getStatusPermanent(id, Gaudi::Hive::currentContext()));
296
297 if (slay == 0 && straw == 0)
298 std::cout << bec << " " << lay << " " << sec << " " << stat << std::endl;
299 }
300 }
301 }
302
303 if(m_printfolder=="Status" || m_printfolder=="StatusPermanent"){
304 ATH_MSG_INFO ( " Dead straws BA layer 0" );
305 ATH_MSG_INFO ( "deadba0[] = { " << deadba0[0] << ", " << deadba0[1] << ", " << deadba0[2] << ", " << deadba0[3] << ", " <<
306 deadba0[4] << ", " << deadba0[5] << ", " << deadba0[6] << ", " << deadba0[7] << ", " <<
307 deadba0[8] << ", " << deadba0[9] << ", " << deadba0[10] << ", " << deadba0[11] << ", " <<
308 deadba0[12] << ", " << deadba0[13] << ", " << deadba0[14] << ", " << deadba0[15] << ", " <<
309 deadba0[16] << ", " << deadba0[17] << ", " << deadba0[18] << ", " << deadba0[19] << ", " <<
310 deadba0[20] << ", " << deadba0[21] << ", " << deadba0[22] << ", " << deadba0[23] << ", " <<
311 deadba0[24] << ", " << deadba0[25] << ", " << deadba0[26] << ", " << deadba0[27] << ", " <<
312 deadba0[28] << ", " << deadba0[29] << ", " << deadba0[30] << ", " << deadba0[31] << "}; " );
313 ATH_MSG_INFO ( " Dead straws BA layer 1 ");
314 ATH_MSG_INFO ( "deadba1[] = { " << deadba1[0] << ", " << deadba1[1] << ", " << deadba1[2] << ", " << deadba1[3] << ", " <<
315 deadba1[4] << ", " << deadba1[5] << ", " << deadba1[6] << ", " << deadba1[7] << ", " <<
316 deadba1[8] << ", " << deadba1[9] << ", " << deadba1[10] << ", " << deadba1[11] << ", " <<
317 deadba1[12] << ", " << deadba1[13] << ", " << deadba1[14] << ", " << deadba1[15] << ", " <<
318 deadba1[16] << ", " << deadba1[17] << ", " << deadba1[18] << ", " << deadba1[19] << ", " <<
319 deadba1[20] << ", " << deadba1[21] << ", " << deadba1[22] << ", " << deadba1[23] << ", " <<
320 deadba1[24] << ", " << deadba1[25] << ", " << deadba1[26] << ", " << deadba1[27] << ", " <<
321 deadba1[28] << ", " << deadba1[29] << ", " << deadba1[30] << ", " << deadba1[31] << "};");
322 ATH_MSG_INFO (" Dead straws BA layer 2");
323 ATH_MSG_INFO ( "deadba2[]= { " << deadba2[0] << ", " << deadba2[1] << ", " << deadba2[2] << ", " << deadba2[3] << ", " <<
324 deadba2[4] << ", " << deadba2[5] << ", " << deadba2[6] << ", " << deadba2[7] << ", " <<
325 deadba2[8] << ", " << deadba2[9] << ", " << deadba2[10] << ", " << deadba2[11] << ", " <<
326 deadba2[12] << ", " << deadba2[13] << ", " << deadba2[14] << ", " << deadba2[15] << ", " <<
327 deadba2[16] << ", " << deadba2[17] << ", " << deadba2[18] << ", " << deadba2[19] << ", " <<
328 deadba2[20] << ", " << deadba2[21] << ", " << deadba2[22] << ", " << deadba2[23] << ", " <<
329 deadba2[24] << ", " << deadba2[25] << ", " << deadba2[26] << ", " << deadba2[27] << ", " <<
330 deadba2[28] << ", " << deadba2[29] << ", " << deadba2[30] << ", " << deadba2[31] << "}; ");
331
332 ATH_MSG_INFO ( " Dead straws BC layer 0" );
333 ATH_MSG_INFO ( "deadbc0[] = { " << deadbc0[0] << ", " << deadbc0[1] << ", " << deadbc0[2] << ", " << deadbc0[3] << ", " <<
334 deadbc0[4] << ", " << deadbc0[5] << ", " << deadbc0[6] << ", " << deadbc0[7] << ", " <<
335 deadbc0[8] << ", " << deadbc0[9] << ", " << deadbc0[10] << ", " << deadbc0[11] << ", " <<
336 deadbc0[12] << ", " << deadbc0[13] << ", " << deadbc0[14] << ", " << deadbc0[15] << ", " <<
337 deadbc0[16] << ", " << deadbc0[17] << ", " << deadbc0[18] << ", " << deadbc0[19] << ", " <<
338 deadbc0[20] << ", " << deadbc0[21] << ", " << deadbc0[22] << ", " << deadbc0[23] << ", " <<
339 deadbc0[24] << ", " << deadbc0[25] << ", " << deadbc0[26] << ", " << deadbc0[27] << ", " <<
340 deadbc0[28] << ", " << deadbc0[29] << ", " << deadbc0[30] << ", " << deadbc0[31] << "}; " );
341 ATH_MSG_INFO ( " Dead straws BC layer 1 ");
342 ATH_MSG_INFO ( "deadbc1[] = { " << deadbc1[0] << ", " << deadbc1[1] << ", " << deadbc1[2] << ", " << deadbc1[3] << ", " <<
343 deadbc1[4] << ", " << deadbc1[5] << ", " << deadbc1[6] << ", " << deadbc1[7] << ", " <<
344 deadbc1[8] << ", " << deadbc1[9] << ", " << deadbc1[10] << ", " << deadbc1[11] << ", " <<
345 deadbc1[12] << ", " << deadbc1[13] << ", " << deadbc1[14] << ", " << deadbc1[15] << ", " <<
346 deadbc1[16] << ", " << deadbc1[17] << ", " << deadbc1[18] << ", " << deadbc1[19] << ", " <<
347 deadbc1[20] << ", " << deadbc1[21] << ", " << deadbc1[22] << ", " << deadbc1[23] << ", " <<
348 deadbc1[24] << ", " << deadbc1[25] << ", " << deadbc1[26] << ", " << deadbc1[27] << ", " <<
349 deadbc1[28] << ", " << deadbc1[29] << ", " << deadbc1[30] << ", " << deadbc1[31] << "};");
350 ATH_MSG_INFO (" Dead straws BC layer 2");
351 ATH_MSG_INFO ( "deadbc2[]= { " << deadbc2[0] << ", " << deadbc2[1] << ", " << deadbc2[2] << ", " << deadbc2[3] << ", " <<
352 deadbc2[4] << ", " << deadbc2[5] << ", " << deadbc2[6] << ", " << deadbc2[7] << ", " <<
353 deadbc2[8] << ", " << deadbc2[9] << ", " << deadbc2[10] << ", " << deadbc2[11] << ", " <<
354 deadbc2[12] << ", " << deadbc2[13] << ", " << deadbc2[14] << ", " << deadbc2[15] << ", " <<
355 deadbc2[16] << ", " << deadbc2[17] << ", " << deadbc2[18] << ", " << deadbc2[19] << ", " <<
356 deadbc2[20] << ", " << deadbc2[21] << ", " << deadbc2[22] << ", " << deadbc2[23] << ", " <<
357 deadbc2[24] << ", " << deadbc2[25] << ", " << deadbc2[26] << ", " << deadbc2[27] << ", " <<
358 deadbc2[28] << ", " << deadbc2[29] << ", " << deadbc2[30] << ", " << deadbc2[31] << "}; ");
359
360 ATH_MSG_INFO (" Dead straws EA" );
361 ATH_MSG_INFO ("deadea[] = { " << deadea[0] << ", " << deadea[1] << ", " << deadea[2] << ", " << deadea[3] << ", " <<
362 deadea[4] << ", " << deadea[5] << ", " << deadea[6] << ", " << deadea[7] << ", " <<
363 deadea[8] << ", " << deadea[9] << ", " << deadea[10] << ", " << deadea[11] << ", " <<
364 deadea[12] << ", " << deadea[13] << "}; ");
365 ATH_MSG_INFO (" Dead straws EC" );
366 ATH_MSG_INFO ("deadec[] = { " << deadec[0] << ", " << deadec[1] << ", " << deadec[2] << ", " << deadec[3] << ", " <<
367 deadec[4] << ", " << deadec[5] << ", " << deadec[6] << ", " << deadec[7] << ", " <<
368 deadec[8] << ", " << deadec[9] << ", " << deadec[10] << ", " << deadec[11] << ", " <<
369 deadec[12] << ", " << deadec[13] << "}; " );
370 ATH_MSG_INFO("Number of good layers or wheels: " << ngood);
371 }
372
373 return StatusCode::SUCCESS;
374}
void getall(typename DaughterContainer::FlatContainer &entries) const
get a flat vector with all values.
std::vector< std::pair< ExpandedIdentifier, const StrawStatus * > > FlatContainer
virtual const StrawStatusContainer * getStrawStatusContainer() const
virtual const StrawStatusContainer * getStrawStatusPermanentContainer() const
virtual const StrawStatusContainer * getStrawStatusHTContainer() const
str index
Definition DeMoScan.py:362
@ straw
Definition HitInfo.h:82
status
Definition merge.py:16

Member Data Documentation

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default).

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default).

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthCommonAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
privateinherited

Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.

Empty if no symlinks were found.

Definition at line 108 of file AthCommonAlgorithm.h.

◆ m_outputfile

Gaudi::Property<std::string> TRTStrawStatusRead::m_outputfile {this, "OutputFile", "StrawStatusDump_Writer.txt"}
private

Definition at line 52 of file TRTStrawStatusRead.h.

52{this, "OutputFile", "StrawStatusDump_Writer.txt"};

◆ m_permReadKey

SG::ReadCondHandleKey<StrawStatusContainer> TRTStrawStatusRead::m_permReadKey {this, "PermReadKeyName", "/TRT/Cond/StatusPermanent", "StrawStatusPermanent in-key"}
private

Definition at line 47 of file TRTStrawStatusRead.h.

47{this, "PermReadKeyName", "/TRT/Cond/StatusPermanent", "StrawStatusPermanent in-key"};

◆ m_printfolder

Gaudi::Property<std::string> TRTStrawStatusRead::m_printfolder {this, "FolderToPrint", ""}
private

Definition at line 51 of file TRTStrawStatusRead.h.

51{this, "FolderToPrint", ""};

◆ m_statHTReadKey

SG::ReadCondHandleKey<StrawStatusContainer> TRTStrawStatusRead::m_statHTReadKey {this, "StatHTReadKeyName", "/TRT/Cond/StatusHT", "StrawStatusHT in-key"}
private

Definition at line 48 of file TRTStrawStatusRead.h.

48{this, "StatHTReadKeyName", "/TRT/Cond/StatusHT", "StrawStatusHT in-key"};

◆ m_statReadKey

SG::ReadCondHandleKey<StrawStatusContainer> TRTStrawStatusRead::m_statReadKey {this, "StatReadKeyName", "/TRT/Cond/Status", "StrawStatus in-key"}
private

Definition at line 46 of file TRTStrawStatusRead.h.

46{this, "StatReadKeyName", "/TRT/Cond/Status", "StrawStatus in-key"};

◆ m_status

ToolHandle<ITRT_StrawStatusSummaryTool> TRTStrawStatusRead::m_status {this, "TRT_StrawStatusSummaryTool", "InDetTRTStrawStatusSummaryTool", ""}
private

Definition at line 44 of file TRTStrawStatusRead.h.

44{this, "TRT_StrawStatusSummaryTool", "InDetTRTStrawStatusSummaryTool", ""};

◆ m_trtid

const TRT_ID* TRTStrawStatusRead::m_trtid {}
private

trt id helper

Definition at line 43 of file TRTStrawStatusRead.h.

43{};

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files: