#include <EventHashBranch.h>
|
| | ~EventHashBranch ()=default |
| | EventHashBranch (TTree *tree, const std::string &evtKey="EventInfo") |
| bool | fill (const EventContext &ctx) override final |
| | The fill method checks if enough information is provided such that the branch is cleared from the information of the prevoius event and in cases of that updates did no happen befure a default value is provided.
|
| bool | init () override final |
| | The init method checks whether the branch name has already registered to the MuonTree and tries then to add the branch to the tree --> return false if the branch has already been defined or the inclusion of the branch to the tree failed or the name of the branch is empty.
|
| std::string | name () const override final |
| | Returns the name of the branch.
|
| std::vector< DataDependency > | data_dependencies () override final |
| | Returns a vector of all Event data dependencies needed by the Branch to work.
|
| TTree * | tree () override final |
| | Returns the pointer to the underlying TTree object.
|
| const TTree * | tree () const override final |
| bool | is_dumped (const EventContext &ctx) const |
| | Returns true whether the current event is dumped to the N-tuple or not.
|
Definition at line 13 of file EventHashBranch.h.
◆ DataDependency
◆ ~EventHashBranch()
| MuonVal::EventHashBranch::~EventHashBranch |
( |
| ) |
|
|
default |
◆ EventHashBranch()
| MuonVal::EventHashBranch::EventHashBranch |
( |
TTree * | tree, |
|
|
const std::string & | evtKey = "EventInfo" ) |
Definition at line 9 of file EventHashBranch.cxx.
9 :
ArrayBranch< ULong64_t > m_cache
TTree * tree() override final
Returns the pointer to the underlying TTree object.
SG::ReadHandleKey< xAOD::EventInfo > m_evtKey
◆ data_dependencies()
◆ fill()
| bool MuonVal::EventHashBranch::fill |
( |
const EventContext & | ctx | ) |
|
|
finaloverridevirtual |
The fill method checks if enough information is provided such that the branch is cleared from the information of the prevoius event and in cases of that updates did no happen befure a default value is provided.
--> returns false if no update is called or the dummy value has not been defined
Implements MuonVal::IMuonTesterBranch.
Definition at line 19 of file EventHashBranch.cxx.
19 {
20 SG::ReadHandle<xAOD::EventInfo> evtInfo{
m_evtKey, ctx};
23 log << MSG::ERROR <<
"Could not retrieve the EventInfo " <<
m_evtKey.fullKey() <<
endmsg;
24 return false;
25 }
26 m_cache[0] = evtInfo->eventNumber();
28 ULong64_t
dsid = evtInfo->mcChannelNumber();
29 dsid = ( (
dsid<<32) | evtInfo->runNumber());
31 }
else m_cache[1] = evtInfo->runNumber();
34}
std::string name() const override final
Returns the name of the branch.
const EventContext * m_last_dump
virtual bool isValid() override final
Can the handle be successfully dereferenced?
@ IS_SIMULATION
true: simulation, false: data
IMessageSvc * getMessageSvc(bool quiet=false)
◆ init()
| bool MuonVal::EventHashBranch::init |
( |
| ) |
|
|
finaloverridevirtual |
The init method checks whether the branch name has already registered to the MuonTree and tries then to add the branch to the tree --> return false if the branch has already been defined or the inclusion of the branch to the tree failed or the name of the branch is empty.
Implements MuonVal::IMuonTesterBranch.
Definition at line 12 of file EventHashBranch.cxx.
◆ is_dumped()
| bool MuonVal::EventHashBranch::is_dumped |
( |
const EventContext & | ctx | ) |
const |
Returns true whether the current event is dumped to the N-tuple or not.
Definition at line 35 of file EventHashBranch.cxx.
◆ name()
| std::string MuonVal::EventHashBranch::name |
( |
| ) |
const |
|
finaloverridevirtual |
◆ tree() [1/2]
| const TTree * MuonVal::EventHashBranch::tree |
( |
| ) |
const |
|
finaloverridevirtual |
◆ tree() [2/2]
| TTree * MuonVal::EventHashBranch::tree |
( |
| ) |
|
|
finaloverridevirtual |
◆ m_cache
| ArrayBranch<ULong64_t> MuonVal::EventHashBranch::m_cache |
|
private |
◆ m_evtKey
◆ m_last_dump
| const EventContext* MuonVal::EventHashBranch::m_last_dump {nullptr} |
|
private |
The documentation for this class was generated from the following files: