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

Merge branch 'preprod' into 'master'

add mfm to adf in femul

See merge request IPNL_GAMMA/narval_emulator!44
parents bf891da8 efdd55a6
/** @file FEMUL_Config.h global header file defining conditional compilation flags - produced by cmake */
#ifndef FEMUL_CONFIG_H
#define FEMUL_CONFIG_H
#cmakedefine HAS_ROOT
#cmakedefine HAS_MFM
#cmakedefine HAS_VAMOS
#cmakedefine HAS_GANPRO
#endif
#ifndef FemulBasicMFMP_h
#define FemulBasicMFMP_h
// GANPRO includes
#include "GANPRO_BasicMFMP.h"
namespace GANPRO {
//! Base class a Basic MFM Producer
class FemulBasicMFMP : public BasicMFMP
{
public:
FemulBasicMFMP(){;}
virtual ~FemulBasicMFMP(){;}
//! Produce one block of data
virtual UInt_t ProcessBlock (ADF::FrameBlock &oblock){
BasicMFMP::ProcessBlock(oblock);
// if producer has been finished, stop there
if (GetFrameIO().GetStatus() == ADF::BaseFrameIO::kFinished) {
return 1u;
}
}
};
} // end namespace GANPRO
#endif // FemulBasicMFMP_h
......@@ -42,6 +42,8 @@
#include "ChainOfActors.h"
#include "ChainLocker.h" // WCT_THREADED is defined in ChainLocker.h
#include "FEMUL_Config.h"
//enum EActor { NONE, BUILDER, PRODUCER, FILTER, CONSUMER, DISPATCHER }; // THIS IS NOW DEFINED IN ChainOfActors.h
std::string NActor[] = {"NONE ", "BUILDER ", "PRODUCER ", "FILTER ", "CONSUMER ", "DISPATCHER"};
......@@ -51,6 +53,7 @@ BUILDER EventBuilder (can be derived from NarvalInterface as a PROD
PRODUCER BasicAFP
PRODUCER CrystalProducerATCA
PRODUCER AncillaryProducerTCP
PRODUCER BasicMFMP
FILTER PreprocessingFilterPSA
FILTER PSAFilterGridSearch
FILTER PostPSAFilter
......@@ -60,6 +63,7 @@ FILTER GlobalFilter
FILTER TrackingFilterOFT
FILTER TrackingFilterMGT
FILTER BasicATSB
FILTER MFMtoADF
CONSUMER BasicAFC
CONSUMER TreeBuilder
CONSUMER None pseudo-actor to close a chain without output
......@@ -81,6 +85,10 @@ DISPATCHER BuilderName pseudo actor to connect the output of a chain to an i
#include "AncillaryProducerTCP.h" // 22 220 no mother-daughter model
#ifdef HAS_GANPRO
#include "FemulBasicMFMP.h" // 23 230
#endif
// 3 FILTER
#include "PreprocessingFilter.h" // 30 300
#include "PreprocessingFilterPSA.h" // 301
......@@ -104,12 +112,16 @@ DISPATCHER BuilderName pseudo actor to connect the output of a chain to an i
#include "AGAPRO_BasicATSB.h" // 36 360
#ifdef HAS_GANPRO
#include "GANPRO_MFMtoADF.h" // 37 370
#endif
// 4 CONSUMER
// None // 40 400 fake, used as last of a chain
#include "BasicAFC.h" // 41 410 no mother-daughter model
#ifdef HAS_ROOT
#include "AGAPRO_TreeBuilder.h"
#include "AGAPRO_TreeBuilder.h" // 42 420
#endif
// 5 DISPATCHER femul mechanism to connect to an EventBuilder
......@@ -978,6 +990,16 @@ bool topologyConfNew()
pActor->nrvPointer = new AncillaryProducerTCP;
pActor->libItem = 220;
}
#ifdef HAS_GANPRO
// 23
else if(pActor->libName == "BasicMFMP") {
cout << "FemulBasicMFMP ..." << endl;
GANPRO::FemulBasicMFMP::process_config(pActor->libConf.c_str(), &error_config);
IF_ERRORCONFIG(error_config);
pActor->nrvPointer = new GANPRO::FemulBasicMFMP;
pActor->libItem = 230;
}
#endif
ELSE_UNKNOWNCLASS(nc);
break;
case FILTER: //// 3
......@@ -1097,6 +1119,16 @@ bool topologyConfNew()
}
ELSE_UNKNOWNCLASS(nc);
}
#ifdef HAS_GANPRO
// 37
else if(pActor->libName == "MFMtoADF") {
cout << "MFMtoADF ..." << endl;
GANPRO::MFMtoADF::process_config(pActor->libConf.c_str(), &error_config);
IF_ERRORCONFIG(error_config);
pActor->nrvPointer = new GANPRO::MFMtoADF;
pActor->libItem = 370;
}
#endif
ELSE_UNKNOWNCLASS(nc);
break;
case CONSUMER: //// 4
......
......@@ -70,6 +70,7 @@ void TB_NEDA::InitTree()
fTree->Branch("NEDAId", NEDAId, "NEDAId[nbNEDA]/s" );
fTree->Branch("NEDATdc", NEDATdc, "NEDATdc[nbNEDA]/s" );
fTree->Branch("NEDAEnergy", NEDAEnergy, "NEDAEnergy[nbNEDA]/s" );
fTree->Branch("NEDAFast", NEDAFast, "NEDAFast[nbNEDA]/s" );
fTree->Branch("NEDASlow", NEDASlow, "NEDASlow[nbNEDA]/s" );
fTree->Branch("NEDAZco", NEDAZco, "NEDAZco[nbNEDA]/s" );
......@@ -113,6 +114,7 @@ void TB_NEDA::Process(Int_t idet)
NEDAId[i] = fLookUpTable[NEDABoardId[i]*MaxChannel+NEDAChannelId[i]];
NEDATdc[i] = fNEDAFrame->GetTdcCorValue();
NEDAEnergy[i] = fNEDAFrame->GetEnergy();
NEDAFast[i] = fNEDAFrame->GetFastIntegral();
NEDASlow[i] = fNEDAFrame->GetSlowIntegral();
NEDAZco[i] = fNEDAFrame->GetNbZero();
......
......@@ -39,7 +39,7 @@ protected:
Int_t nbNEDA;
UShort_t NEDABoardId[MaxNEDA], NEDAChannelId[MaxNEDA], NEDAId[MaxNEDA];
UShort_t NEDATdc[MaxNEDA], NEDAFast[MaxNEDA], NEDASlow[MaxNEDA] ,NEDAZco[MaxNEDA], NEDATime[MaxNEDA];
UShort_t NEDATdc[MaxNEDA], NEDAEnergy[MaxNEDA], NEDAFast[MaxNEDA], NEDASlow[MaxNEDA] ,NEDAZco[MaxNEDA], NEDATime[MaxNEDA];
ULong64_t TSNEDAHit[MaxNEDA];
ULong64_t TSNEDA;
UShort_t NEDANeural[MaxNEDA];
......
......@@ -66,6 +66,8 @@ void TB_VAMOS::InitValues()
Log.GetProcessName() = gActualClass;
Log.SetProcessMethod("InitValues()");
if(fAnalysis)
fAnalysis->Clear();
}
void TB_VAMOS::InitTree()
......@@ -137,7 +139,6 @@ void TB_VAMOS::Process(Int_t idet)
fMFMCommonFrame->SetAttributs(((ADF::RawFrame *)fFrame->GetFrame())->RawBuffer().Address());
fAnalysis->Clear();
fAnalysis->UnPack(fMFMCommonFrame);
fAnalysis->Treat();
}
......
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