diff --git a/data/dataDSR4/analysis_07_1.root b/data/dataDSR4/analysis_07_1.root index aed327b026d48091bd1bdef85f6bb738edbd071b..32db4adfba5dbbc4841a3f5658c7802305405e6e 100644 Binary files a/data/dataDSR4/analysis_07_1.root and b/data/dataDSR4/analysis_07_1.root differ diff --git a/dataClasses/AEvent.cpp b/dataClasses/AEvent.cpp index 710ef4aa537f0ff641c803967f4948d4ce3a8932..983d4069b33f1d7775aa0e38df34212060c8aa0f 100644 --- a/dataClasses/AEvent.cpp +++ b/dataClasses/AEvent.cpp @@ -18,6 +18,7 @@ AEvent::AEvent() : fNPoints(1024) { AEvent::~AEvent() { // TODO Auto-generated destructor stub delete gSignal; + delete gCFD; } void AEvent::SetRawDataFile(const char* inprawfile, const char* treename) { @@ -61,6 +62,10 @@ void AEvent::ProcessEvent() { fAmpMax = maxAmp; fTimeAmpMax = maxAmpT; + SetGraphs(); + + SetCFD(); + return; } @@ -88,6 +93,7 @@ void AEvent::SetInputEvent(RawEvent** event) { void AEvent::Init() { gSignal = new TGraph(); + gCFD = new TGraph(); fInputEvent = 0; } @@ -102,3 +108,6 @@ void AEvent::SetGraphs() { return; } + +void AEvent::SetCFD() { +} diff --git a/dataClasses/AEvent.h b/dataClasses/AEvent.h index badad9501b558fd1dc2787b96a41772749b7a391..e86ea622e4d59761790efdc4acf21ad6cc1e526e 100644 --- a/dataClasses/AEvent.h +++ b/dataClasses/AEvent.h @@ -38,6 +38,7 @@ private: Double_t fTimeAmpMax; TGraph *gSignal; + TGraph *gCFD; RawEvent *fInputEvent; //! @@ -53,13 +54,14 @@ public: void Reset(); //Resets arrays to zeros - void SetGraphs(); TGraph* GetGraph() { return gSignal; } private: void Init(); + void SetGraphs(); + void SetCFD(); }; #endif /* DATACLASSES_AEVENT_H_ */ diff --git a/macros/testShowGraphs.cxx b/macros/testShowGraphs.cxx index 4393899b9a7109b638157ed66c45001e3bccfc39..127213dc519df3200776c71234c96ed8a8a20da3 100644 --- a/macros/testShowGraphs.cxx +++ b/macros/testShowGraphs.cxx @@ -3,22 +3,25 @@ void testShowGraphs() gSystem->Load("../libData.so"); + const Long64_t kFirstEvent = 128; + TFile fr("../data/dataDSR4/analysis_07_1.root"); TTree *tr = (TTree*)fr.Get("atree"); AEvent *revent = new AEvent(); - tr->SetBranchAddress("Ach1",&revent); + tr->SetBranchAddress("Ach0.",&revent); TGraph *gr[10]; + //loop over events for (Int_t i = 0; i < 10; i++) { gr[i] = 0; - tr->GetEntry(i+28); + tr->GetEntry(i+kFirstEvent); gr[i] = new TGraph(*revent->GetGraph()); - } + }//for over events - auto c1 = new TCanvas("c1","test",10,10,1000,600); + TCanvas *c1 = new TCanvas("c1","test",10,10,1000,600); c1->Divide(3,2); for (Int_t i = 0; i < 6; i++) {