722 |
|
|
723 |
Bool_t PamLevel2::IsGood(){ |
Bool_t PamLevel2::IsGood(){ |
724 |
Bool_t goodev=true; |
Bool_t goodev=true; |
725 |
// if(trk2_obj && trk2_obj->UnpackError() != 0 ) goodev = false; |
if(trk2_obj && trk2_obj->UnpackError() != 0 ) goodev = false; |
726 |
if(calo2_obj && calo2_obj->good != 1) goodev = false; |
if(calo2_obj && calo2_obj->good != 1) goodev = false; |
727 |
if(tof_obj && tof_obj->unpackError != 0) goodev = false; |
if(tof_obj && tof_obj->unpackError != 0) goodev = false; |
728 |
if(trig_obj && trig_obj->unpackError != 0) goodev = false; |
if(trig_obj && trig_obj->unpackError != 0) goodev = false; |
756 |
return &trk2_obj; |
return &trk2_obj; |
757 |
}; |
}; |
758 |
if(!objname.CompareTo("TrkHough")) { |
if(!objname.CompareTo("TrkHough")) { |
759 |
if(!trkh_obj) trkh_obj = new TrkHough(); |
if(!trkh_obj) { |
760 |
|
trkh_obj = new TrkHough(); |
761 |
|
trkh_obj->Set(); |
762 |
|
} |
763 |
return &trkh_obj; |
return &trkh_obj; |
764 |
}; |
}; |
765 |
if(!objname.CompareTo("CaloLevel1")) { |
if(!objname.CompareTo("CaloLevel1")) { |
2740 |
// -------------------------------------- |
// -------------------------------------- |
2741 |
// ---> exit with TRUE |
// ---> exit with TRUE |
2742 |
// -------------------------------------- |
// -------------------------------------- |
2743 |
cout << endl << " ))))) UPDATE RUN INFO ((((( @iev "<<iev<<" run "<<GetRunInfo()->ID<<" irun "<<irun<<endl; |
if(DBG)cout << endl << " ))))) UPDATE RUN INFO ((((( @iev "<<iev<<" run "<<GetRunInfo()->ID<<" irun "<<irun<<endl; |
2744 |
|
// ---------------------------------------------------- |
2745 |
|
// update the tracker parameters |
2746 |
|
// (non ho trovato nessun altro modo sicuro di farlo...) |
2747 |
|
// ---------------------------------------------------- |
2748 |
|
if(!dbc || (dbc && !dbc->IsConnected()) )SetDBConnection(); |
2749 |
|
TrkParams::Set(GetRunInfo() ,dbc); |
2750 |
|
if(dbc)dbc->Close(); |
2751 |
|
|
2752 |
// ---------------------------------------------------- |
// ---------------------------------------------------- |
2753 |
// then check if the run has a fragment |
// then check if the run has a fragment |
2754 |
// in this case we have to switch to the next fragment |
// in this case we have to switch to the next fragment |
2757 |
if( |
if( |
2758 |
GetRunInfo()->ID_RUN_FRAG != 0 && |
GetRunInfo()->ID_RUN_FRAG != 0 && |
2759 |
// GetRunInfo()->ID_RUN_FRAG != GetRunInfo()->ID && |
// GetRunInfo()->ID_RUN_FRAG != GetRunInfo()->ID && |
2760 |
|
DBG && |
2761 |
true ){ |
true ){ |
2762 |
cout << "* fragment *"<<endl; |
cout << "* fragment *"<<endl; |
2763 |
} |
} |
2803 |
cout << " obt "<<obt; |
cout << " obt "<<obt; |
2804 |
cout <<" >> "<<GetRunInfo()->RUNHEADER_OBT<<" "<<GetRunInfo()->RUNTRAILER_OBT; |
cout <<" >> "<<GetRunInfo()->RUNHEADER_OBT<<" "<<GetRunInfo()->RUNTRAILER_OBT; |
2805 |
cout << " *** JUMP RUN *** irun "<<irun; |
cout << " *** JUMP RUN *** irun "<<irun; |
|
// if(!SECONDO_GIRO)cout << " (don't worry)"; |
|
|
// else cout << " (start worring...)"; |
|
2806 |
cout << endl; |
cout << endl; |
2807 |
} |
} |
2808 |
// irun++; |
// irun++; |
2834 |
cout << " obt "<<obt; |
cout << " obt "<<obt; |
2835 |
cout <<" >> "<<GetRunInfo()->RUNHEADER_OBT<<" "<<GetRunInfo()->RUNTRAILER_OBT; |
cout <<" >> "<<GetRunInfo()->RUNHEADER_OBT<<" "<<GetRunInfo()->RUNTRAILER_OBT; |
2836 |
} |
} |
2837 |
cout << endl; |
if(DBG)cout << endl; |
2838 |
cout << endl << " ))))) UPDATE RUN INFO ((((( @iev "<<iev<<" run "<<GetRunInfo()->ID<<" (run-entry "<<irun<<")"<<endl; |
if(DBG)cout << endl << " ))))) UPDATE RUN INFO ((((( @iev "<<iev<<" run "<<GetRunInfo()->ID<<" (run-entry "<<irun<<")"<<endl; |
2839 |
|
// ---------------------------------------------------- |
2840 |
|
// update the tracker parameters |
2841 |
|
// (non ho trovato nessun altro modo sicuro di farlo...) |
2842 |
|
// ---------------------------------------------------- |
2843 |
|
if(!dbc || (dbc && !dbc->IsConnected()) )SetDBConnection(); |
2844 |
|
TrkParams::Set(GetRunInfo() ,dbc); |
2845 |
|
if(dbc)dbc->Close(); |
2846 |
// cout << endl; |
// cout << endl; |
2847 |
prevshift = 0; |
prevshift = 0; |
2848 |
return true; |
return true; |
3914 |
// } |
// } |
3915 |
|
|
3916 |
if ( TRK0 ){ |
if ( TRK0 ){ |
3917 |
TrkParams::Load(6); |
// TrkParams::Load(6); |
3918 |
if( !TrkParams::IsLoaded(6) ){ |
// if( !TrkParams::IsLoaded(6) ){ |
3919 |
cout << " TTree* PamLevel2::GetYodaTree( ) -- WARNING -- VK-mask not loaded"<<endl; |
// cout << " TTree* PamLevel2::GetYodaTree( ) -- WARNING -- VK-mask not loaded"<<endl; |
3920 |
}; |
// }; |
3921 |
if(!dbc || (dbc && !dbc->IsConnected()))SetDBConnection(); |
// if(!dbc || (dbc && !dbc->IsConnected()))SetDBConnection(); |
3922 |
TrkParams::SetCalib(run_obj,dbc); |
TrkParams::SetCalib(run_obj,dbc); |
3923 |
TrkParams::LoadCalib( ); |
TrkParams::LoadCalib( ); |
3924 |
if( !TrkParams::CalibIsLoaded() ){ |
if( !TrkParams::CalibIsLoaded() ){ |
3925 |
cout << " TTree* PamLevel2::GetYodaTree( ) -- WARNING -- Calibration not loaded"<<endl; |
cout << " TTree* PamLevel2::GetYodaTree( ) -- WARNING -- Calibration not loaded"<<endl; |
3926 |
}; |
}; |
3927 |
dbc->Close(); // EMILIANO, do not leave open connections, open only when needed |
// if(dbc)dbc->Close(); // EMILIANO, do not leave open connections, open only when needed |
3928 |
} |
} |
3929 |
|
|
3930 |
|
|
3993 |
do{ |
do{ |
3994 |
if(shift>0){ |
if(shift>0){ |
3995 |
cout << " PKTNUM L2 --- "<< pktn << " --- L0 --- "<< GetEventHeader()->GetPscuHeader()->GetCounter()<<endl; |
cout << " PKTNUM L2 --- "<< pktn << " --- L0 --- "<< GetEventHeader()->GetPscuHeader()->GetCounter()<<endl; |
3996 |
cout << " RUN: ID "<< GetRunInfo()->ID << " ID_ROOT_L0 "<<run_obj->ID_ROOT_L0<<" ID_RUN_FRAG "<<GetRunInfo()->ID_RUN_FRAG << " EV_FROM "<<GetRunInfo()->EV_FROM <<endl; |
if(DBG)cout << " RUN: ID "<< GetRunInfo()->ID << " ID_ROOT_L0 "<<run_obj->ID_ROOT_L0<<" ID_RUN_FRAG "<<GetRunInfo()->ID_RUN_FRAG << " EV_FROM "<<GetRunInfo()->EV_FROM <<endl; |
3997 |
cout << " L2 <--> L0 mismatch ( irun "<<irun<<" irunentry "<<irunentry<<" shift "<<shift<<" prevshift "<<prevshift<<" )"<<endl; |
if(DBG)cout << " L2 <--> L0 mismatch ( irun "<<irun<<" irunentry "<<irunentry<<" shift "<<shift<<" prevshift "<<prevshift<<" )"<<endl; |
3998 |
} |
} |
3999 |
answer = l0_tree->GetEntry(quellagiusta+(Long64_t)shift+(Long64_t)prevshift); |
answer = l0_tree->GetEntry(quellagiusta+(Long64_t)shift+(Long64_t)prevshift); |
4000 |
shift++; |
shift++; |
4042 |
*/ |
*/ |
4043 |
Bool_t PamLevel2::SetDBConnection(){ |
Bool_t PamLevel2::SetDBConnection(){ |
4044 |
|
|
4045 |
|
// cout << "PamLevel2::SetDBConnection()" << endl; |
4046 |
if(DBG){ |
if(DBG){ |
4047 |
cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<endl; |
cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<endl; |
4048 |
cout<<"Connecting to DB"<<endl; |
cout<<"Connecting to DB"<<endl; |