![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
16 #include "GaudiKernel/MsgStream.h"
17 #include "GaudiKernel/StatusCode.h"
18 #include "GaudiKernel/DataObject.h"
19 #include "GaudiKernel/IRegistry.h"
26 #include "eformat/StreamTag.h"
31 :
Converter(storageType(), classID(), svcloc)
33 , m_ByteStreamCnvSvc(nullptr)
34 , m_robDataProvider(
"ROBDataProviderSvc",
"EventInfoByteStreamAuxCnv")
35 , m_mdSvc(
"InputMetaDataStore",
"EventInfoByteStreamAuxCnv")
36 , m_isSimulation(false)
38 , m_isCalibration(false)
59 IService*
svc{
nullptr};
61 if (!
sc.isSuccess()) {
68 return StatusCode::FAILURE;
74 SimpleProperty<bool> propIsSimulation(
"IsSimulation",
m_isSimulation);
85 SimpleProperty<bool> propIsTestbeam(
"IsTestbeam",
m_isTestbeam);
96 SimpleProperty<bool> propIsCalibration(
"IsCalibration",
m_isCalibration);
107 return StatusCode::SUCCESS;
115 if (
sc.isFailure()) {
127 return StatusCode::FAILURE;
136 return StatusCode::FAILURE;
144 if (
re->version() < 0x03010000) {
152 uint32_t bc_time_ns =
re->bc_time_nanoseconds();
154 if (bc_time_ns > 1000000000) {
158 bc_time_ns = bc_time_sec;
160 ATH_MSG_DEBUG(
"bc_time second/nanosecond swapped, sec/ns = " << bc_time_sec <<
" " << bc_time_ns);
164 ATH_MSG_WARNING(
"bc_time nanosecond number larger than 1e9, it is " << bc_time_ns <<
", reset it to 1 sec");
165 bc_time_ns = 1000000000;
175 unsigned int detMask0 = 0xFFFFFFFF, detMask1 = 0xFFFFFFFF, detMask2 = 0xFFFFFFFF, detMask3 = 0xFFFFFFFF;
179 if (!
status.isSuccess()) {
185 detMask0 = (
unsigned int)(detectorMask & 0x00000000FFFFFFFF);
186 detMask1 = (
unsigned int)(detectorMask >> 32);
188 detMask2 = (
unsigned int)(detectorMask2 & 0x00000000FFFFFFFF);
189 detMask3 = (
unsigned int)(detectorMask2 >> 32);
235 uint32_t level1TriggerType =
re->lvl1_trigger_type();
238 std::vector<xAOD::EventInfo::StreamTag> streamTags;
239 std::vector<eformat::helper::StreamTag> onl_streamTags;
242 for (
const eformat::helper::StreamTag& onl_streamTag : onl_streamTags) {
243 std::set<uint32_t> tmp_off_dets = std::set<uint32_t>();
244 if (!onl_streamTag.dets.empty()) {
245 std::set<eformat::SubDetector> tmp_onl_dets = onl_streamTag.dets;
246 for (
const eformat::SubDetector& subdet : tmp_onl_dets) {
247 tmp_off_dets.insert((
uint32_t) subdet);
252 , onl_streamTag.obeys_lumiblock
269 <<
" Time stamp = " <<
ascTime(bc_time_sec)
272 return StatusCode::SUCCESS;
277 ATH_MSG_DEBUG(
"Nothing to be done for xAOD::EventAuxInfo createReps");
278 return StatusCode::SUCCESS;
293 time_t
ct = mktime(&
t);
297 asctime_r (&
t2, buf);
298 return std::string (buf);
def finalize(self)
_info( "content of StoreGate..." ) self.sg.dump()
virtual StatusCode createObj(IOpaqueAddress *pAddr, DataObject *&pObj) override
converter method to create object
std::string ascTime(unsigned int t)
convert timestamp to ascii time.
void setEventNumber(uint64_t value)
Set the current event's event number.
Auxiliary information about the event.
@ IS_CALIBRATION
true: calibration, false: physics
OFFLINE_FRAGMENTS_NAMESPACE::FullEventFragment RawEvent
data type for reading raw event
DataObject * asStorable(T *pObject)
void setExtendedLevel1ID(uint32_t value)
Set the extended Level-1 identifier.
EventInfoByteStreamAuxCnv(ISvcLocator *svcloc)
@ IS_SIMULATION
true: simulation, false: data
bool setEventFlags(EventFlagSubDet subDet, uint32_t flags)
Set the event flags for a particular sub-detector.
static const CLID & ID()
the CLID of T
void setStreamTags(const std::vector< StreamTag > &value)
Set the streams that the event was put in.
void setLevel1TriggerType(uint16_t value)
Set the Level-1 trigger type.
ServiceHandle< StoreGateSvc > m_mdSvc
TDS handle.
void setMCEventNumber(uint64_t value)
Set the MC generator's event number.
void setEventTypeBitmask(uint32_t value)
Set the event type bitmask.
msgSvc
Provide convenience handles for various services.
void setStore(const SG::IConstAuxStore *store)
Set the store associated with this object.
void setDetectorMask(uint32_t mask0, uint32_t mask1)
Set the bit fields indicating with TTC timezones were present.
::StatusCode StatusCode
StatusCode definition for legacy code.
IOpaqueAddress for ByteStreamCnvSvc, with ROB ids.
Class to provide easy MsgStream access and capabilities.
#define CHECK(...)
Evaluate an expression and check for errors.
AthROOTErrorHandlerSvc * svc
void setStatusElement(uint32_t value)
Set the trigger status element.
void setTimeStamp(uint32_t value)
Set the POSIX time of the event.
void setBCID(uint32_t value)
Set the bunch crossing ID of the event.
uint32_t CLID
The Class ID type.
static long storageType()
EventAuxInfo_v3 EventAuxInfo
Definition of the latest event auxiliary info version.
ServiceHandle< IROBDataProviderSvc > m_robDataProvider
RODDataProviderSvc handle.
static constexpr long storageType()
void setDetectorMaskExt(uint32_t mask2, uint32_t mask3)
Set the bit fields indicating with TTC timezones were present.
virtual StatusCode finalize() override
Helpers for checking error return status codes and reporting errors.
Class describing the basic event information.
void setTimeStampNSOffset(uint32_t value)
Set the nanosecond offset wrt. the time stamp.
void setMCChannelNumber(uint32_t value)
Set the MC generator's channel number.
std::vector< ALFA_RawDataContainer_p1 > t2
The base class for offline and HLT ByteStream conversion services.
ByteStreamCnvSvcBase * m_ByteStreamCnvSvc
pointer to BS CnvSvc
#define ATH_MSG_WARNING(x)
void setRunNumber(uint32_t value)
Set the current event's run number.
const boost::regex re(r_e)
static const CLID & classID()
void setLumiBlock(uint32_t value)
Set the current event's luminosity block number.
virtual StatusCode createRep(DataObject *pObj, IOpaqueAddress *&pAddr) override
converter method to write object
virtual StatusCode initialize() override
@ IS_TESTBEAM
true: testbeam, false: full detector
@ Core
Core flags describing the event.
Class describing a stream tag on the event.
void setMCEventWeights(const std::vector< float > &value)
Set the weights of all the MC events used in the simulation.