71 bunch_crossing_id = thisEvent->bcid();
74 lumi_block = thisEvent->lumiBlock();
78 ATH_MSG_WARNING(
"Unable to retrieve BunchCrossing conditions object" );
79 return StatusCode::SUCCESS;
83 if (!bcData->
isFilled(bunch_crossing_id)) {
84 ATH_MSG_INFO(
"BCID: "<<bunch_crossing_id<<
" empty ? not filling the coll. time" );
85 return StatusCode::SUCCESS;
96 return StatusCode::SUCCESS;
98 ATH_MSG_DEBUG(
"LArCollisionTime successfully retrieved from event store" );
104 ecTimeDiff = (larTime->timeC() - larTime->timeA())/
m_timeUnit;
105 ecTimeAvg = (larTime->timeC() + larTime->timeA())/(
m_timeUnit*2.);
110 if (
m_eWeighted) weight = (larTime->energyA()+larTime->energyC())*1e-3;
113 ATH_MSG_DEBUG(
"time A = " << larTime->timeA() <<
" time C = " << larTime->timeC() <<
" diff = " << larTime->timeC() - larTime->timeA() <<
"saved diff = " << ecTimeDiff );
117 lumi_block_timeWindow=lumi_block;
121 lumi_block_singleBeam_timeWindow=lumi_block;
127 ATH_MSG_DEBUG(
"BCID: "<<bunch_crossing_id<<
" distance from Front: "<<bcid_distance<<
"Filling in train...");
138 else ATH_MSG_WARNING(
"I should be filling the 'inTrain' group now, but it looks undefined. Did you remember to set 'm_InTrain_MonGroupName' in the python?" );
141 ATH_MSG_DEBUG(
"LAr below cuts ncells: " << larTime->ncellA() <<
" " << larTime->ncellC() <<
" times: " << larTime->timeA() <<
" " <<larTime->timeC() <<
" " << std::fabs(ecTimeDiff) <<
", not filling !" );
145 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
Handle class for reading a decoration on an object.
virtual StatusCode initialize() override
initialize
SG::ReadHandle< xAOD::EventInfo > GetEventInfo(const EventContext &) const
Return a ReadHandle for an EventInfo object (get run/event numbers, etc.)
AthMonitorAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
int distanceFromFront(const bcid_type bcid, const BunchDistanceType type=NanoSec) const
The distance of the specific bunch crossing from the front of the train.
@ BunchCrossings
Distance in units of 25 nanoseconds.
bool isFilled(const bcid_type bcid) const
The simplest query: Is the bunch crossing filled or not?
Gaudi::Property< bool > m_IsOnline
virtual StatusCode fillHistograms(const EventContext &ctx) const override
Called each event.
Gaudi::Property< int > m_distance
SG::ReadHandleKey< LArCollisionTime > m_LArCollisionTimeKey
LArCollisionTimeMonAlg(const std::string &name, ISvcLocator *pSvcLocator)
Gaudi::Property< float > m_timeCut
Gaudi::Property< int > m_minCells
virtual StatusCode initialize() override
Overwrite dummy method from AlgTool.
Gaudi::Property< double > m_timeUnit
Gaudi::Property< std::string > m_InTrain_MonGroupName
Gaudi::Property< std::string > m_MonGroupName
SG::ReadDecorHandleKey< xAOD::EventInfo > m_eventInfoDecorKey
SG::ReadCondHandleKey< BunchCrossingCondData > m_bunchCrossingKey
virtual ~LArCollisionTimeMonAlg()
Default destructor.
Gaudi::Property< bool > m_eWeighted
Declare a monitored scalar variable.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
@ LAr
The LAr calorimeter.
Generic monitoring tool for athena components.
void fill(H5::Group &out_file, size_t iterations)