|
ATLAS Offline Software
|
Go to the documentation of this file.
35 m_pedGroups = buildToolMap<std::vector<int>>(
m_tools,
"TileDigiNoisePed", Tile::MAX_ROS - 1, Tile::MAX_GAIN);
36 m_hfnGroups = buildToolMap<std::vector<int>>(
m_tools,
"TileDigiNoiseHFN", Tile::MAX_ROS - 1, Tile::MAX_GAIN);
38 return StatusCode::SUCCESS;
56 <<
" BCID = " << eventInfo->
bcid()
59 const std::vector<xAOD::EventInfo::StreamTag>& evtStreamTags = eventInfo->
streamTags();
60 if (!evtStreamTags.empty()) {
62 for (
const auto& evtStreamTag : evtStreamTags) {
63 msg(
MSG::DEBUG) <<
" " << evtStreamTag.name() <<
"/" << evtStreamTag.type();
76 std::vector<int> drawers[Tile::MAX_ROS - 1][Tile::MAX_GAIN];
77 std::vector<int>
channels[Tile::MAX_ROS - 1][Tile::MAX_GAIN];
78 std::vector<float> pedestals[Tile::MAX_ROS - 1][Tile::MAX_GAIN];
79 std::vector<float> hfns[Tile::MAX_ROS - 1][Tile::MAX_GAIN];
81 int nChannelsInPartition = 2880;
83 if (
partition > 1) nChannelsInPartition = 2048;
84 for (
unsigned int gain : {0, 1}) {
101 if (digitsCollection->empty() )
continue;
103 if (digitsCollection->getLvl1Type() != lvl1TriggerType) {
104 ATH_MSG_DEBUG(
"Level1 Trigger Type in Tile digits [0x" << std::hex
105 << digitsCollection->getLvl1Type() <<
"] != [0x"
106 << lvl1TriggerType << std::dec <<
"] from the event info");
110 HWIdentifier adc_id = digitsCollection->front()->adc_HWID();
116 unsigned int nBadOrDisconnectedChannels = 0;
119 ++nBadOrDisconnectedChannels;
124 if (digitsCollection->size() < nRequiredChannels) {
125 ATH_MSG_DEBUG(
"Number of Tile channels with digits [" << digitsCollection->size()
126 <<
"] less than expected [" << nRequiredChannels <<
"]");
132 int fragId = digitsCollection->identify();
137 for (
const TileDigits* tile_digits : *digitsCollection) {
139 adc_id = tile_digits->adc_HWID();
163 std::vector<float> digits = tile_digits->samples();
165 double sampleMean = 0.0;
166 double sampleRMS = 0.0;
167 unsigned int nSamples = digits.size();
169 for (
double sample : digits) {
175 double pedestal = digits[0];
190 sampleRMS = sampleRMS /
nSamples - sampleMean * sampleMean;
191 sampleRMS = (sampleRMS > 0.0) ? sqrt(sampleRMS *
nSamples / (
nSamples - 1)) : 0.0;
201 for (
unsigned int gain = 0;
gain < Tile::MAX_GAIN; ++
gain) {
215 fill(
"TileDigiNoiseMonExecuteTime",
timer);
217 return StatusCode::SUCCESS;
def retrieve(aClass, aKey=None)
Gaudi::Property< bool > m_ignoreDisconnectedChannels
std::string find(const std::string &s)
return a remapped string
virtual StatusCode fillHistograms(const EventContext &ctx) const override
adds event to the monitoring histograms
uint64_t eventNumber() const
The current event's event number.
const TileHWID * m_tileHWID
bool msgLvl(const MSG::Level lvl) const
SG::ReadCondHandleKey< TileDCSState > m_DCSStateKey
Name of TileDCSState object in condition store.
#define ATH_MSG_VERBOSE(x)
Gaudi::Property< bool > m_checkDCS
bool isStatusBad(unsigned int ros, unsigned int drawer) const
Return true if given Tile drawer considered as bad by summary drawer states per LVPS otherwise return...
uint32_t runNumber() const
The current event's run number.
int channel(const HWIdentifier &id) const
extract channel field from HW identifier
def timer(name, disabled=False)
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
ValuesCollection< T > Collection(std::string name, const T &collection)
Declare a monitored (double-convertible) collection.
int ros(const HWIdentifier &id) const
extract ros field from HW identifier
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Class that holds Data Quality fragment information and provides functions to extract the data quality...
int adc(const HWIdentifier &id) const
extract adc field from HW identifier
SG::ReadCondHandleKey< TileBadChannels > m_badChannelsKey
Name of TileBadChannels in condition store.
Generic monitoring tool for athena components.
::StatusCode StatusCode
StatusCode definition for legacy code.
Gaudi::Property< bool > m_fillPedestalDifference
Gaudi::Property< std::vector< unsigned int > > m_triggerTypes
void fill(const ToolHandle< GenericMonitoringTool > &groupHandle, std::vector< std::reference_wrapper< Monitored::IMonitoredVariable >> &&variables) const
Fills a vector of variables to a group by reference.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
ToolHandle< TileCondToolNoiseSample > m_tileCondToolNoiseSample
std::vector< std::vector< int > > m_hfnGroups
SG::ReadHandle< xAOD::EventInfo > GetEventInfo(const EventContext &) const
Return a ReadHandle for an EventInfo object (get run/event numbers, etc.)
ServiceHandle< TileCablingSvc > m_cablingSvc
Name of Tile cabling service.
uint32_t lumiBlock() const
The current event's luminosity block number.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
bool isAdcDQgood(int partition, int drawer, int ch, int gain) const
returns status of single ADC returns False if there are any errors
ToolHandleArray< GenericMonitoringTool > m_tools
Array of Generic Monitoring Tools.
const TileCablingService * m_cabling
StatusCode initialize(bool used=true)
std::vector< std::vector< int > > m_pedGroups
Class describing the basic event information.
const TileBchStatus & getAdcStatus(const HWIdentifier adc_id) const
Return Tile ADC status.
const std::vector< StreamTag > & streamTags() const
Get the streams that the event was put in.
virtual StatusCode initialize() override
initialize
bool isDisconnected(int ros, int drawer, int channel) const
int drawer(const HWIdentifier &id) const
extract drawer field from HW identifier
SG::ReadHandleKey< TileDQstatus > m_DQstatusKey
uint16_t level1TriggerType() const
The Level-1 trigger type.
Condition object to keep Tile DCS status from DB.
static unsigned int getDrawerIdx(unsigned int ros, unsigned int drawer)
Returns a drawer hash.
std::string to_string(const HWIdentifier &id, int level=0) const
extract all fields from HW identifier HWIdentifier get_all_fields ( const HWIdentifier & id,...
Handle class for reading from StoreGate.
static const unsigned int MAX_CHAN
Number of channels in drawer.
uint32_t bcid() const
The bunch crossing ID of the event.
Gaudi::Property< std::vector< int > > m_fragIDsToIgnoreDMUerrors
SG::ReadHandleKey< TileDigitsContainer > m_digitsContainerKey
const_pointer_type cptr()
virtual StatusCode initialize() override
initialize