# How to handle THnSparse larger than 500Mo

**URL:** <https://root-forum.cern.ch/t/how-to-handle-thnsparse-larger-than-500mo/31255>\
**Category:** ROOT\
**Created:** [October 23, 2018, 7:27pm UTC](https://root-forum.cern.ch/t/how-to-handle-thnsparse-larger-than-500mo/31255 "2018-10-23T19:27:08Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [October 23, 2018, 8:05pm UTC](https://root-forum.cern.ch/t/how-to-handle-thnsparse-larger-than-500mo/31255/9 "2018-10-23T20:05:55Z")

</div>

I think you can use the code from here (“GammaMult” = “No\_Clover”):

> [@Help on Method/s to create Tree from multi-fold gamma-ray coincidence data](https://root-forum.cern.ch/t/help-on-method-s-to-create-tree-from-multi-fold-gamma-ray-coincidence-data/29704/67):
>
> I think you can easily reduce the amount of the required RAM by (up to) a factor 6, if you explicitly sort your gammas: #include \<algorithm\> // ... for(int j = 0; j \< (No\_Clover - 2); j++) { for(int k = (j + 1); k \< (No\_Clover - 1); k++) { // (k \> j) for(int l = (k + 1); l \< No\_Clover; l++) { // (l \> k) // ... // Double\_t x[3] = {(Double\_T\_t)Eclab[j], (Double\_T\_t)Eclab[k], (Double\_T\_t)Eclab[l]}; // Double\_t x[3]…

---

_[View the full topic](https://root-forum.cern.ch/t/how-to-handle-thnsparse-larger-than-500mo/31255)._
