Commit c8aeb3b4 authored by Jérémie Dudouet's avatar Jérémie Dudouet
Browse files

Adaptation of the TreeBuilder for Vamos to the new vanalysis library

parent 76c2688d
......@@ -132,57 +132,14 @@ void TB_VAMOS::Process(Int_t idet)
if(fAnalysis == nullptr)
return;
fAnalysis->Clear();
fFrame = fTrigger->GetInputSharedFP(idet+1);
fFrame->GetFrame()->Read();
// fMFMMergeFrame->SetAttributs(((ADF::RawFrame *)fFrame->GetFrame())->RawBuffer().Address());
fMFMCommonFrame->SetAttributs(((ADF::RawFrame *)fFrame->GetFrame())->RawBuffer().Address());
// cout<<fFrame->GetFrame()->GetLength()<<endl;
// cout<<((AgataKey*)fFrame->GetFrame()->GetKey())->GetTimeStamp()<<endl;
if(fMFMCommonFrame->GetFrameTypeAttribut() == MFM_EBY_EN_TS_FRAME_TYPE)
{
fMFMEBYFrame->SetAttributs(fMFMCommonFrame->GetPointHeader());
// extract new one from MFM
Int_t size = fMFMEBYFrame->GetNbItemsAttribut();
for (Int_t i = 0; i < size; i++) {
fMFMEBYFrame->EbyedatGetParameters(i, &fData[0], &fData[1]);
if(fData[0] == 0) {
Log << error << Form("LABEL Error : Label 0 found in the data LABEL: %d DATA : %d !",fData[0],fData[1]) << dolog ;
continue;
}
fAnalysis->Add(fData);
}
ULong64_t MFM_TS = 0;
MFM_TS = fMFMEBYFrame->GetTimeStamp();
// Store Time Stamp as parameter
fData[0] = 16385;
fData[1] = (UShort_t) (MFM_TS*1.e-5) ; // in mSec
fAnalysis->Add(fData);
fData[0] = 16386;
fData[1] = (UShort_t) (fMFMEBYFrame->GetEventNumber()) ;
fAnalysis->Add(fData);
fAnalysis->Treat();
fAnalysis->FillHistograms();
}
fMFMCommonFrame->SetAttributs(((ADF::RawFrame *)fFrame->GetFrame())->RawBuffer().Address());
// fAnalysis->Clear();
// fAnalysis->Unpack(fMFMCommonFrame);
// fAnalysis->Treat();
fAnalysis->Clear();
fAnalysis->UnPack(fMFMCommonFrame);
fAnalysis->Treat();
}
UInt_t TB_VAMOS::GetParameters(const std::string& confFile, Bool_t doList)
......
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