Created
June 4, 2018 15:23
-
-
Save vgenty/6b04ac1179051c65bf5b93f953f269e3 to your computer and use it in GitHub Desktop.
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
Python 2.7.10 (default, Jan 31 2018, 14:07:19) | |
[GCC 4.9.2] on linux2 | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> import ROOT | |
>>> tf = ROOT.TFile.Open("1e1p_study.root") | |
tfTClass::Init:0: RuntimeWarning: no dictionary for class larcv::EventImage2D is available | |
TClass::Init:0: RuntimeWarning: no dictionary for class larcv::EventBase is available | |
TClass::Init:0: RuntimeWarning: no dictionary for class larcv::Image2D is available | |
TClass::Init:0: RuntimeWarning: no dictionary for class larcv::ImageMeta is available | |
TClass::Init:0: RuntimeWarning: no dictionary for class larcv::Point2D is available | |
TClass::Init:0: RuntimeWarning: no dictionary for class larcv::EventChStatus is available | |
TClass::Init:0: RuntimeWarning: no dictionary for class larcv::EventROI is available | |
TClass::Init:0: RuntimeWarning: no dictionary for class larcv::ROI is available | |
TClass::Init:0: RuntimeWarning: no dictionary for class larcv::Vertex is available | |
TClass::Init:0: RuntimeWarning: no dictionary for class larcv::EventPixel2D is available | |
TClass::Init:0: RuntimeWarning: no dictionary for class larcv::EventPGraph is available | |
TClass::Init:0: RuntimeWarning: no dictionary for class larcv::PGraph is available | |
>>> tree = tf.ShowerTruthMatch | |
>>> tree.GetEntry(0) | |
310 | |
>>> tree.shr_type_v | |
<ROOT.vector<int> object at 0x2673f00> | |
>>> import numpy as np | |
^P^P | |
>>> np.array(tree.shr_type_v) | |
array([9, 3]) | |
>>> np.array(tree.shr_type_vv) | |
array([[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 70, 0], | |
[233, 0, 0, 397, 0, 0, 0, 0, 0, 0, 0]]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment