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

#include <LArBadChannel2Ascii.h>

Inheritance diagram for LArBadChannel2Ascii:
Collaboration diagram for LArBadChannel2Ascii:

Public Member Functions

 ~LArBadChannel2Ascii ()=default
virtual StatusCode initialize () final
virtual StatusCode execute () final
 AthAlgorithm (const std::string &name, ISvcLocator *pSvcLocator)
 Constructor with parameters:
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
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

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

enum  DetPart {
  EMB =0 , EMEC , HEC , FCAL ,
  nParts
}
enum  CoarseProblemType {
  DeadReadout =0 , DeadPhys , DeadCalib , DeadFEB ,
  Noisy , Sporadic , Distorted , PeakReco ,
  Fibre , GrandTotalDead , nProblemTypes
}
typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

void writeSum (std::ofstream &exeFile, const std::vector< unsigned > &probs, const std::vector< unsigned > &nChans) const
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

SG::ReadCondHandleKey< LArBadChannelContm_BCKey {this,"BCKey","LArBadChannel"}
SG::ReadCondHandleKey< LArBadFebContm_BFKey {this,"BFKey","LArBadFeb"}
SG::ReadCondHandleKey< LArOnOffIdMappingm_cablingKey {this,"LArOnOffIdMapKey","LArOnOffIdMap"}
Gaudi::Property< std::string > m_fileName {this,"FileName",""}
Gaudi::Property< std::string > m_executiveSummaryFile {this,"ExecutiveSummaryFile",""}
Gaudi::Property< bool > m_wMissing {this,"WithMissing",false}
Gaudi::Property< bool > m_skipDisconnected {this,"SkipDisconnected",true}
Gaudi::Property< bool > m_isSC {this,"SuperCell",false}
DataObjIDColl m_extendedExtraObjects
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 18 of file LArBadChannel2Ascii.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Member Enumeration Documentation

◆ CoarseProblemType

Enumerator
DeadReadout 
DeadPhys 
DeadCalib 
DeadFEB 
Noisy 
Sporadic 
Distorted 
PeakReco 
Fibre 
GrandTotalDead 
nProblemTypes 

Definition at line 51 of file LArBadChannel2Ascii.h.

◆ DetPart

Enumerator
EMB 
EMEC 
HEC 
FCAL 
nParts 

Definition at line 42 of file LArBadChannel2Ascii.h.

Constructor & Destructor Documentation

◆ ~LArBadChannel2Ascii()

LArBadChannel2Ascii::~LArBadChannel2Ascii ( )
default

Member Function Documentation

◆ AthAlgorithm()

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

Constructor with parameters:

Definition at line 51 of file AthAlgorithm.cxx.

25 :
27{
28 // Set up to run AthAlgorithmDHUpdate in sysInitialize before
29 // merging dependency lists. This extends the output dependency
30 // list with any symlinks implied by inheritance relations.
31 m_updateDataHandles =
32 std::make_unique<AthenaBaseComps::AthAlgorithmDHUpdate>
34 std::move (m_updateDataHandles));
35}
DataObjIDColl m_extendedExtraObjects
AthCommonDataStore(const std::string &name, T... args)

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< 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< 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< 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< 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 LArBadChannel2Ascii::execute ( )
finalvirtual

Definition at line 29 of file LArBadChannel2Ascii.cxx.

