|
ATLAS Offline Software
|
Go to the documentation of this file.
17 #include "GaudiKernel/ITHistSvc.h"
21 #include "EventInfo/EventInfo.h"
32 m_doTriggerInfo(true),
34 m_comTimeName(
"TRT_Phase"),
39 m_trigLvl1TAV(nullptr),
45 declareInterface<IEventPropertyNtupleTool>(
this);
54 m_trigLvl1TAV =
new std::vector<unsigned int>();
62 return StatusCode::SUCCESS;
67 if (!
tree)
return StatusCode::FAILURE;
70 tree->Branch(
"RunNumber", &m_runNumber,
"RunNumber/I");
71 tree->Branch(
"EventNumber", &m_eventNumber,
"EventNumber/I");
72 tree->Branch(
"LumiBlockN", &m_lumiBlock,
"LumiBlockN/I");
73 tree->Branch(
"TimeStamp", &m_timeStamp,
"TimeStamp/I");
74 tree->Branch(
"BCID", &m_bCID,
"BCID/I");
76 tree->Branch(
"TRT_Phase", &m_tdc_phase,
"TRT_Phase/F");
78 if (m_doTriggerInfo) {
79 tree->Branch(
"Trig_LVL1StreamType", &m_trigLvl1Type,
"Trig_LVL1StreamType/I");
80 tree->Branch(
"Trig_LVL1InfoTAV", &m_trigLvl1TAV);
82 return StatusCode::SUCCESS;
87 if ((evtStore()->
retrieve(eventInfo)).isFailure()) {
88 msg(MSG::WARNING) <<
"Could not retrieve event info" <<
endmsg;
94 return StatusCode::SUCCESS;
97 m_runNumber = myEventID->run_number();
98 m_eventNumber = myEventID->event_number();
99 m_timeStamp = myEventID->time_stamp() ;
100 m_lumiBlock = myEventID->lumi_block() ;
101 m_bCID = myEventID->bunch_crossing_id() ;
105 const ComTime* comtime=
nullptr;
107 if (evtStore()->contains<ComTime>(m_comTimeName)) {
108 StatusCode sc = evtStore()->retrieve(comtime,m_comTimeName);
109 if (
sc.isFailure() || !comtime) {
110 ATH_MSG_WARNING (
"Could not find the ComTime object with name "<< m_comTimeName);
112 m_tdc_phase = comtime->
getTime();
115 ATH_MSG_WARNING (
"Could not find the ComTime object with name "<< m_comTimeName);
116 return StatusCode::FAILURE;
120 if (m_doTriggerInfo) {
122 if (myTriggerInfo!=
nullptr) {
125 if (l1trigger.size() == 24) {
126 m_trigLvl1TAV->resize(8);
127 for (
int i=0;
i<8; ++
i) {
128 m_trigLvl1TAV->at(
i) = l1trigger.at(
i+16);
131 }
else m_trigLvl1Type = -1000;
134 return StatusCode::SUCCESS;
146 if (m_doTriggerInfo) {
148 m_trigLvl1TAV->clear();
150 return StatusCode::SUCCESS;
def retrieve(aClass, aKey=None)
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
This class contains trigger related information.
const std::vector< number_type > & level1TriggerInfo() const
get level1 trigger info
This class provides a unique identification for each event, in terms of run/event number and/or a tim...
::StatusCode StatusCode
StatusCode definition for legacy code.
EventID * event_ID()
the unique identification of the event.
number_type level1TriggerType() const
get level1 trigger type
This class contains trigger related information.
This class provides general information about an event. Event information is provided by the accessor...
#define ATH_MSG_WARNING(x)
TriggerInfo * trigger_info()
trigger information (ptr may be NULL)
This class provides a unique identification for each event, in terms of run/event number and/or a tim...