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); |
1010 |
|
|
1011 |
TChain* FEVdetector::Load(TFile &mainfile){ |
TChain* FEVdetector::Load(TFile &mainfile){ |
1012 |
// |
// |
1013 |
|
gObjectTable->Print(); |
1014 |
|
// |
1015 |
file = &mainfile; |
file = &mainfile; |
1016 |
// |
// |
1017 |
|
// if ( otr ) otr->Reset(); |
1018 |
|
// if ( runtree ) runtree->Reset(); |
1019 |
|
if ( runtree ){ |
1020 |
|
printf(" runtree residuo \n"); |
1021 |
|
if ( runtree->GetFile() ){ |
1022 |
|
printf("chiudi file \n"); |
1023 |
|
// runtree->GetFile()->Close("R"); |
1024 |
|
}; |
1025 |
|
}; |
1026 |
|
// |
1027 |
|
if ( runtree ){ |
1028 |
|
printf(" clear runtree \n"); |
1029 |
|
runtree->Clear(); |
1030 |
|
printf(" delete runtree \n"); |
1031 |
|
delete runtree; |
1032 |
|
}; |
1033 |
|
// if ( runtree ) runtree->Print(); |
1034 |
|
if ( otr ){ |
1035 |
|
printf(" otr residuo \n"); |
1036 |
|
// if ( otr->GetFile() ) otr->GetFile()->Close("R"); |
1037 |
|
// otr->ResetBranchAddresses(); |
1038 |
|
}; |
1039 |
|
if ( otr ){ |
1040 |
|
printf("proviamo ad ammazzarlo di brutto\n"); |
1041 |
|
// otr->Clear(); |
1042 |
|
printf("proviamo ad ammazzarlo di brutto\n"); |
1043 |
|
otr->Delete(); |
1044 |
|
printf("proviamo ad ammazzarlo di brutto\n"); |
1045 |
|
//delete otr; |
1046 |
|
printf("speriamo sia rimasto secco\n"); |
1047 |
|
}; |
1048 |
|
// if ( otr ){ |
1049 |
|
// otr->DropBaskets(); |
1050 |
|
// otr->Delete("all"); |
1051 |
|
// }; |
1052 |
|
// if ( runtree ){ |
1053 |
|
// runtree->DropBaskets(); |
1054 |
|
// runtree->Delete("all"); |
1055 |
|
// }; |
1056 |
|
if ( runtree ) printf("2 runtree residuo \n"); |
1057 |
|
// if ( runtree ) runtree->Print(); |
1058 |
|
if ( otr ) printf("2 otr residuo \n"); |
1059 |
|
// if ( otr ) otr->Print(); |
1060 |
|
// |
1061 |
L2 = new PamLevel2(); |
L2 = new PamLevel2(); |
1062 |
// |
// |
1063 |
if ( level.file == 2 ){ |
if ( level.file == 2 ){ |
1068 |
// |
// |
1069 |
if ( !otr ) return(0); |
if ( !otr ) return(0); |
1070 |
// |
// |
1071 |
|
otr->CanDeleteRefs(true); |
1072 |
|
if ( runtree ) runtree->CanDeleteRefs(true); |
1073 |
|
// |
1074 |
} else { |
} else { |
1075 |
// |
// |
1076 |
// load calorimeter ADC2MIP conversion file |
// load calorimeter ADC2MIP conversion file |
1111 |
}; |
}; |
1112 |
// |
// |
1113 |
// |
// |
|
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(); |
|
|
// |
|
1114 |
// Load level0 file if the case |
// Load level0 file if the case |
1115 |
// |
// |
1116 |
if ( level.file == 0 || level.file == -1 ){ |
if ( level.file == 0 || level.file == -1 ){ |
1117 |
|
// |
1118 |
|
trigger = new pamela::trigger::TriggerEvent(); |
1119 |
|
eh = new pamela::EventHeader(); |
1120 |
|
ph = new pamela::PscuHeader(); |
1121 |
|
de = new pamela::calorimeter::CalorimeterEvent(); |
1122 |
|
trk = new pamela::tracker::TrackerEvent(); |
1123 |
|
ne = new pamela::neutron::NeutronEvent(); |
1124 |
|
ace = new pamela::anticounter::AnticounterEvent(); |
1125 |
|
s4 = new pamela::S4::S4Event(); |
1126 |
|
tof = new pamela::tof::TofEvent(); |
1127 |
|
// |
1128 |
otr = new TChain("Physics"); |
otr = new TChain("Physics"); |
1129 |
otr->Add(file->GetName(),-1); |
otr->Add(file->GetName(),-1); |
1130 |
otr->SetBranchAddress("Trigger", &trigger); |
otr->SetBranchAddress("Trigger", &trigger); |
1902 |
void FEVdetector::ShowTOF(){ |
void FEVdetector::ShowTOF(){ |
1903 |
// |
// |
1904 |
// |
// |
|
// |
|
1905 |
if ( !var.TOF ) return; |
if ( !var.TOF ) return; |
1906 |
// |
// |
1907 |
Int_t tt = 0; |
Int_t tt = 0; |
2737 |
// |
// |
2738 |
if ( numtr >= repuntil-1 ) repeat = false; |
if ( numtr >= repuntil-1 ) repeat = false; |
2739 |
// |
// |
2740 |
ptt = L2->GetToFLevel2()->GetToFTrkVar(numtr); |
// printf(" numtr is %i \n",numtr); |
2741 |
|
ptt = L2->GetToFLevel2()->GetToFTrkVar(numtr); |
2742 |
//ptrack = L2->GetTrack(numtr); |
//ptrack = L2->GetTrack(numtr); |
2743 |
//ptt = ptrack->GetToFTrack(); |
//ptt = ptrack->GetToFTrack(); |
2744 |
}; |
}; |
5555 |
// |
// |
5556 |
// |
// |
5557 |
// |
// |
5558 |
if ( var.CALO && false ){ |
if ( var.CALO && var.CALOT ){ |
5559 |
if ( L2->GetCaloLevel2()->npcfit[0] > 0 && L2->GetCaloLevel2()->npcfit[1] > 0 ){ |
if ( L2->GetCaloLevel2()->npcfit[0] > 0 && L2->GetCaloLevel2()->npcfit[1] > 0 ){ |
5560 |
Float_t calx[22]; |
Float_t calx[22]; |
5561 |
Float_t caly[22]; |
Float_t caly[22]; |