29 {
30
31 const bool doExecSummary=(!m_executiveSummaryFile.empty());
32
33 SG::ReadCondHandle<LArBadChannelCont> bch{m_BCKey};
34 const LArBadChannelCont* badChannelCont{*bch};
35
36 const LArOnOffIdMapping* cabling=nullptr;
38 SG::ReadCondHandle<LArOnOffIdMapping> cablingHdl{m_cablingKey};
39 cabling=(*cablingHdl);
40 }
41
42 const LArBadFebCont* badFebCont=nullptr;
43 if (doExecSummary && !m_isSC) {
44 SG::ReadCondHandle<LArBadFebCont> badFebHdl{m_BFKey};
45 badFebCont=(*badFebHdl);
46 }
47
48 const LArOnlineID_Base* larOnlineID;
49 if ( m_isSC ){
50 const LArOnline_SuperCellID* ll;
51 StatusCode sc = detStore()->retrieve(ll, "LArOnline_SuperCellID");
52 if (sc.isFailure()) {
53 ATH_MSG_ERROR( "Could not get LArOnlineID helper !" );
54 return StatusCode::FAILURE;
55 } else {
56 larOnlineID = ll;
57 ATH_MSG_DEBUG("Found the LArOnlineID helper");
58 }
59 } else { // m_isSC
60 const LArOnlineID* ll;
61 StatusCode sc = detStore()->retrieve(ll, "LArOnlineID");
62 if (sc.isFailure()) {
63 ATH_MSG_ERROR( "Could not get LArOnlineID helper !");
64 return StatusCode::FAILURE;
65 } else {
66 larOnlineID = ll;
67 ATH_MSG_DEBUG(" Found the LArOnlineID helper. ");
68 }
69 }
70
71 std::ostream *out = &(std::cout);
72 std::ofstream outfile;
73 if (!m_fileName.empty()) {
74 outfile.open(m_fileName.value().c_str(),std::ios::out);
75 if (outfile.is_open()) {
76 ATH_MSG_INFO ( "Writing to file " << m_fileName );
77 out = &outfile;
78 }
79 else
80 ATH_MSG_ERROR ( "Failed to open file " << m_fileName );
81 }
82
83 const LArBadChanBitPacking packing;
84 const LArBadChanSCBitPacking SCpacking;
85
86 std::vector<std::vector<unsigned> > problemMatrix(nProblemTypes, std::vector<unsigned>(nParts));
87
88 std::vector<HWIdentifier>::const_iterator it = larOnlineID->channel_begin();
89 std::vector<HWIdentifier>::const_iterator it_e = larOnlineID->channel_end();
90 unsigned count = 0, nConnected = 0;
91 std::vector<unsigned> nPerPart(nParts);
92
93 for (; it != it_e; ++it) {
94 const HWIdentifier chid = *it;
95 if (cabling && !cabling->isOnlineConnected(chid))
96 continue;
97 ++nConnected;
98
99 DetPart dp = EMB;
100 if (larOnlineID->isHECchannel(chid))
101 dp = HEC;
102 else if (larOnlineID->isEMECchannel(chid))
103 dp = EMEC;
104 else if (larOnlineID->isFCALchannel(chid))
105 dp = FCAL;
106
107 ++nPerPart[dp];
108
109 LArBadChannel bc = badChannelCont->status(chid);
110
111 if (!bc.good()) {
112 ++count;
113 (*out) << std::format("{} {} {} {} {} 0 ",larOnlineID->barrel_ec(chid),larOnlineID->pos_neg(chid),larOnlineID->feedthrough(chid),larOnlineID->slot(chid),larOnlineID->channel(chid));
114 // Dummy 0 for calib-line
115 if (m_isSC) {
116 (*out) << SCpacking.stringStatus(bc);
117 } else {
118 (*out) << packing.stringStatus(bc);
119 }
120
121 (*out) << std::format(" # {:#x}", chid.get_identifier32().get_compact());
122 if (cabling) {
123 Identifier offid = cabling->cnvToIdentifier(chid);
124 (*out) << std::format(" -> {:#x}",offid.get_identifier32().get_compact());
125 }
126 (*out) << std::endl;
127 } // End if channel is not good (regular printout)
128
129 if (doExecSummary) {
130 HWIdentifier fid = larOnlineID->feb_Id(chid);
131 LArBadFeb bf;
132 if (!m_isSC) bf= badFebCont->status(fid);
133
134 if (bc.deadReadout() || bc.maskedOSUM())
135 ++problemMatrix[DeadReadout][dp];
136 if (bc.deadPhys())
137 ++problemMatrix[DeadPhys][dp];
138 if (bc.deadCalib())
139 ++problemMatrix[DeadCalib][dp];
140 if (bc.reallyNoisy())
141 ++problemMatrix[Noisy][dp];
142 if (bc.sporadicBurstNoise())
143 ++problemMatrix[Sporadic][dp];
144
145 if (bc.distorted() || bc.deformedTail() || bc.deformedPulse())
146 ++problemMatrix[Distorted][dp];
147
148 if (bc.ADCJump() || bc.nonLinearRamp() || bc.SCAProblem() || bc.offOFCs() || bc.offAmplitude() || bc.offScale()) {
149 ++problemMatrix[PeakReco][dp];
150 }
151
152 if (bc.lowLightFibre() || bc.transmissionErrorFibre()) {
153 ++problemMatrix[Fibre][dp];
154 }
155
156 if (!m_isSC) { //problematic febs apply only to regular cells
157 if (bf.deadAll() || bf.deadReadout() || bf.deactivatedInOKS())
158 ++problemMatrix[DeadFEB][dp];
159 if (bf.deadAll() || bf.deadReadout() || bf.deactivatedInOKS() || bc.deadReadout() || bc.deadPhys() || bc.reallyNoisy())
160 ++problemMatrix[GrandTotalDead][dp];
161 }
162 else {
163 if(bc.maskedOSUM() || bc.deadReadout() || bc.deadPhys() || bc.reallyNoisy())
164 ++problemMatrix[GrandTotalDead][dp];
165 }
166
167
168 } // end if executive Summary
169
170 } // end loop over channels;
172 ATH_MSG_INFO ( "Found " << count << " entries in the bad-channel database. (Number of connected cells: " << nConnected << ")" );
173 else
174 ATH_MSG_INFO ( "Found " << count << " entries in the bad-channel database. (Number of cells: " << nConnected << ")");
175 if (m_wMissing)
176 ATH_MSG_INFO ( "Including missing FEBs" );
177 else
178 ATH_MSG_INFO ( "Without missing FEBs" );
179 if (outfile.is_open())
180 outfile.close();
181
182
183 if (doExecSummary) {
184 std::ofstream exeSum;
185 exeSum.open(m_executiveSummaryFile.value().c_str(),std::ios::out);
186 if (!exeSum.is_open()) {
187 ATH_MSG_ERROR ( "Failed to open file " << m_executiveSummaryFile );
188 return StatusCode::FAILURE;
189 }
190
191 ATH_MSG_INFO ( "Writing Executive Summary to file " << m_executiveSummaryFile );
192
193 if (m_isSC) {
194 exeSum << "LAr SuperCells dead readout (incl masked OSUM)" << std::endl;
195 writeSum(exeSum,problemMatrix[DeadReadout],nPerPart);
196
197 exeSum << "LAr SuperCells suffering from high noise:" << std::endl;
198 writeSum(exeSum,problemMatrix[Noisy],nPerPart);
199
200 exeSum << "LAr SuperCells w/o calibration (constants from phi average of eta neighbours):" << std::endl;
201 writeSum(exeSum,problemMatrix[DeadCalib],nPerPart);
202
203 exeSum << "LAr SuperCells with distorted pulse shape:" << std::endl;
204 writeSum(exeSum,problemMatrix[Distorted],nPerPart);
205
206 exeSum << "LAr SuperCells having problems with the peak reco:" << std::endl;
207 writeSum(exeSum,problemMatrix[PeakReco],nPerPart);
208
209 exeSum << "LAr SuperCells having problems with the optical transmission:" << std::endl;
210 writeSum(exeSum,problemMatrix[Fibre],nPerPart);
211
212 exeSum << "LAr SuperCells not usable:" << std::endl;
213 writeSum(exeSum,problemMatrix[GrandTotalDead],nPerPart);
214 }
215 else {
216 exeSum << "LAr dead readout channels:" << std::endl;
217 writeSum(exeSum,problemMatrix[DeadReadout],nPerPart);
218
219 exeSum << "LAr permanently dead channels inside detector:" << std::endl;
220 writeSum(exeSum,problemMatrix[DeadPhys],nPerPart);
221
222 exeSum << "LAr noisy readout channels (more than 10 sigma above phi average or unstable):" << std::endl;
223 writeSum(exeSum,problemMatrix[Noisy],nPerPart);
224
225 exeSum << "LAr readout channels showing sporadic noise bursts:" << std::endl;
226 writeSum(exeSum,problemMatrix[Sporadic],nPerPart);
227
228 exeSum << "LAr readout channels w/o calibration (constants from phi average of eta neighbours):" << std::endl;
229 writeSum(exeSum,problemMatrix[DeadCalib],nPerPart);
230
231 exeSum << "LAr readout channels connected to inactive Front End Boards:" << std::endl;
232 writeSum(exeSum,problemMatrix[DeadFEB],nPerPart);
233
234 exeSum << "LAr readout channels not usable:" << std::endl;
235 writeSum(exeSum,problemMatrix[GrandTotalDead],nPerPart);
236 }
237
238 exeSum.close();
239 }
240
241 return StatusCode::SUCCESS;
242}
#define ATH_MSG_ERROR(x)
#define ATH_MSG_INFO(x)
#define ATH_MSG_DEBUG(x)
LArBadXCont< LArBadFeb > LArBadFebCont
LArBadXCont< LArBadChannel > LArBadChannelCont
static Double_t sc
const ServiceHandle< StoreGateSvc > & detStore() const
value_type get_compact() const
Get the compact id.
Identifier32 get_identifier32() const
Get the 32-bit version Identifier, will be invalid if >32 bits needed.
SG::ReadCondHandleKey< LArBadChannelCont > m_BCKey
SG::ReadCondHandleKey< LArBadFebCont > m_BFKey
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
Gaudi::Property< std::string > m_fileName
void writeSum(std::ofstream &exeFile, const std::vector< unsigned > &probs, const std::vector< unsigned > &nChans) const
Gaudi::Property< std::string > m_executiveSummaryFile
Gaudi::Property< bool > m_isSC
Gaudi::Property< bool > m_skipDisconnected
Gaudi::Property< bool > m_wMissing
bool deadReadout() const
bool offAmplitude() const
bool transmissionErrorFibre() const
bool lowLightFibre() const
bool deformedPulse() const
bool offOFCs() const
bool offScale() const
bool reallyNoisy() const
bool ADCJump() const
bool deadCalib() const
bool nonLinearRamp() const
bool deformedTail() const
bool sporadicBurstNoise() const
bool SCAProblem() const
bool deadPhys() const
bool maskedOSUM() const
bool good() const
Returns true if no problems at all (all bits at zero)
bool distorted() const
bool deadAll() const
FEB is completely missing, e.g. powered off.
Definition LArBadFeb.h:30
bool deactivatedInOKS() const
Deactivated in OKS.
Definition LArBadFeb.h:39
bool deadReadout() const
FEB is not sending readout data, but the L1 trigger path is working.
Definition LArBadFeb.h:33
LArBC_t status(const HWIdentifier channel) const
Query the status of a particular channel or FEB This is the main client access method.
int feedthrough(const HWIdentifier id) const
Return the feedthrough of a hardware cell identifier : feedthrough = [0,31] Barrel - A/C side or H/...
virtual bool isEMECchannel(const HWIdentifier id) const =0
int slot(const HWIdentifier id) const
Return the slot number of a hardware cell identifier: slot = [1,15] Slot-ID in top part of the crat...
int barrel_ec(const HWIdentifier id) const
Return the position barrel or endcap of a hardware cell identifier: barrel_ec = [0,...
id_iterator channel_end() const
int channel(const HWIdentifier id) const
Return the channel number of a hardware cell identifier channel = [0,127] in all FEB.
id_iterator channel_begin() const
Returns an iterator pointing to a channel identifier collection.
int pos_neg(const HWIdentifier id) const
Return the side of a hardware cell identifier pos_neg = [0,1] positive-side or negative-side Barrel...
bool isFCALchannel(const HWIdentifier id) const
virtual bool isHECchannel(const HWIdentifier id) const =0
HWIdentifier feb_Id(int barrel_ec, int pos_neg, int feedthrough, int slot) const
Create feb_Id from fields.
std::string stringStatus(const LArBadChannel &bc) const
int count(std::string s, const std::string &regx)
count how many occurances of a regx are in a string
Definition hcg.cxx:146
::StatusCode StatusCode
StatusCode definition for legacy code.
long long ll

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< 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 & AthAlgorithm::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

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

Definition at line 50 of file AthAlgorithm.cxx.

51{
52 // If we didn't find any symlinks to add, just return the collection
53 // from the base class. Otherwise, return the extended collection.
54 if (!m_extendedExtraObjects.empty()) {
56 }
57 return Algorithm::extraOutputDeps();
58}

◆ initialize()

StatusCode LArBadChannel2Ascii::initialize ( )
finalvirtual

Definition at line 15 of file LArBadChannel2Ascii.cxx.

15 {
16
17 ATH_MSG_INFO ( "initialize()" );
18
19 ATH_CHECK(m_BCKey.initialize());
20
21 ATH_CHECK(m_BFKey.initialize(!m_executiveSummaryFile.empty()));
22
24
25 return StatusCode::SUCCESS;
26}
#define ATH_CHECK
Evaluate an expression and check for errors.

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< 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.

◆ msg()

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ msgLvl()

bool AthCommonMsg< 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< 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< 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< Algorithm > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ sysInitialize()

StatusCode AthAlgorithm::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< Algorithm > >.

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

Definition at line 66 of file AthAlgorithm.cxx.

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

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< 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< 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 }
std::vector< SG::VarHandleKeyArray * > m_vhka

