|
ATLAS Offline Software
|
#include <LArCablingChecker.h>
|
| LArCablingChecker (const std::string &name, ISvcLocator *pSvcLocator) |
|
| ~LArCablingChecker () |
|
StatusCode | initialize () |
|
StatusCode | execute () |
|
StatusCode | finalize () |
|
virtual StatusCode | sysInitialize () override |
| Override sysInitialize. More...
|
|
virtual const DataObjIDColl & | extraOutputDeps () const override |
| Return the list of extra output dependencies. More...
|
|
ServiceHandle< StoreGateSvc > & | evtStore () |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | evtStore () const |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | detStore () const |
| The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
virtual StatusCode | sysStart () override |
| Handle START transition. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. More...
|
|
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T > &t) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| Declare a new Gaudi property. More...
|
|
void | updateVHKA (Gaudi::Details::PropertyBase &) |
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
Definition at line 20 of file LArCablingChecker.h.
◆ StoreGateSvc_t
◆ LArCablingChecker()
LArCablingChecker::LArCablingChecker |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ ~LArCablingChecker()
LArCablingChecker::~LArCablingChecker |
( |
| ) |
|
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey
. It just forwards to the base class version of declareProperty
.
Definition at line 333 of file AthCommonDataStore.h.
338 return PBASE::declareProperty(
name, property,
doc);
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This dispatches to either the generic declareProperty
or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
◆ declareProperty() [6/6]
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ execute()
StatusCode LArCablingChecker::execute |
( |
| ) |
|
Definition at line 76 of file LArCablingChecker.cxx.
77 const EventContext& ctx = Gaudi::Hive::currentContext();
78 unsigned eventNb = ctx.eventID().event_number();
80 ATH_MSG_INFO (
"======== executing event "<< eventNb <<
" ========" );
95 return StatusCode::FAILURE;
101 ATH_MSG_ERROR(
"Do not have cabling object LArOnOffIdMapping" );
102 return StatusCode::FAILURE;
109 return StatusCode::FAILURE;
121 int cellsCounter = 0;
123 int inconsistencyCounter = 0;
124 int disconnectedCounter = 0;
125 int badChannelCounter = 0;
133 std::ostringstream ErrorList;
148 if (!
cabling->isOnlineConnected(online_id)) {
150 disconnectedCounter++;
152 disconnected =
false;
157 bool noOffline_id =
false;
159 offline_id =
cabling->cnvToIdentifier(online_id);
167 const int max = *max_element(
digit->samples().begin(),
digit->samples().end());
169 signalPresent =
true;
171 signalPresent =
false;
177 std::ostringstream PulserList;
178 const std::vector<HWIdentifier>& calibChannelIDs=clCont->calibSlotLine(online_id);
182 bool isPulsed=calibParams->
isPulsed(eventNb, hwid);
184 int DACvalue_temp = calibParams->
DAC(eventNb, hwid);
185 if (DACvalue_temp > DACvalue)
186 DACvalue = DACvalue_temp;
190 PulserList << std::hex << hwid.get_compact() << std::dec <<
" " << slot <<
" " <<
line <<
" ";
196 bool DACOverThreshold;
213 if (bcCont->offlineStatus(offline_id).good()) {
225 bool inconsistency = (signalPresent != pulsed) && DACOverThreshold;
227 inconsistencyCounter++;
229 bool errorInCell = inconsistency || badChannel;
233 std::ostringstream CellData;
234 CellData <<
"0x" << std::hex << std::setw(8) << febid.
get_compact() << std::dec
237 << std::setw(5) << chNb;
239 CellData << std::setw(5);
245 CellData << std::setw(5);
251 CellData << std::setw(5);
257 CellData << std::setw(7) <<
max;
259 CellData << std::setw(7) << DACvalue;
261 CellData << std::setw(7) <<
"-";
266 ErrorList << CellData.str() << std::endl;
292 ErrorList << CellData.str();
295 ErrorList <<
" " << PulserList.str();
297 ErrorList << std::endl;
302 ErrorList << std::endl;
305 ErrorList <<
"Examined " << cellsCounter <<
" cells in event " << eventNb <<
". Found:" << std::endl;
306 ErrorList << std::left << std::setw(25) <<
"Inconsistencies: "
307 << std::right << std::setw(4) << inconsistencyCounter << std::endl;
308 ErrorList << std::left << std::setw(25) <<
"Bad cells: "
309 << std::right << std::setw(4) << badChannelCounter << std::endl;
310 ErrorList << std::left << std::setw(25) <<
"Sum errors: "
312 ErrorList << std::left << std::setw(25) <<
"Disconnected cells: "
313 << std::right << std::setw(4) << disconnectedCounter << std::endl;
314 ErrorList << std::endl;
330 m_outfile <<
"Error in event "<< std::setw(7) << eventNb
331 <<
" ==========================================================================" << std::endl;
332 m_outfile <<
"I=Inconsistency P=Pulsed S=Signal B=Bad D=Disconnected" << std::endl;
334 << std::left << std::setw(10) <<
"FEB"
335 << std::right << std::setw(5) <<
"FT"
336 << std::setw(5) <<
"SL"
337 << std::setw(5) <<
"CH"
338 << std::setw(5) <<
"Smpl"
339 << std::setw(5) <<
"Eta"
340 << std::setw(5) <<
"Phi"
341 << std::setw(7) <<
"ADC"
342 << std::setw(7) <<
"DAC"
343 <<
" Pulsed by calibchannel slot line"
353 m_outfile <<
"Status of event "<< std::setw(7) << eventNb
354 <<
" ==========================================================================" << std::endl;
355 m_outfile <<
"I=Inconsistency P=Pulsed S=Signal B=Bad D=Disconnected" << std::endl;
357 << std::left << std::setw(10) <<
"FEB"
358 << std::right << std::setw(5) <<
"FT"
359 << std::setw(5) <<
"SL"
360 << std::setw(5) <<
"CH"
361 << std::setw(5) <<
"Smpl"
362 << std::setw(5) <<
"Eta"
363 << std::setw(5) <<
"Phi"
364 << std::setw(7) <<
"ADC"
365 << std::setw(7) <<
"DAC"
366 <<
" Pulsed by slot line"
372 return StatusCode::SUCCESS;
◆ extraDeps_update_handler()
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.
57 return Algorithm::extraOutputDeps();
◆ finalize()
StatusCode LArCablingChecker::finalize |
( |
| ) |
|
◆ initialize()
StatusCode LArCablingChecker::initialize |
( |
| ) |
|
Definition at line 44 of file LArCablingChecker.cxx.
56 return StatusCode::FAILURE;
72 ATH_MSG_DEBUG (
"======== LArCablingChecker initialize successfully ========" );
73 return StatusCode::SUCCESS;
◆ inputHandles()
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() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
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()
◆ renounceArray()
◆ sysInitialize()
StatusCode AthAlgorithm::sysInitialize |
( |
| ) |
|
|
overridevirtualinherited |
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ m_ADCThreshold
int LArCablingChecker::m_ADCThreshold |
|
private |
◆ m_BCKey
◆ m_cablingKey
◆ m_channelHashMax
◆ m_CLKey
◆ m_count
int LArCablingChecker::m_count |
|
private |
◆ m_DACHighGainThreshold
int LArCablingChecker::m_DACHighGainThreshold |
|
private |
◆ m_DACLowGainThreshold
int LArCablingChecker::m_DACLowGainThreshold |
|
private |
◆ m_DACMediumGainThreshold
int LArCablingChecker::m_DACMediumGainThreshold |
|
private |
◆ m_detStore
◆ m_emId
◆ m_errorcellsPreviousEvent
std::vector<bool>* LArCablingChecker::m_errorcellsPreviousEvent |
|
private |
◆ m_errorcellsThisEvent
std::vector<bool>* LArCablingChecker::m_errorcellsThisEvent |
|
private |
◆ m_errorCounterPreviousEvent
int LArCablingChecker::m_errorCounterPreviousEvent |
|
private |
◆ m_errorCounterThisEvent
int LArCablingChecker::m_errorCounterThisEvent |
|
private |
◆ m_evtStore
◆ m_extendedExtraObjects
DataObjIDColl AthAlgorithm::m_extendedExtraObjects |
|
privateinherited |
◆ m_key
std::string LArCablingChecker::m_key |
|
private |
◆ m_numberOfEventsWithThisErrorState
int LArCablingChecker::m_numberOfEventsWithThisErrorState |
|
private |
◆ m_onlineHelper
◆ m_outfile
std::ofstream LArCablingChecker::m_outfile |
|
private |
◆ m_outFileName
std::string LArCablingChecker::m_outFileName |
|
private |
◆ m_PrintAllCellsAndEvents
bool LArCablingChecker::m_PrintAllCellsAndEvents |
|
private |
◆ m_PrintDisconnectedCells
bool LArCablingChecker::m_PrintDisconnectedCells |
|
private |
◆ m_printEventSummary
bool LArCablingChecker::m_printEventSummary |
|
private |
◆ m_useBadChannelTool
bool LArCablingChecker::m_useBadChannelTool |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
int phi(const Identifier id) const
return phi according to :
IdentifierHash channel_Hash(HWIdentifier channelId) const
Create channel_hash from channel_Id.
const LArEM_ID * em_idHelper() const
access to EM idHelper
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Conditions-Data class holding LAr Bad Channel or Bad Feb information.
SG::ReadCondHandleKey< LArCalibLineMapping > m_CLKey
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...
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
value_type get_compact() const
Get the compact id.
int sampling(const Identifier id) const
return sampling according to :
int eta(const Identifier id) const
return eta according to :
bool m_PrintAllCellsAndEvents
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual void setOwner(IDataHandleHolder *o)=0
int m_DACMediumGainThreshold
int m_numberOfEventsWithThisErrorState
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
int channel(const HWIdentifier id) const
Return the channel number of a hardware cell identifier channel = [0,127] in all FEB.
const LArOnlineID * m_onlineHelper
virtual StatusCode sysInitialize() override
Override sysInitialize.
SG::ReadCondHandleKey< LArBadChannelCont > m_BCKey
std::string m_outFileName
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
Liquid Argon digit base class.
::StatusCode StatusCode
StatusCode definition for legacy code.
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
bool isPulsed(const unsigned event, const HWIdentifier calibLineID) const
Helper class for offline cell identifiers.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
bool m_PrintDisconnectedCells
std::vector< bool > * m_errorcellsThisEvent
HWIdentifier feb_Id(int barrel_ec, int pos_neg, int feedthrough, int slot) const
Create feb_Id from fields.
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
int m_errorCounterThisEvent
unsigned DAC(const unsigned event, const HWIdentifier calibLineID) const
int m_DACLowGainThreshold
size_type channelHashMax(void) const
Define channel hash tables max size.
StatusCode initialize(bool used=true)
DataObjIDColl m_extendedExtraObjects
int feedthrough(const HWIdentifier id) const
Return the feedthrough of a hardware cell identifier : feedthrough = [0,31] Barrel - A/C side or H/...
#define ATH_MSG_WARNING(x)
int m_DACHighGainThreshold
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Container class for LArDigit.
AthAlgorithm()
Default constructor:
LArOnlineID::size_type m_channelHashMax
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Exception class for LAr Identifiers.
int m_errorCounterPreviousEvent
std::vector< bool > * m_errorcellsPreviousEvent