70 |
#include "TMultiGraph.h" |
#include "TMultiGraph.h" |
71 |
#include <sstream> |
#include <sstream> |
72 |
#include <iostream> |
#include <iostream> |
73 |
|
#include <stdio.h> |
74 |
|
#include <string.h> |
75 |
#include "TString.h" |
#include "TString.h" |
76 |
#include "TStyle.h" |
#include "TStyle.h" |
77 |
#include "TFile.h" |
#include "TFile.h" |
108 |
TTree *PhysicsTr = (TTree*)file->Get("Physics"); |
TTree *PhysicsTr = (TTree*)file->Get("Physics"); |
109 |
TBranch *headBr = PhysicsTr->GetBranch("Header"); |
TBranch *headBr = PhysicsTr->GetBranch("Header"); |
110 |
|
|
111 |
pamela::EventHeader *eh = 0; |
pamela::EventHeader *eh = new pamela::EventHeader; |
112 |
pamela::PscuHeader *ph = 0; |
pamela::PscuHeader *ph = new pamela::PscuHeader; |
113 |
|
|
114 |
PhysicsTr->SetBranchAddress("Header", &eh); |
PhysicsTr->SetBranchAddress("Header", &eh); |
115 |
nevents = PhysicsTr->GetEntries(); |
nevents = PhysicsTr->GetEntries(); |
116 |
const Int_t size = nevents; |
const Int_t size = nevents; |
117 |
|
|
118 |
TTree *RunHeadTr = (TTree*)file->Get("RunHeader"); ///run header tree |
TTree *RunHeadTr = (TTree*)file->Get("RunHeader"); ///run header tree |
119 |
pamela::EventHeader *eH=0; |
pamela::EventHeader *eH= new pamela::EventHeader; |
120 |
pamela::RunHeaderEvent *reh=0; |
pamela::RunHeaderEvent *reh=new pamela::RunHeaderEvent; |
121 |
|
|
122 |
RunHeadTr->SetBranchAddress("Header",&eH); |
RunHeadTr->SetBranchAddress("Header",&eH); |
123 |
RunHeadTr->SetBranchAddress("RunHeader",&reh); |
RunHeadTr->SetBranchAddress("RunHeader",&reh); |
124 |
runnevents = RunHeadTr->GetEntries(); |
runnevents = RunHeadTr->GetEntries(); |
125 |
|
|
126 |
TString filename = ((TObjString*)base.Tokenize('/')->Last())->GetString(); |
TString filename = ((TObjString*)base.Tokenize('/')->Last())->GetString(); |
127 |
filename = ((TObjString*)filename.Tokenize('.')->First())->GetString(); |
filename = ((TObjString*)filename.Tokenize('.')->First())->GetString(); |
128 |
|
|
371 |
Int_t numkey; |
Int_t numkey; |
372 |
TObject *key = new TObject; |
TObject *key = new TObject; |
373 |
const char *name; |
const char *name; |
374 |
|
char *SoftInfo="SoftInfo"; |
375 |
TTree* tr = new TTree; |
TTree* tr = new TTree; |
376 |
Long64_t nevntskey=0; |
Long64_t nevntskey=0; |
377 |
list = file->GetListOfKeys(); |
list = file->GetListOfKeys(); |
378 |
numkey = file->GetNkeys(); |
numkey = file->GetNkeys(); |
379 |
ULong_t salto; |
ULong_t salto; |
380 |
for (Int_t m=0; m<numkey; m++){ |
for (Int_t m=0; m<numkey; m++){ |
381 |
|
if(m==numkey)continue; |
382 |
key = list->At(m); |
key = list->At(m); |
383 |
name=(char *)(key->GetName()); |
name=(char *)(key->GetName()); |
384 |
|
if(strcmp(name,SoftInfo)==0)continue; |
385 |
tr = (TTree*)file->Get(name); |
tr = (TTree*)file->Get(name); |
386 |
if (tr->IsZombie()) continue; |
if (tr->IsZombie()) continue; |
387 |
|
|
388 |
tr->SetBranchAddress("Header", &eh); |
tr->SetBranchAddress("Header", &eh); |
389 |
TBranch *Br = tr->GetBranch("Header"); |
TBranch *Br = tr->GetBranch("Header"); |
390 |
nevntskey = tr->GetEntries(); |
nevntskey = tr->GetEntries(); |
|
|
|
391 |
if(nevntskey !=0){ |
if(nevntskey !=0){ |
392 |
Int_t size1=nevntskey; |
Int_t size1=nevntskey; |
393 |
Double_t *PscuCounter1 = new Double_t[size1]; |
Double_t *PscuCounter1 = new Double_t[size1]; |
416 |
} |
} |
417 |
n++; |
n++; |
418 |
} |
} |
419 |
|
|
420 |
TGraph *graph3= new TGraph(nevntskey, (const Double_t*)FileOffset1, (const Double_t*)PscuCounter1); |
TGraph *graph3= new TGraph(nevntskey, (const Double_t*)FileOffset1, (const Double_t*)PscuCounter1); |
421 |
graph3->SetMarkerColor(3); |
graph3->SetMarkerColor(3); |
422 |
graph3->SetMarkerSize(.2); |
graph3->SetMarkerSize(.2); |