◆ writeSum()

void LArBadChannel2Ascii::writeSum ( std::ofstream & exeFile,
const std::vector< unsigned > & probs,
const std::vector< unsigned > & nChans ) const
private

Definition at line 245 of file LArBadChannel2Ascii.cxx.

245 {
246
247 const unsigned nTot=std::accumulate(nChans.begin(),nChans.end(),0);
248 const unsigned nTotProb=std::accumulate(probs.begin(),probs.end(),0);
249
250 constexpr const char* fmt="{:>7}: {:>5} of {} ({:.3f}%)\n";
251 //avoid divide by zero, return 0. instead
252 auto f = [](unsigned den)->double{
253 if (den > 0) return 100./den;
254 return 0.;
255 };
256 exeFile << std::format(fmt, "EMB",probs[EMB], nChans[EMB], probs[EMB]*f(nChans[EMB]));
257 exeFile << std::format(fmt, "EMEC",probs[EMEC], nChans[EMEC], probs[EMEC]*f(nChans[EMEC]));
258 exeFile << std::format(fmt, "EM tot",probs[EMEC]+probs[EMB],nChans[EMB]+nChans[EMEC],(probs[EMEC]+probs[EMB])*f(nChans[EMEC]+nChans[EMB]));
259 exeFile << std::format(fmt, "EMEC",probs[HEC], nChans[HEC], probs[HEC]*f(nChans[HEC]));
260 exeFile << std::format(fmt, "EMEC",probs[FCAL], nChans[FCAL], probs[FCAL]*f(nChans[FCAL]));
261 exeFile << std::format(fmt, "Total",nTotProb,nTot,nTotProb*f(nTot));
262
263 exeFile << std::endl;
264
265}
const char *const fmt

