|
ATLAS Offline Software
|
Go to the documentation of this file.
8 #include "GaudiKernel/INTupleSvc.h"
19 #include "CaloDetDescr/CaloDetDescrElement.h"
46 m_nWrongBunchGroup(0),
50 m_onlineHelper(nullptr),
127 return StatusCode::SUCCESS;
133 m_runData = std::make_unique<RunData>(0);
136 std::vector<std::regex> regexs;
143 std::vector<std::string> myChains;
155 if (calibStreamGroup) {
162 unsigned int idx = 0;
166 for (
const std::string& l1Item :
group->getListOfTriggers()) {
169 ATH_MSG_WARNING (
"LVL1 item " << l1Item <<
", obtained from TrigConfig, cannot be retrieved!" );
173 if (pos < 0 || pos >= 256) {
178 ATH_MSG_INFO (
"Adding LVL1 trigger bit for " << l1Item <<
" at position " <<
pos );
183 for (
const std::string&
name : myChains) {
198 return StatusCode::SUCCESS;
205 const EventContext& ctx = Gaudi::Hive::currentContext();
209 return StatusCode::SUCCESS;
220 int bunchId = eventInfo->
bcid();
226 return StatusCode::SUCCESS;
232 if (!bunchCrossing) {
234 return StatusCode::FAILURE;
245 return StatusCode::SUCCESS;
254 if (
eventIndex < 0)
return StatusCode::FAILURE;
263 if (larDigitContainer->
empty()) {
266 return StatusCode::SUCCESS;
274 const LArOnOffIdMapping*
cabling=*cablingHdl;
276 ATH_MSG_ERROR(
"Do not have cabling object LArOnOffIdMapping" );
277 return StatusCode::FAILURE;
284 return StatusCode::FAILURE;
291 return StatusCode::FAILURE;
298 return StatusCode::FAILURE;
303 if (
evtStore()->contains<LArOFIterResultsContainer> (
"LArOFIterResult")) {
312 const std::map<unsigned int,uint16_t>& febErrorMap = larFebErrorSummary->
get_all_febs();
313 std::map<unsigned int, const LArRawChannel*> channelsToKeep;
323 if (!
hash.is_valid()) {
325 <<
") does not correspond to a valid hash -- returning StatusCode::FAILURE." );
326 return StatusCode::FAILURE;
333 HWIdentifier channelID =
channel->hardwareID();
343 std::map<HWIdentifier, LArOFIterResultsContainer::const_iterator> ofcResultPosition;
345 for (LArOFIterResultsContainer::const_iterator ofResult = ofIterResult->begin();
346 ofResult != ofIterResult->end(); ++ofResult)
347 ofcResultPosition[ofResult->getChannelID()] = ofResult;
350 <<
" " << (ofIterResult ? ofIterResult->size() : 0) <<
" "
362 std::map<unsigned int, const LArRawChannel*>::const_iterator findChannel = channelsToKeep.find(
hash);
363 if (findChannel == channelsToKeep.end())
continue;
367 HWIdentifier channelID = (*digit)->hardwareID();
377 const bool connected =
cabling->isOnlineConnected(channelID);
384 const std::vector<short>& samples = (*digit)->samples();
386 for (
short sample : samples)
398 if (!caloDetElement) caloDetElement = caloMgr->
get_element(
id);
407 unsigned int status = 0xFFFFFFFF;
409 if (!caloDetElement) caloDetElement = caloMgr->
get_element(
id);
411 status = bcCont->status(channelID).packedData();
413 std::map<unsigned int,uint16_t>::const_iterator findError = febErrorMap.find(febId.get_identifier32().get_compact());
414 if (findError != febErrorMap.end()) {
415 unsigned int febErrWord = findError->second;
425 ATH_MSG_WARNING (
"AutoCorr object is not of type LArAutoCorrComplete!" );
430 if (!
info->shape((*digit)->gain()))
435 if (
eventIndex < 0)
return StatusCode::FAILURE;
441 rawChannel->
time()/
double(1000),
459 data->setADCMax(rawChannel->
energy()/ramp[1]);
466 return StatusCode::SUCCESS;
473 return StatusCode::SUCCESS;
490 ATH_MSG_INFO (
"Cell with no cellInfo at index " <<
i <<
" !!" );
517 return StatusCode::SUCCESS;
525 std::vector<unsigned int> triggerWords;
532 const std::vector<ROIB::CTPRoI> tav = l1Result->
cTPResult().
TAV();
534 triggerWords.push_back(word.roIWord());
536 for (
const std::pair<const TString, unsigned int>&
p :
m_runData->triggerConfig()) {
537 while (triggerWords.size() <=
p.second/32) triggerWords.push_back(0);
539 triggerWords[
p.second/32] |= (0x1 << (
p.second % 32));
561 eventData->
addRoI(roI.cptr()->eta(), roI.cptr()->phi(),
group->getListOfTriggers()[0].c_str(), roI.label().c_str());
def retrieve(aClass, aKey=None)
ToolHandle< ILArShapeDumperTool > m_dumperTool
ROIB::CTPRoI contains a RoI delivered by the CTP.
virtual float pedestal(const HWIdentifier &id, int gain) const =0
bool m_gains[CaloGain::LARNGAIN]
SG::ReadCondHandleKey< CaloNoise > m_noiseCDOKey
char data[hepevt_bytes_allocation_ATLAS]
const LArVectorProxy ADC2MEV(const HWIdentifier &id, int gain) const
Const iterator class for DataVector/DataList.
IdentifierHash channel_Hash(HWIdentifier channelId) const
Create channel_hash from channel_Id.
const std::map< unsigned int, uint16_t > & get_all_febs() const
get all febs with error
#define maxValue(current, test)
void setRunData(const RunData *runData)
uint64_t eventNumber() const
The current event's event number.
Class holding the LVL1 RoIB result build by the RoIBuilder.
const HistoryContainer * historyContainer(unsigned int i) const
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
virtual StatusCode execute() override
Conditions-Data class holding LAr Bad Channel or Bad Feb information.
LArBadChannelMask m_bcMask
const_pointer_type cptr() const
safer explicit ptr accessor
LArShapeDumper(const std::string &name, ISvcLocator *pSvcLocator)
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
const CaloDetDescrElement * get_element(const Identifier &cellId) const
get element by its identifier
unsigned int addEvent(EventData *eventData)
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...
StatusCode buildBitMask(const std::vector< std::string > &problemsToMask, MsgStream &msg)
nope - should be used for standalone also, perhaps need to protect the class def bits #ifndef XAOD_AN...
virtual StatusCode initialize() override
void addRoI(float eta, float phi, const char *name="", const char *label="")
#define ATH_MSG_VERBOSE(x)
std::vector< std::string > m_triggerNames
float getNoise(const IdentifierHash h, const int gain) const
Accessor by IdentifierHash and gain.
bool cellShouldBeMasked(const LArBadChannelCont *bcCont, const HWIdentifier &hardwareId) const
unsigned m_nPrescaledAway
@ LAr
The LAr calorimeter.
uint32_t runNumber() const
The current event's run number.
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
@ Error
The sub-detector issued an error.
Definition of CaloDetDescriptor.
bool isFCALchannel(const HWIdentifier id) const
This class implements the ILArAutoCorr interface.
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
std::string m_channelsKey
HistoryContainer *& hist_cont(unsigned int i)
bool isEMECchannel(const HWIdentifier id) const override final
Gaudi::Property< std::vector< std::string > > m_problemsToMask
POOL::TEvent event(POOL::TEvent::kClassAccess)
Liquid Argon ROD output object base class.
::StatusCode StatusCode
StatusCode definition for legacy code.
SG::ReadCondHandleKey< LArADC2MeV > m_adc2mevKey
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
unsigned int nChannels() const
#define CHECK(...)
Evaluate an expression and check for errors.
InDet::SiSpacePointsSeedMakerEventData EventData
void setTriggerData(const std::vector< unsigned int > &words)
CellInfo * cell_info() const
uint32_t lumiBlock() const
The current event's luminosity block number.
HWIdentifier feb_Id(int barrel_ec, int pos_neg, int feedthrough, int slot) const
Create feb_Id from fields.
const CTPResult & cTPResult() const
Gets the CTP part of the L1 RDO.
StatusCode initialize(bool used=true)
storage of the time histories of all the cells
bool isEMBchannel(const HWIdentifier id) const
SG::ReadCondHandleKey< ILArPedestal > m_pedestalKey
Class describing the basic event information.
const std::vector< CTPRoI > TAV() const
get trigger result after veto
const CellInfo * cellInfo() const
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
virtual StatusCode start() override
SG::ReadCondHandleKey< BunchCrossingCondData > m_bcDataKey
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
unsigned int addRun(RunData *eventData)
This class provides the client interface for accessing the detector description information common to...
std::unique_ptr< LArSamples::RunData > m_runData
LArSamples::DataStore * m_samples
virtual StatusCode finalize() override
#define ATH_MSG_WARNING(x)
Holds information from the FEB Error Summary.
void add(const DataContainer *data)
append data (takes ownership)
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
const DataHandle< ILArAutoCorr > m_autoCorr
virtual StatusCode stop() override
SG::ReadCondHandleKey< LArBadChannelCont > m_BCKey
EventFlagErrorState errorState(EventFlagSubDet subDet) const
Get the error state for a particular sub-detector.
Container class for LArDigit.
std::vector< const Trig::ChainGroup * > m_triggerGroups
unsigned m_nWrongBunchGroup
bool isHECchannel(const HWIdentifier id) const override final
const LArOnlineID * m_onlineHelper
std::vector< std::string > getListOfTriggers() const
PublicToolHandle< Trig::TrigDecisionTool > m_trigDec
uint32_t bcid() const
The bunch crossing ID of the event.
virtual float pedestalRMS(const HWIdentifier &id, int gain) const =0
access to RMS of Pedestal index by Identifier, and gain setting
size_type size() const noexcept
Returns the number of elements in the collection.
int makeEvent(LArSamples::EventData *&eventData, int run, int event, int lumiBlock, int bunchXing) const
bool empty() const noexcept
Returns true if the collection is empty.
bool writeTrees(const char *fileName)
virtual AutoCorrRef_t autoCorr(const HWIdentifier &CellID, int gain) const
bool match(std::string s1, std::string s2)
match the individual directories of two strings
HWIdentifier feedthrough_Id(int barrel_ec, int pos_neg, int feedthrough) const
Create a feedthrough identifier from fields.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
bool isFilled(const bcid_type bcid) const
The simplest query: Is the bunch crossing filled or not?
Proxy for accessing a range of float values like a vector.
Container for LArRawChannel (IDC using LArRawChannelCollection)
HistoryContainer * makeNewHistory(const IdentifierHash &hash, CellInfo *info)
append data (takes ownership of everything)
thread_local event_number_t eventIndex