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

add DIAMANT Tree in GuiBuilder


git-svn-id: svn+ssh://anonsvn.in2p3.fr/agata/gammaware/trunk@2242 c3abf467-7ff2-0310-b516-c5fb849bdde0
parent 21d9209b
......@@ -497,7 +497,7 @@ void GuiBuildTree::ProcessRun(int RunIndex)
}
if(fUseDIAMANT)
{
rootmaster->Add<EventNEDATree>("DIAMANT","DIAMANT branch");
rootmaster->Add<EventDIAMANTTree>("DIAMANT","DIAMANT branch");
}
#endif
......
......@@ -20,6 +20,8 @@
#include "EventDIAMANTWatchers.h"
#include "AgataKeyFactory.h"
#include "DFAgent.h"
#include "TH3.h"
#include "TH2.h"
......@@ -143,10 +145,11 @@ EventDIAMANTTree::~EventDIAMANTTree()
void EventDIAMANTTree::SetBranches()
{
GetTree()->Branch("number_of_diamant",&number_of_diamant,"number_of_diamant/I");
GetTree()->Branch( "BoardId_c", BoardId_c, "BoardId_c[number_of_diamant]/s" );
GetTree()->Branch( "ChannelId_c", ChannelId_c, "ChannelId_c[number_of_diamant]/s" );
GetTree()->Branch("nbDIAMANT", &nbDIAMANT, "nbDIAMANT/I");
GetTree()->Branch("DIAMANTBoard", DIAMANTBoard, "DIAMANTBoard[nbDIAMANT]/s" );
GetTree()->Branch("DIAMANTChannel", DIAMANTChannel, "DIAMANTChannel[nbDIAMANT]/s" );
GetTree()->Branch("TSDIAMANT", &fTimestamp, "TSDIAMANT/l" );
}
void EventDIAMANTTree::Exec(Option_t * /*option*/)
......@@ -156,7 +159,9 @@ void EventDIAMANTTree::Exec(Option_t * /*option*/)
return;
}
UInt_t number_of_frame = GetNbSubFrame(); number_of_diamant = number_of_frame;
fTimestamp = ((AgataKey *)fFrame->GetFrame()->GetKey())->GetTimeStamp();
UInt_t number_of_frame = GetNbSubFrame(); nbDIAMANT = number_of_frame;
for(UInt_t i = 0u; i <number_of_frame; i++) {
MFMDiamantFrame *mfmframe = GetMFM(i);
......@@ -165,8 +170,8 @@ void EventDIAMANTTree::Exec(Option_t * /*option*/)
continue;
}
BoardId_c[i] = mfmframe->GetBoardId(); ChannelId_c[i] = mfmframe->GetTGCristalId() ;
DIAMANTBoard[i] = mfmframe->GetBoardId();
DIAMANTChannel[i] = mfmframe->GetTGCristalId() ;
}
FillTree();
......
......@@ -110,9 +110,10 @@ class EventDIAMANTTree : public EventDIAMANTWatchers, public TTreeBuilder
static const Int_t MaxDIAMANT = 100;
private:
Int_t number_of_diamant; // Number of hits in the array
UShort_t BoardId_c[MaxDIAMANT], ChannelId_c[MaxDIAMANT];
Int_t nbDIAMANT; // Number of hits in the array
UShort_t DIAMANTBoard[MaxDIAMANT], DIAMANTChannel[MaxDIAMANT];
ULong64_t fTimestamp;
protected:
virtual void SetBranches();
......
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