Member Data Documentation

◆ m_BCKey

SG::ReadCondHandleKey<LArBadChannelCont> LArBadChannel2Ascii::m_BCKey {this,"BCKey","LArBadChannel"}
private

Definition at line 32 of file LArBadChannel2Ascii.h.

32{this,"BCKey","LArBadChannel"};

◆ m_BFKey

SG::ReadCondHandleKey<LArBadFebCont> LArBadChannel2Ascii::m_BFKey {this,"BFKey","LArBadFeb"}
private

Definition at line 33 of file LArBadChannel2Ascii.h.

33{this,"BFKey","LArBadFeb"};

◆ m_cablingKey

SG::ReadCondHandleKey<LArOnOffIdMapping> LArBadChannel2Ascii::m_cablingKey {this,"LArOnOffIdMapKey","LArOnOffIdMap"}
private

Definition at line 34 of file LArBadChannel2Ascii.h.

34{this,"LArOnOffIdMapKey","LArOnOffIdMap"};

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< 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< Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_executiveSummaryFile

Gaudi::Property<std::string> LArBadChannel2Ascii::m_executiveSummaryFile {this,"ExecutiveSummaryFile",""}
private

Definition at line 37 of file LArBadChannel2Ascii.h.

37{this,"ExecutiveSummaryFile",""};

◆ m_extendedExtraObjects

DataObjIDColl AthAlgorithm::m_extendedExtraObjects
privateinherited

Definition at line 79 of file AthAlgorithm.h.

◆ m_fileName

Gaudi::Property<std::string> LArBadChannel2Ascii::m_fileName {this,"FileName",""}
private

Definition at line 36 of file LArBadChannel2Ascii.h.

36{this,"FileName",""};

◆ m_isSC

Gaudi::Property<bool> LArBadChannel2Ascii::m_isSC {this,"SuperCell",false}
private

Definition at line 40 of file LArBadChannel2Ascii.h.

40{this,"SuperCell",false};

◆ m_skipDisconnected

Gaudi::Property<bool> LArBadChannel2Ascii::m_skipDisconnected {this,"SkipDisconnected",true}
private

Definition at line 39 of file LArBadChannel2Ascii.h.

39{this,"SkipDisconnected",true};

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.

◆ m_wMissing

Gaudi::Property<bool> LArBadChannel2Ascii::m_wMissing {this,"WithMissing",false}
private

Definition at line 38 of file LArBadChannel2Ascii.h.

38{this,"WithMissing",false};

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