diff --git a/convertDRS4/read_binary.cpp b/convertDRS4/read_binary.cpp index cb38c231a9f641d2dc070560a0c22a41314f9329..aea2845c9beb20c767fcf384d4d63dc0c56d1092 100644 --- a/convertDRS4/read_binary.cpp +++ b/convertDRS4/read_binary.cpp @@ -130,7 +130,7 @@ int main(int argc, const char * argv[]) RawEvent *event[4]; for (Int_t i = 0; i<4; i++) { event[i] = new RawEvent(); - bName.Form("ch%d", i); + bName.Form("ch%d.", i); rtree->Bronch(bName.Data(), "RawEvent", &event[i]); } diff --git a/data/dataDSR4/analysis_07_1.root b/data/dataDSR4/analysis_07_1.root index 7e9be1ec64520695fce7555d02879ad9dd3969f9..aed327b026d48091bd1bdef85f6bb738edbd071b 100644 Binary files a/data/dataDSR4/analysis_07_1.root and b/data/dataDSR4/analysis_07_1.root differ diff --git a/dataClasses/AEvent.h b/dataClasses/AEvent.h index 67ccd078d55b6bf0addda8311875fc14f5c2f9c5..badad9501b558fd1dc2787b96a41772749b7a391 100644 --- a/dataClasses/AEvent.h +++ b/dataClasses/AEvent.h @@ -43,8 +43,8 @@ private: public: AEvent(); - virtual ~AEvent();ClassDef(AEvent,1) - ; + virtual ~AEvent(); + ClassDef(AEvent,1); void SetRawDataFile(const char* inprawfile, const char* treename); void ProcessEvent(); diff --git a/macros/analyse.C b/macros/analyse.C index d7e89e782f62b4f7361db240a6edfa95d51d08b5..7ed9e3738306f96460b75bc8a3b439080fedd463 100644 --- a/macros/analyse.C +++ b/macros/analyse.C @@ -5,23 +5,37 @@ void analyse() TFile *f = new TFile("../data/rawDataDSR4/NeuRad_test_07_1.root"); TTree *tr = (TTree*)f->Get("rtree"); - RawEvent *revent = new RawEvent(); - tr->SetBranchAddress("rawEvent", &revent); + const Int_t noBranches = 4; + + TString bName; + RawEvent *revent[noBranches]; + for (Int_t j = 0; jSetBranchAddress(bName.Data(), &revent[j]); + } // tr->SetMakeClass(1); TFile *fw = new TFile("../data/dataDSR4/analysis_07_1.root", "RECREATE"); - TTree *tw = new TTree("drs4analysis", "title of drs4 analysis tree"); - - AEvent *wevent = new AEvent(); - wevent->SetInputEvent(&revent); - tw->Bronch("AEvent", "AEvent", &wevent); + TTree *tw = new TTree("atree", "title of drs4 analysis tree"); + + AEvent *wevent[noBranches]; + for (Int_t j = 0; jSetInputEvent(&revent[j]); + tw->Bronch(bName.Data(), "AEvent", &wevent[j]); + } Long64_t nentries = tr->GetEntries(); for(Long64_t i = 0; i < nentries; i++) { tr->GetEntry(i); - wevent->ProcessEvent(); + for (Int_t j = 0; jReset(); + wevent[j]->ProcessEvent(); + } tw->Fill(); } diff --git a/macros/testShowGraphs.cxx b/macros/testShowGraphs.cxx index 82fc03f0b180344b35029323aae8bc98cee002bc..4393899b9a7109b638157ed66c45001e3bccfc39 100644 --- a/macros/testShowGraphs.cxx +++ b/macros/testShowGraphs.cxx @@ -3,11 +3,11 @@ void testShowGraphs() gSystem->Load("../libData.so"); - TFile fr("../data/rawDataDSR4/NeuRad_test_07_1.root"); - TTree *tr = (TTree*)fr.Get("rtree"); + TFile fr("../data/dataDSR4/analysis_07_1.root"); + TTree *tr = (TTree*)fr.Get("atree"); - RawEvent *revent = new RawEvent(); - tr->SetBranchAddress("rawEvent",&revent); + AEvent *revent = new AEvent(); + tr->SetBranchAddress("Ach1",&revent); TGraph *gr[10]; diff --git a/macros/try_event_class.cxx b/macros/try_event_class.cxx deleted file mode 100644 index a34763766fa3669e1a7a6c7a77d9147228eb798b..0000000000000000000000000000000000000000 --- a/macros/try_event_class.cxx +++ /dev/null @@ -1,15 +0,0 @@ -#include -#include - -using namespace std; - -void try_event_class() -{ - gSystem->Load("/home/dariak/NeuRad_tests/macros/event_C.so"); - event ev; - ev.GetEntry(499); - ev.Show(); - ev.Loop(); - - -}