|
ATLAS Offline Software
|
#include <EventInfoBranch.h>
|
| EventInfoBranch (MuonTesterTree &tree, unsigned int write_mask, 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. More...
|
|
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. More...
|
|
std::string | name () const override final |
| Returns the name of the branch. More...
|
|
bool | initialized () const |
| Returns whether the object has been initialized or not The outcome of the variable is bound to a successful call of the addToTree method. More...
|
|
TTree * | tree () override final |
| Returns the underlying TTree object. More...
|
|
const TTree * | tree () const override final |
|
std::vector< DataDependency > | data_dependencies () override final |
| Returns the data dependencies needed by the MuonTesterBranch. More...
|
|
bool | msgLvl (const MSG::Level lvl) const |
| Test the output level. More...
|
|
MsgStream & | msg () const |
| The standard message stream. More...
|
|
MsgStream & | msg (const MSG::Level lvl) const |
| The standard message stream. More...
|
|
void | setLevel (MSG::Level lvl) |
| Change the current logging level. More...
|
|
Definition at line 15 of file EventInfoBranch.h.
◆ DataDependency
◆ EvtInfoDecor
◆ WriteOpts
Enumerator |
---|
isMC | Flag determining whether the branch is simulation.
|
writePileUp | Write pile-up information.
|
writePRW | Write the corrected pile-up.
|
writeBeamSpot | Write the beamspot weight.
|
writeTrigger | Write the trigger information.
|
writeLHE | Write each of the LHE weights.
|
Definition at line 18 of file EventInfoBranch.h.
◆ EventInfoBranch()
MuonVal::EventInfoBranch::EventInfoBranch |
( |
MuonTesterTree & |
tree, |
|
|
unsigned int |
write_mask, |
|
|
const std::string & |
evtKey = "EventInfo" |
|
) |
| |
Definition at line 17 of file EventInfoBranch.cxx.
24 for (
unsigned int lhe = 1; lhe < s_num_lhe ; ++lhe ) {
25 std::shared_ptr<ScalarBranch<double>>& new_br =
m_lhe_weights[lhe];
26 new_br = std::make_shared<ScalarBranch<double>>(
tree.tree(),
"mcEventWeight_LHE_" +
std::to_string(lhe),0.);
27 if (!
tree.addBranch(new_br)) {
28 THROW_EXCEPTION(
"EventInfoBranch: Failed to create Scalar branch in c'tor");
35 m_writemask&= ~(WriteOpts::writePRW | WriteOpts::writeBeamSpot);
◆ addToTree()
template<class T >
bool MuonVal::MuonTesterBranch::addToTree |
( |
T & |
variable | ) |
|
|
protectedinherited |
Connects the Memory buffer with the TTree.
◆ data_dependencies()
|
finaloverridevirtualinherited |
◆ declare_dependency()
template<class Key >
bool MuonVal::MuonTesterBranch::declare_dependency |
( |
Key & |
key | ) |
|
|
protectedinherited |
Declares the ReadHandle/ ReadCondHandleKey as data dependency of the algorithm.
◆ eraseWhiteSpaces()
std::string MuonVal::MuonTesterBranch::eraseWhiteSpaces |
( |
const std::string & |
In | ) |
|
|
staticinherited |
◆ fill()
bool MuonVal::EventInfoBranch::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 57 of file EventInfoBranch.cxx.
77 const unsigned int n_weights =
evt_info->mcEventWeights().size();
79 (*lhe_branch) = lhe_idx < n_weights ?
evt_info->mcEventWeight(lhe_idx) : 0.;
◆ getNumLHE()
unsigned int MuonVal::EventInfoBranch::getNumLHE |
( |
| ) |
|
|
static |
◆ init()
bool MuonVal::EventInfoBranch::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 92 of file EventInfoBranch.cxx.
95 return !declare_dependency(decor);
◆ initialized()
bool MuonVal::MuonTesterBranch::initialized |
( |
| ) |
const |
|
inherited |
Returns whether the object has been initialized or not The outcome of the variable is bound to a successful call of the addToTree method.
Definition at line 52 of file MuonTesterBranch.cxx.
◆ initMessaging()
void AthMessaging::initMessaging |
( |
| ) |
const |
|
privateinherited |
Initialize our message level and MessageSvc.
This method should only be called once.
Definition at line 39 of file AthMessaging.cxx.
◆ msg() [1/2]
MsgStream & AthMessaging::msg |
( |
| ) |
const |
|
inlineinherited |
The standard message stream.
Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.
Definition at line 164 of file AthMessaging.h.
◆ msg() [2/2]
MsgStream & AthMessaging::msg |
( |
const MSG::Level |
lvl | ) |
const |
|
inlineinherited |
The standard message stream.
Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.
Definition at line 179 of file AthMessaging.h.
180 {
return msg() << lvl; }
◆ msgLvl()
bool AthMessaging::msgLvl |
( |
const MSG::Level |
lvl | ) |
const |
|
inlineinherited |
Test the output level.
- Parameters
-
lvl | The message level to test against |
- Returns
- boolean Indicating if messages at given level will be printed
- Return values
-
true | Messages at level "lvl" will be printed |
Definition at line 151 of file AthMessaging.h.
◆ name()
std::string MuonVal::MuonTesterBranch::name |
( |
| ) |
const |
|
finaloverridevirtualinherited |
◆ parent()
◆ setLevel()
void AthMessaging::setLevel |
( |
MSG::Level |
lvl | ) |
|
|
inherited |
◆ setNumLHE()
void MuonVal::EventInfoBranch::setNumLHE |
( |
unsigned int |
numLHE | ) |
|
|
static |
Specify the number of LHE variations that are available in the sample.
Definition at line 15 of file EventInfoBranch.cxx.
◆ tree() [1/2]
const TTree * MuonVal::MuonTesterBranch::tree |
( |
| ) |
const |
|
finaloverridevirtualinherited |
◆ tree() [2/2]
TTree * MuonVal::MuonTesterBranch::tree |
( |
| ) |
|
|
finaloverridevirtualinherited |
◆ ATLAS_THREAD_SAFE
std::atomic<unsigned int> s_num_lhe MuonVal::EventInfoBranch::ATLAS_THREAD_SAFE |
|
staticprivate |
◆ m_actual_mu
ScalarBranch<float>& MuonVal::EventInfoBranch::m_actual_mu {parent().newScalar<float>("actual_mu")} |
|
private |
◆ m_average_mu
ScalarBranch<float>& MuonVal::EventInfoBranch::m_average_mu {parent().newScalar<float>("average_mu")} |
|
private |
◆ m_bcid
ScalarBranch<uint32_t>& MuonVal::EventInfoBranch::m_bcid {parent().newScalar<uint32_t>("bcid")} |
|
private |
◆ m_beamSpotWeight
ScalarBranch<double>& MuonVal::EventInfoBranch::m_beamSpotWeight {parent().newScalar<double>("BeamSpotWeight")} |
|
private |
◆ m_dependencies
std::vector<DataDependency> MuonVal::MuonTesterBranch::m_dependencies {} |
|
privateinherited |
◆ m_evtNumber
ScalarBranch<unsigned long long>& MuonVal::EventInfoBranch::m_evtNumber {parent().newScalar<unsigned long long>("eventNumber")} |
|
private |
◆ m_imsg
std::atomic<IMessageSvc*> AthMessaging::m_imsg { nullptr } |
|
mutableprivateinherited |
◆ m_init
bool MuonVal::MuonTesterBranch::m_init {false} |
|
privateinherited |
◆ m_key
◆ m_l1id
ScalarBranch<uint32_t>& MuonVal::EventInfoBranch::m_l1id {parent().newScalar<uint32_t>("l1id")} |
|
private |
◆ m_lbNumber
ScalarBranch<uint32_t>& MuonVal::EventInfoBranch::m_lbNumber {parent().newScalar<uint32_t>("lbNumber")} |
|
private |
◆ m_lhe_weights
std::map<unsigned int, std::shared_ptr<ScalarBranch<double> > > MuonVal::EventInfoBranch::m_lhe_weights {} |
|
private |
◆ m_lvl
std::atomic<MSG::Level> AthMessaging::m_lvl { MSG::NIL } |
|
mutableprivateinherited |
◆ m_mcChannel
ScalarBranch<uint32_t>& MuonVal::EventInfoBranch::m_mcChannel {parent().newScalar<uint32_t>("mcChannelNumber")} |
|
private |
◆ m_msg_tls
boost::thread_specific_ptr<MsgStream> AthMessaging::m_msg_tls |
|
mutableprivateinherited |
MsgStream instance (a std::cout like with print-out levels)
Definition at line 132 of file AthMessaging.h.
◆ m_name
std::string MuonVal::MuonTesterBranch::m_name {} |
|
privateinherited |
◆ m_nm
std::string AthMessaging::m_nm |
|
privateinherited |
◆ m_parent
◆ m_prwKeys
std::vector<EvtInfoDecor> MuonVal::EventInfoBranch::m_prwKeys {} |
|
private |
◆ m_prwWeight
ScalarBranch<double>& MuonVal::EventInfoBranch::m_prwWeight {parent().newScalar<double>("prwWeight")} |
|
private |
◆ m_rnd_lumi_block
ScalarBranch<uint32_t>& MuonVal::EventInfoBranch::m_rnd_lumi_block {parent().newScalar<uint32_t>("randomLumiBlockNumber")} |
|
private |
◆ m_rnd_run
ScalarBranch<uint32_t>& MuonVal::EventInfoBranch::m_rnd_run {parent().newScalar<uint32_t>("randomRunNumber")} |
|
private |
◆ m_runNumber
ScalarBranch<uint32_t>& MuonVal::EventInfoBranch::m_runNumber {parent().newScalar<uint32_t>("runNumber")} |
|
private |
◆ m_tree
TTree* MuonVal::MuonTesterBranch::m_tree {nullptr} |
|
privateinherited |
◆ m_weight
ScalarBranch<double>& MuonVal::EventInfoBranch::m_weight {parent().newScalar<double>("mcEventWeight")} |
|
private |
Removed from output if writeLHE is switched on.
Definition at line 70 of file EventInfoBranch.h.
◆ m_writemask
unsigned int MuonVal::EventInfoBranch::m_writemask {0} |
|
private |
The documentation for this class was generated from the following files:
std::atomic< MSG::Level > m_lvl
Current logging level.
ScalarBranch< float > & m_average_mu
Toggled by the Write PileUp flag.
ScalarBranch< uint32_t > & m_mcChannel
ScalarBranch< uint32_t > & m_lbNumber
static AuxTypeRegistry & instance()
Return the singleton registry instance.
@ isMC
Flag determining whether the branch is simulation.
ScalarBranch< double > & m_weight
Removed from output if writeLHE is switched on.
std::string getName(SG::auxid_t auxid) const
Return the name of an aux data item.
std::vector< DataDependency > m_dependencies
@ writeBeamSpot
Write the beamspot weight.
SG::ReadHandleKey< xAOD::EventInfo > m_key
Common access to the EventInfo.
const std::string & key() const
Return the StoreGate ID for the referenced object.
MuonTesterBranch(MuonTesterTree &tree, const std::string &br_name)
#define THROW_EXCEPTION(MSG)
ScalarBranch< uint32_t > & m_runNumber
std::atomic< IMessageSvc * > m_imsg
MessageSvc pointer.
IMessageSvc * getMessageSvc(bool quiet=false)
TTree * tree() override final
Returns the underlying TTree object.
MuonTesterTree * m_parent
SG::ReadDecorHandleKey< xAOD::EventInfo > EvtInfoDecor
Access to the pile up weights if requested.
bool declare_dependency(Key &key)
Declares the ReadHandle/ ReadCondHandleKey as data dependency of the algorithm.
ScalarBranch< uint32_t > & m_rnd_lumi_block
ScalarBranch< uint32_t > & m_rnd_run
ScalarBranch< float > & m_actual_mu
MsgStream & msg() const
The standard message stream.
std::string name() const override final
Returns the name of the branch.
ScalarBranch< uint32_t > & m_l1id
Toggled by the write trigger flag.
std::string to_string(const DetectorType &type)
ScalarBranch< double > & m_prwWeight
Branches toggled by the write prw Flag.
ScalarBranch< double > & m_beamSpotWeight
ScalarBranch< unsigned long long > & m_evtNumber
#define ATH_MSG_WARNING(x)
std::string m_nm
Message source name.
@ writePRW
Write the corrected pile-up.
@ writePileUp
Write pile-up information.
std::vector< EvtInfoDecor > m_prwKeys
void initMessaging() const
Initialize our message level and MessageSvc.
@ writeTrigger
Write the trigger information.
@ writeLHE
Write each of the LHE weights.
boost::thread_specific_ptr< MsgStream > m_msg_tls
MsgStream instance (a std::cout like with print-out levels)
ScalarBranch< uint32_t > & m_bcid
std::map< unsigned int, std::shared_ptr< ScalarBranch< double > > > m_lhe_weights