ATLAS Offline Software
Loading...
Searching...
No Matches
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
18namespace 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
#define ATH_MSG_WARNING(x)
Helpers for checking error return status codes and reporting errors.
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
value_type push_back(value_type pElem)
Add an element to the end of the collection.
Holds information about collisions timing from MBTS counters.
int ncellA() const
get number of cells for time A side
int ncellC() const
get number of cells for time C side
double timeC() const
time C side
double timeA() const
time A side
ForwardEventInfoCnvTool(const std::string &type, const std::string &name, const IInterface *parent)
Regular AlgTool constructor.
virtual StatusCode convert(const MBTSCollisionTime *aod, xAOD::ForwardEventInfoContainer *xaod) const override
Function that fills an existing xAOD::ForwardEventInfoContainer.
void setTimeA(float val)
void setCountC(unsigned short val)
void setTimeC(float val)
void setTimeDiff(float val)
void setCountA(unsigned short val)
ForwardEventInfo_v1 ForwardEventInfo
ForwardEventInfoContainer_v1 ForwardEventInfoContainer