2525#include "TTree.h"
2626
2727#include "CCDB/BasicCCDBManager.h"
28+ #include "EventFiltering/zorro.h"
2829
2930const std ::string kBaseCCDBPath = "Users/m/mpuccio/EventFiltering/OTS/" ;
3031
31- #pragma link C++ class std::vector < std::array < uint64_t, 2>> + ;
32- struct bcInfo {
33- bcInfo () = default ;
34- ULong64_t bcAOD , bcEvSel , trigMask [2 ], selMask [2 ];
35- void print () const ;
36- };
37-
3832void uploadOTSobjects (std ::string inputList , std ::string passName , bool useAlien )
3933{
4034 std ::string baseCCDBpath = passName .empty () ? kBaseCCDBPath : kBaseCCDBPath + passName + "/" ;
@@ -66,14 +60,14 @@ void uploadOTSobjects(std::string inputList, std::string passName, bool useAlien
6660 TH1 * hCounterTVX = (TH1 * )scalersFile -> Get ("bc-selection-task/hCounterTVX" );
6761 api .storeAsTFile (hCounterTVX , baseCCDBpath + "InspectedTVX" , metadata , duration .first , duration .second );
6862
69- std ::vector < std :: array < uint64_t , 2 >> bcRanges , filterBitMask , selectionBitMask ;
63+ std ::vector < ZorroHelper > zorroHelpers ;
7064 std ::unique_ptr < TFile > bcRangesFile {TFile ::Open ((path + "/bcRanges_fullrun.root" ).data (), "READ" )};
7165 int Nmax = 0 ;
7266 for (auto key : * (bcRangesFile -> GetListOfKeys ())) {
7367 TTree * cefpTree = (TTree * )bcRangesFile -> Get (Form ("%s/selectedBC" , key -> GetName ()));
7468 if (!cefpTree )
7569 continue ;
76- bcInfo bci ;
70+ ZorroHelper bci ;
7771 cefpTree -> SetBranchAddress ("bcAO2D" , & bci .bcAOD );
7872 cefpTree -> SetBranchAddress ("bcEvSel" , & bci .bcEvSel );
7973 if (cefpTree -> GetBranch ("selMask" ) && cefpTree -> GetBranch ("triMask" )) {
@@ -88,15 +82,11 @@ void uploadOTSobjects(std::string inputList, std::string passName, bool useAlien
8882 for (int i = 0 ; i < cefpTree -> GetEntries (); i ++ ) {
8983 if ((i < Nmax ) || (Nmax == 0 )) {
9084 cefpTree -> GetEntry (i );
91- bcRanges .push_back ({bci .bcAOD , bci .bcEvSel });
92- filterBitMask .push_back ({bci .trigMask [0 ], bci .trigMask [1 ]});
93- selectionBitMask .push_back ({bci .selMask [0 ], bci .selMask [1 ]});
85+ zorroHelpers .push_back (bci );
9486 }
9587 }
9688 }
97- api .storeAsTFileAny (& bcRanges , baseCCDBpath + "SelectedBCs" , metadata , duration .first , duration .second );
98- api .storeAsTFileAny (& filterBitMask , baseCCDBpath + "FilterBitMasks" , metadata , duration .first , duration .second );
99- api .storeAsTFileAny (& selectionBitMask , baseCCDBpath + "SelectionBitMasks" , metadata , duration .first , duration .second );
89+ api .storeAsTFileAny (& zorroHelpers , baseCCDBpath + "ZorroHelpers" , metadata , duration .first , duration .second );
10090 }
10191}
10292
0 commit comments