Last active
August 29, 2015 14:24
-
-
Save xgarrido/920a14ef2e623f971e96 to your computer and use it in GitHub Desktop.
An example of how to get hit id
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Get the 'calibrated_data' entry from the data model : | |
const snemo::datamodel::calibrated_data & the_calibrated_data | |
= data_record_.get<snemo::datamodel::calibrated_data>("CD"); | |
const snemo::datamodel::calibrated_data::calorimeter_hit_collection_type & chits | |
= calibrated_data_.calibrated_calorimeter_hits(); | |
for (snemo::datamodel::calibrated_data::calorimeter_hit_collection_type::const_iterator | |
icalo = chits.begin(); icalo != chits.end(); | |
++icalo) { | |
const snemo::datamodel::calibrated_calorimeter_hit & a_calo_hit = icalo->get(); | |
if (a_calo_hit.has_hit_id()) { | |
DT_LOG_NOTICE(datatools::logger::PRIO_NOTICE, | |
"Current calorimeter hit has " << a_calo_hit.get_hit_id() << " hit id"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment