File tree Expand file tree Collapse file tree 4 files changed +48
-0
lines changed
Expand file tree Collapse file tree 4 files changed +48
-0
lines changed Original file line number Diff line number Diff line change @@ -15,3 +15,4 @@ add_subdirectory(Core)
1515add_subdirectory (Tasks)
1616add_subdirectory (TableProducer)
1717# add_subdirectory(Tools)
18+ add_subdirectory (Cfg)
Original file line number Diff line number Diff line change 1+ # Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2+ # See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3+ # All rights not expressly granted are reserved.
4+ #
5+ # This software is distributed under the terms of the GNU General Public
6+ # License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7+ #
8+ # In applying this license CERN does not waive the privileges and immunities
9+ # granted to it by virtue of its status as an Intergovernmental Organization
10+ # or submit itself to any jurisdiction.
11+
12+ install (FILES a3geo.ini
13+ PERMISSIONS GROUP_READ GROUP_EXECUTE OWNER_EXECUTE OWNER_WRITE OWNER_READ WORLD_EXECUTE WORLD_READ
14+ DESTINATION share/alice3/)
File renamed without changes.
Original file line number Diff line number Diff line change 1+
2+
3+ #include "TFile.h"
4+ #include "TTree.h"
5+ void makeSimpleAO2D ()
6+ {
7+ TFile fin ("/tmp/AO2D.root" , "READ" );
8+ // Copy the tree structure of the AO2D
9+ for (int i = 0 ; i < fin .GetListOfKeys ()-> GetEntries (); i ++ ) {
10+ TKey * key = (TKey * )fin .GetListOfKeys ()-> At (i );
11+ TString keyname = key -> GetName ();
12+ if (!keyname .Contains ("DF_" )) {
13+ continue ;
14+ }
15+ TFile fout ("/tmp/AO2D_1.root" , "RECREATE" );
16+ fout .cd ();
17+ TMap * metaData = (TMap * )fin .Get ("metaData" );
18+ metaData -> Write ("metaData" , TObject ::kSingleKey );
19+ fout .mkdir (keyname .Data ());
20+ fout .cd (keyname .Data ());
21+ TTree * tree = (TTree * )fin .Get (Form ("%s/O2bc_001" , keyname .Data ()));
22+ tree -> ls ();
23+ TTree * newtree = tree -> CloneTree (0 );
24+ newtree -> SetDirectory (gDirectory );
25+ // Keep only the first entry
26+ tree -> GetEntry (0 );
27+ newtree -> Fill ();
28+ newtree -> Write ();
29+ fout .ls ();
30+ fout .Close ();
31+ break ;
32+ }
33+ }
You can’t perform that action at this time.
0 commit comments