ATLAS Offline Software
ForwardEventInfoCnvTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // Gaudi/Athena include(s):
7 
8 // Old EDM Includes:
10 
11 // New EDM
13 
14 // Local include(s):
16 
17 
18 namespace xAODMaker {
19 
21  const std::string& name,
22  const IInterface* parent )
23  : AthAlgTool( type, name, parent ) {
24 
25  // Declare the interface(s) provided by the tool:
26  declareInterface< IForwardEventInfoCnvTool >(this);
27  }
28 
31  {
32  if (!aod) {
33  ATH_MSG_WARNING("No input ForwardEventInfo Collection passed");
34  return StatusCode::SUCCESS;
35  }
36 
37  // Create the xAOD objects:
39  xaod->push_back( xfwinfo );
40 
41  xfwinfo->setTimeDiff(aod->timeA() - aod->timeC());
42  xfwinfo->setTimeA(aod->timeA());
43  xfwinfo->setTimeC(aod->timeC());
44  xfwinfo->setCountA(aod->ncellA());
45  xfwinfo->setCountC(aod->ncellC());
46 
47  // Return gracefully:
48  return StatusCode::SUCCESS;
49  }
50 }
51 
MBTSCollisionTime::timeC
double timeC() const
time C side
Definition: MBTSCollisionTime.h:52
xAOD::ForwardEventInfo_v1::setTimeC
void setTimeC(float val)
MBTSCollisionTime::ncellC
int ncellC() const
get number of cells for time C side
Definition: MBTSCollisionTime.h:34
xAODMaker
Definition: StoreGateSvc.h:72
MBTSCollisionTime.h
MBTSCollisionTime
Holds information about collisions timing from MBTS counters.
Definition: MBTSCollisionTime.h:20
ForwardEventInfoCnvTool.h
xAODMaker::ForwardEventInfoCnvTool::ForwardEventInfoCnvTool
ForwardEventInfoCnvTool(const std::string &type, const std::string &name, const IInterface *parent)
Regular AlgTool constructor.
Definition: ForwardEventInfoCnvTool.cxx:20
xAOD::ForwardEventInfo_v1::setTimeDiff
void setTimeDiff(float val)
xAOD::ForwardEventInfo_v1::setCountA
void setCountA(unsigned short val)
MBTSCollisionTime::timeA
double timeA() const
time A side
Definition: MBTSCollisionTime.h:49
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
test_pyathena.parent
parent
Definition: test_pyathena.py:15
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
xAODMaker::ForwardEventInfoCnvTool::convert
virtual StatusCode convert(const MBTSCollisionTime *aod, xAOD::ForwardEventInfoContainer *xaod) const override
Function that fills an existing xAOD::ForwardEventInfoContainer.
Definition: ForwardEventInfoCnvTool.cxx:29
xAOD::ForwardEventInfo_v1::setTimeA
void setTimeA(float val)
xAOD::ForwardEventInfo
ForwardEventInfo_v1 ForwardEventInfo
Definition: ForwardEventInfo.h:17
MBTSCollisionTime::ncellA
int ncellA() const
get number of cells for time A side
Definition: MBTSCollisionTime.h:31
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
errorcheck.h
Helpers for checking error return status codes and reporting errors.
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
xAOD::ForwardEventInfo_v1
add description
Definition: ForwardEventInfo_v1.h:17
xAOD::ForwardEventInfo_v1::setCountC
void setCountC(unsigned short val)
AthAlgTool
Definition: AthAlgTool.h:26
ForwardEventInfoAuxContainer.h