Commit d9070910 authored by J.Dudouet [IPNL/CSNSM]'s avatar J.Dudouet [IPNL/CSNSM]
Browse files

Add proper re-initialization when the trigger is not corresponding to a watcher


git-svn-id: svn+ssh://anonsvn.in2p3.fr/agata/gammaware/trunk@2263 c3abf467-7ff2-0310-b516-c5fb849bdde0
parent 17ae7f43
This diff is collapsed.
......@@ -69,8 +69,6 @@ public:
};
//#define CHECK_COMMISSIONING_GANIL
//! AD ROOT TTree branches for the tracked part
/*!
*/
......@@ -102,14 +100,7 @@ private:
Float_t trackT[MaxGamma]; // time of the track gamma
Int_t trackCrystalID[MaxGamma]; // CrystalID of the first interaction point of the track
#ifdef CHECK_COMMISSIONING_GANIL
static const Int_t MaxG = 45;
Float_t Eg[MaxG];
Float_t Eg1[MaxG];
Float_t EgA[MaxG];
#endif
protected:
virtual void SetBranches();
......@@ -165,15 +156,9 @@ private:
Float_t coreDE0[MaxCore]; // Doppler with position from Hit with Max E
Float_t coreDE1[MaxCore]; // Doppler with position from Hit with Max E
//
Float_t velDop[MaxCore]; // Beta for the doppler correction
Float_t velDop; // Beta for the doppler correction
Int_t hit_per_cryst[MaxCore]; // Number of hits for each cryst ID i.e. dans each data:psa frames
ULong64_t coreTS[MaxCore]; // timestamp of core
private:
// Spectra on the Hit tree. Used here since no tracking yet.
TH1 *fIdSpectra;
TH1 *fSumSpectra;
TH3F *fhitAgata; // spectra with some position in agata ref: wall, target, Gamma
protected:
//! Do Doppler taking into account additionnal offset of the agata position (see SetAgataOffset)
......
......@@ -275,6 +275,17 @@ void DIAMANTTree::Exec(Option_t * /*option*/)
{
if ( fFrame == 0x0 || !fFrame->IsValid() ) {
SetLastExecStatus(1u);
fBoardID = 0;
fChannelID = 0;
DIAMANTId = 0;
fStatus1 = 0;
fStatus2 = 0;
fEnergy = 0;
fTop = 0;
fPID = 0;
fADFTimestamp = 0;
return;
}
......
......@@ -150,33 +150,26 @@ void EventDIAMANTWatchers::Exec(Option_t * /*option*/)
return;
}
memset(BoardId ,0,sizeof(UShort_t)*MaxDIAMANT);
memset(ChannelId,0,sizeof(UShort_t)*MaxDIAMANT);
memset(DIAMANTId,0,sizeof(UShort_t)*MaxDIAMANT);
memset(Status1,0,sizeof(Int_t)*MaxDIAMANT);
memset(Status2,0,sizeof(Int_t)*MaxDIAMANT);
memset(Energy ,0,sizeof(Int_t)*MaxDIAMANT);
memset(Top ,0,sizeof(Int_t)*MaxDIAMANT);
memset(PID ,0,sizeof(Float_t)*MaxDIAMANT);
memset(TSHit ,0,sizeof(ULong64_t)*MaxDIAMANT);
fTimestamp = ((AgataKey *)fFrame->GetFrame()->GetKey())->GetTimeStamp();
UInt_t number_of_frame = GetNbSubFrame(); nbDIAMANT = number_of_frame;
nbDIAMANT = GetNbSubFrame();
if(nbDIAMANT>MaxDIAMANT)
{
fBashColor->SetWarningOut();
cout<<GetName()<<endl;
cout<<number_of_frame<<" sub frames in event:data:ranc1 ==> maximum is "<<MaxDIAMANT<<endl;
cout<<nbDIAMANT<<" sub frames in event:data:ranc1 ==> maximum is "<<MaxDIAMANT<<endl;
cout<<"Event ignored"<<endl;
fBashColor->ResetColor();
nbDIAMANT=0;
nbDIAMANT = 0;
fTimestamp = 0;
return;
}
for(Int_t i = 0u; i <nbDIAMANT; i++) {
for(Int_t i = 0u; i <nbDIAMANT; i++)
{
MFMDiamantFrame *mfmframe = GetMFM(i);
if ( mfmframe == 0x0 ){
std::cout << "BUG" << std::endl;
......
......@@ -151,29 +151,22 @@ void EventNEDAWatchers::Exec(Option_t * /*option*/)
return;
}
memset(BoardId,0,sizeof(UShort_t)*MaxNEDA);
memset(ChannelId,0,sizeof(UShort_t)*MaxNEDA);
memset(NEDAId,0,sizeof(UShort_t)*MaxNEDA);
memset(NEDATdc,0,sizeof(UShort_t)*MaxNEDA);
memset(NEDAFast,0,sizeof(UShort_t)*MaxNEDA);
memset(NEDASlow,0,sizeof(UShort_t)*MaxNEDA);
memset(NEDAZco,0,sizeof(UShort_t)*MaxNEDA);
memset(TSHit ,0,sizeof(ULong64_t)*MaxNEDA);
fTimestamp = ((AgataKey *)fFrame->GetFrame()->GetKey())->GetTimeStamp();
UInt_t number_of_frame = GetNbSubFrame(); nbNEDA = number_of_frame;
nbNEDA = GetNbSubFrame();
if(nbNEDA>MaxNEDA)
{
fBashColor->SetWarningOut();
cout<<GetName()<<endl;
cout<<number_of_frame<<" sub frames in event:data:ranc0 ==> maximum is "<<MaxNEDA<<endl;
cout<<nbNEDA<<" sub frames in event:data:ranc0 ==> maximum is "<<MaxNEDA<<endl;
cout<<"Event ignored"<<endl;
fBashColor->ResetColor();
nbNEDA = 0;
fTimestamp = 0;
return;
}
for(Int_t i = 0u; i <nbNEDA; i++)
......@@ -207,8 +200,6 @@ void EventNEDAWatchers::Exec(Option_t * /*option*/)
fNEvts++;
}
void EventNEDAWatchers::Print(const char * /* option */ ) const
{
std::cout<<std::endl;
......
......@@ -234,19 +234,19 @@ void NEDATree::SetBranches()
void NEDATree::Exec(Option_t * /*option*/)
{
BoardId = 0;
ChannelId = 0;
NEDAId = 0;
NEDATdc = 0;
NEDAFast = 0;
NEDASlow = 0;
NEDAZco = 0;
fTimestamp = 0;
if ( fFrame == 0x0 || !fFrame->IsValid() ) {
SetLastExecStatus(1u);
return;
BoardId = 0;
ChannelId = 0;
NEDAId = 0;
NEDATdc = 0;
NEDAFast = 0;
NEDASlow = 0;
NEDAZco = 0;
fTimestamp = 0;
}
fTimestamp = ((AgataKey *)fFrame->GetFrame()->GetKey())->GetTimeStamp();
......@@ -254,6 +254,9 @@ void NEDATree::Exec(Option_t * /*option*/)
MFMNedaCompFrame *mfmframe = GetMFM();
if ( mfmframe == 0x0 ){
std::cout << "BUG" << std::endl;
fTimestamp = 0;
return;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment