94 |
var.ORB = 1; |
var.ORB = 1; |
95 |
var.TRG = 0; |
var.TRG = 0; |
96 |
var.CALO = 0; |
var.CALO = 0; |
97 |
|
var.CALOT = 0; |
98 |
var.S4 = 0; |
var.S4 = 0; |
99 |
var.ND = 0; |
var.ND = 0; |
100 |
var.INFOS = 0; |
var.INFOS = 0; |
134 |
}; |
}; |
135 |
|
|
136 |
void FEVdetector::GetWindow(){ |
void FEVdetector::GetWindow(){ |
137 |
otr->GetEntry(maxevent); |
printf(" ah \n"); |
138 |
|
// |
139 |
|
if ( level.file == 2 ){ |
140 |
|
L2->GetEntry(maxevent); |
141 |
|
} else { |
142 |
|
otr->GetEntry(maxevent); |
143 |
|
} |
144 |
// |
// |
145 |
if ( level.file < 2 ){ |
if ( level.file < 2 ){ |
146 |
ph = eh->GetPscuHeader(); |
ph = eh->GetPscuHeader(); |
152 |
lastevno = 0; |
lastevno = 0; |
153 |
}; |
}; |
154 |
}; |
}; |
155 |
otr->GetEntry(minevent); |
printf(" mmh minev %u \n",minevent); |
156 |
|
if ( level.file == 2 ){ |
157 |
|
L2->GetEntry(minevent); |
158 |
|
} else { |
159 |
|
otr->GetEntry(minevent); |
160 |
|
} |
161 |
if ( level.file < 2 ){ |
if ( level.file < 2 ){ |
162 |
ph = eh->GetPscuHeader(); |
ph = eh->GetPscuHeader(); |
163 |
firstevno = (int)ph->Counter; |
firstevno = (int)ph->Counter; |
168 |
firstevno = 0; |
firstevno = 0; |
169 |
}; |
}; |
170 |
}; |
}; |
171 |
|
printf(" aaah \n"); |
172 |
} |
} |
173 |
|
|
174 |
void FEVdetector::ClearVariables(){ |
void FEVdetector::ClearVariables(){ |
193 |
void FEVdetector::GetEntry(Int_t i){ |
void FEVdetector::GetEntry(Int_t i){ |
194 |
thisentry = i; |
thisentry = i; |
195 |
if ( level.file == 2 ){ |
if ( level.file == 2 ){ |
196 |
|
printf("qui \n"); |
197 |
L2->GetEntry(i); |
L2->GetEntry(i); |
198 |
|
printf("qua \n"); |
199 |
ShowInfo("RunInfo"); |
ShowInfo("RunInfo"); |
200 |
ShowInfo("SoftInfo"); |
ShowInfo("SoftInfo"); |
|
ShowInfo("TrigLevel2"); |
|
201 |
ShowInfo("OrbitalInfo"); |
ShowInfo("OrbitalInfo"); |
202 |
|
ShowInfo("TrigLevel2"); |
203 |
ShowInfo("ToFLevel2"); |
ShowInfo("ToFLevel2"); |
204 |
ShowInfo("TrkLevel2"); |
ShowInfo("TrkLevel2"); |
205 |
ShowInfo("AcLevel2"); |
ShowInfo("AcLevel2"); |
209 |
ShowInfo("NDLevel2"); |
ShowInfo("NDLevel2"); |
210 |
} else { |
} else { |
211 |
otr->GetEntry(i); |
otr->GetEntry(i); |
212 |
|
ShowInfo("Pscu"); |
213 |
|
ShowInfo("Trigger"); |
214 |
|
ShowInfo("Tof"); |
215 |
|
ShowInfo("Tracker"); |
216 |
|
ShowInfo("Anticounter"); |
217 |
|
ShowInfo("Calorimeter"); |
218 |
|
ShowInfo("Neutron"); |
219 |
|
ShowInfo("S4"); |
220 |
}; |
}; |
221 |
} |
} |
222 |
|
|
379 |
Int_t len = (tb->GetInfo()->GetLengths())[tb->GetID()]; |
Int_t len = (tb->GetInfo()->GetLengths())[tb->GetID()]; |
380 |
Int_t length = min(len,dlen); |
Int_t length = min(len,dlen); |
381 |
// |
// |
382 |
// printf("Branches : type is %i type is %i tb getname %s slen %i slength %i\n",atype,type,tb->GetName(),len,length); |
// printf("Branches : type is %i type is %i tb getname %s slen %i slength %i\n",atype,type,tb->GetName(),len,length); |
383 |
switch (type){ |
switch (type){ |
384 |
case 0: |
case 0: |
385 |
// |
// |
412 |
// |
// |
413 |
// Unsigned integer |
// Unsigned integer |
414 |
// |
// |
415 |
if ( atype == -7 || atype == 13 ){ |
if ( atype == -7 || atype == 13 || atype == -9 || atype == -8 || atype == 12 ){ |
416 |
while ( j < length ){ |
while ( j < length ){ |
417 |
if ( j < length -1 ){ |
if ( j < length -1 ){ |
418 |
sprintf(o,"%s %i ,",o,(UInt_t)tb->GetValue(j,0)); |
sprintf(o,"%s %u ,",o,(UInt_t)tb->GetValue(j,0)); |
419 |
} else { |
} else { |
420 |
sprintf(o,"%s %i",o,(UInt_t)tb->GetValue(j,0)); |
sprintf(o,"%s %u",o,(UInt_t)tb->GetValue(j,0)); |
421 |
}; |
}; |
422 |
j++; |
j++; |
423 |
}; |
}; |
439 |
// Strings |
// Strings |
440 |
// |
// |
441 |
if ( atype == 45 ){ |
if ( atype == 45 ){ |
442 |
// TString *stringa = (TString*)(tb->GetValuePointer()); |
// TObjArray *cl = (TObjArray*)(tb->GetInfo()->GetOffsets())[tb->GetID()];//tb->GetValuePointer(); |
443 |
|
// TString *stringa = (TString*)(*cl)[0]; |
444 |
|
// TBranchElement *utb = (TBranchElement*)tb->GetBranchCount(); |
445 |
|
// TString** stringa = (TString*)(&tb->GetValuePointer()); |
446 |
|
//TStreamerElement *tste = (TStreamerElement*)tb->GetInfo()->GetCurrentElement(); |
447 |
|
|
448 |
|
// char *ladd; |
449 |
|
// ladd = tb->GetValuePointer() |
450 |
|
// TString *stringa = (TString*)((tste->GetOffset())); |
451 |
|
// TString& mstr = *stringa; |
452 |
|
// printf(" la mia stringa %s \n",mstr.Data()); |
453 |
|
// printf(" offset %i \n",(Int_t)utb->GetValue(0,0)); |
454 |
// int pointer = (tb->GetInfo()->GetOffsets())[tb->GetID()]; |
// int pointer = (tb->GetInfo()->GetOffsets())[tb->GetID()]; |
455 |
// TString *stringa = (TString*)(tb->GetInfo()->GetOffsets())[tb->GetID()]; |
// TString *stringa = (TString*)(tb->GetInfo()->GetOffsets())[tb->GetID()]; |
456 |
// TString *stringa = (TString*)tb->GetAddress(); |
// TString *stringa = (TString*)tb->GetAddress(); |
457 |
// printf(" address 0x%X \n",tb->GetAddress()); |
// printf(" address 0x%X \n",tb->GetAddress()); |
458 |
// printf(" pointer 0x%X \n",tb->GetValuePointer()); |
// printf(" pointer 0x%X \n",tb->GetValuePointer()); |
459 |
// printf(" object 0x%X \n",tb->GetObject()); |
// printf(" object 0x%X \n",tb->GetObject()); |
460 |
// printf("stringa %s lung %i\n",stringa->Data(),stringa->Length()); |
// printf("stringa %s lung %i\n",stringa.Data(),stringa.Length()); |
461 |
// TLeaf *striglia = tb->FindLeaf(tb->GetName()); |
// TLeaf *striglia = tb->FindLeaf(tb->GetName()); |
462 |
// if ( striglia ){ |
// if ( striglia ){ |
463 |
// char *pointer = (char *)striglia->GetValuePointer(); |
// char *pointer = (char *)striglia->GetValuePointer(); |
464 |
// TString *pr= (TString*)pointer; |
// TString *pr= (TString*)pointer; |
465 |
// printf("ciao %s \n",pr->Data()); |
// printf("ciao %s \n",pr->Data()); |
466 |
// }; |
// }; |
467 |
sprintf(o,"%s TString ",o); |
sprintf(o,"%s TString - not implemented yet -",o); |
468 |
}; |
}; |
469 |
// |
// |
470 |
// TArray |
// TArray |
564 |
// }; |
// }; |
565 |
// sprintf(o,"%s\n",o); |
// sprintf(o,"%s\n",o); |
566 |
// |
// |
567 |
sprintf(o,"%s TArray ",o); |
sprintf(o,"%s TArray - not implemented yet -",o); |
568 |
// |
// |
569 |
}; |
}; |
570 |
// |
// |
622 |
// |
// |
623 |
// Integer |
// Integer |
624 |
// |
// |
625 |
if ( satype == -17 ){ |
if ( satype == -17 || satype == -9 ){ |
626 |
// |
// |
627 |
setcolor(col,RESET, BLUE, WHITE); |
setcolor(col,RESET, BLUE, WHITE); |
628 |
setcolor(col2,RESET, BLACK, WHITE); |
setcolor(col2,RESET, BLACK, WHITE); |
1012 |
// |
// |
1013 |
file = &mainfile; |
file = &mainfile; |
1014 |
// |
// |
1015 |
L2 = new PamLevel2(); |
if ( !L2 ) L2 = new PamLevel2(); |
1016 |
// |
// |
1017 |
if ( level.file == 2 ){ |
if ( level.file == 2 ){ |
1018 |
// |
// |
1022 |
// |
// |
1023 |
if ( !otr ) return(0); |
if ( !otr ) return(0); |
1024 |
// |
// |
1025 |
|
otr->CanDeleteRefs(true); |
1026 |
|
if ( runtree ) runtree->CanDeleteRefs(true); |
1027 |
|
// |
1028 |
} else { |
} else { |
1029 |
// |
// |
1030 |
// load calorimeter ADC2MIP conversion file |
// load calorimeter ADC2MIP conversion file |
1065 |
}; |
}; |
1066 |
// |
// |
1067 |
// |
// |
|
trigger = new pamela::trigger::TriggerEvent(); |
|
|
eh = new pamela::EventHeader(); |
|
|
ph = new pamela::PscuHeader(); |
|
|
// runinfo = new ItoRunInfo(file); |
|
|
// |
|
|
de = new pamela::calorimeter::CalorimeterEvent(); |
|
|
trk = new pamela::tracker::TrackerEvent(); |
|
|
ne = new pamela::neutron::NeutronEvent(); |
|
|
ace = new pamela::anticounter::AnticounterEvent(); |
|
|
s4 = new pamela::S4::S4Event(); |
|
|
tof = new pamela::tof::TofEvent(); |
|
|
// |
|
1068 |
// Load level0 file if the case |
// Load level0 file if the case |
1069 |
// |
// |
1070 |
if ( level.file == 0 || level.file == -1 ){ |
if ( level.file == 0 || level.file == -1 ){ |
1071 |
|
// |
1072 |
|
trigger = new pamela::trigger::TriggerEvent(); |
1073 |
|
eh = new pamela::EventHeader(); |
1074 |
|
ph = new pamela::PscuHeader(); |
1075 |
|
de = new pamela::calorimeter::CalorimeterEvent(); |
1076 |
|
trk = new pamela::tracker::TrackerEvent(); |
1077 |
|
ne = new pamela::neutron::NeutronEvent(); |
1078 |
|
ace = new pamela::anticounter::AnticounterEvent(); |
1079 |
|
s4 = new pamela::S4::S4Event(); |
1080 |
|
tof = new pamela::tof::TofEvent(); |
1081 |
|
// |
1082 |
otr = new TChain("Physics"); |
otr = new TChain("Physics"); |
1083 |
otr->Add(file->GetName(),-1); |
otr->Add(file->GetName(),-1); |
1084 |
otr->SetBranchAddress("Trigger", &trigger); |
otr->SetBranchAddress("Trigger", &trigger); |
1856 |
void FEVdetector::ShowTOF(){ |
void FEVdetector::ShowTOF(){ |
1857 |
// |
// |
1858 |
// |
// |
|
// |
|
1859 |
if ( !var.TOF ) return; |
if ( !var.TOF ) return; |
1860 |
// |
// |
1861 |
Int_t tt = 0; |
Int_t tt = 0; |
2691 |
// |
// |
2692 |
if ( numtr >= repuntil-1 ) repeat = false; |
if ( numtr >= repuntil-1 ) repeat = false; |
2693 |
// |
// |
2694 |
ptt = L2->GetToFLevel2()->GetToFTrkVar(numtr); |
// printf(" numtr is %i \n",numtr); |
2695 |
|
ptt = L2->GetToFLevel2()->GetToFTrkVar(numtr); |
2696 |
//ptrack = L2->GetTrack(numtr); |
//ptrack = L2->GetTrack(numtr); |
2697 |
//ptt = ptrack->GetToFTrack(); |
//ptt = ptrack->GetToFTrack(); |
2698 |
}; |
}; |
5509 |
// |
// |
5510 |
// |
// |
5511 |
// |
// |
5512 |
if ( var.CALO && false ){ |
if ( var.CALO && var.CALOT ){ |
5513 |
if ( L2->GetCaloLevel2()->npcfit[0] > 0 && L2->GetCaloLevel2()->npcfit[1] > 0 ){ |
if ( L2->GetCaloLevel2()->npcfit[0] > 0 && L2->GetCaloLevel2()->npcfit[1] > 0 ){ |
5514 |
Float_t calx[22]; |
Float_t calx[22]; |
5515 |
Float_t caly[22]; |
Float_t caly[22]; |