Commit d125cd9a authored by Stezowski Olivier's avatar Stezowski Olivier
Browse files

Merge branch 'preprod' into 'preprod'

warnings corrections from macos

See merge request IPNL_GAMMA/narval_emulator!61
parents d6adb5e7 13702c46
......@@ -47,7 +47,7 @@
#endif
#if defined(OS_TYPE)
#if !(OS_TYPE == OS_LINUX) && !(OS_TYPE == OS_WINDOWS) && !(OS_TYPE == OS_CYGWIN)
#if !(OS_TYPE == OS_LINUX) && !(OS_TYPE == OS_WINDOWS) && !(OS_TYPE == OS_CYGWIN) && !(OS_TYPE == OS_APPLE)
#error OS_TYPE should be either OS_LINUX or OS_WINDOWS or OS_CYGWIN or OS_APPLE
#endif
#else
......@@ -62,7 +62,7 @@
#define NRV_OFFLINE 2
// NRV_TYPE should be defined in the project or makefile (e.g. for narval: make library NRV_TYPE=-DNRV_ONLINE)
//#define NRV_TYPE NRV_ONLINE
#define NRV_TYPE NRV_OFFLINE
#ifndef NRV_TYPE
#error Please define NRV_TYPE to be either NRV_ONLINE or NRV_OFFLINE
......
......@@ -29,8 +29,8 @@
#include <cmath>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include <stdlib.h>
#include <cerrno>
#include <cstdlib>
#include <sys/mman.h>
#include <sys/stat.h>
......@@ -46,7 +46,6 @@ using namespace AGAPRO;
string Histogramer::gMotherClass = "Histogramer";
Histogramer::Histogramer(string trigname) :
NarvalConsumer(),
fTrigger(trigname.data())
{
......@@ -55,7 +54,7 @@ Histogramer::Histogramer(string trigname) :
Histogramer::~Histogramer()
{
// in principle not needed ... just in case reset it has not been called by narval
UInt_t error = 0u; process_reset(&error) ;
UInt_t error = 0; process_reset(&error) ;
}
void Histogramer::process_config(const Char_t *directory_path, UInt_t *error_code)
......@@ -72,7 +71,7 @@ void Histogramer::process_config(const Char_t *directory_path, UInt_t *error_cod
UInt_t Histogramer::ProcessBlock(ADF::FrameBlock &inBlock)
{
// attach the input/output buffer to the FrameIO system
fFrameIO.Attach(&inBlock, 0x0);
fFrameIO.Attach(&inBlock, nullptr);
// start the processing
UInt_t error_code = 0;
......@@ -85,23 +84,20 @@ UInt_t Histogramer::ProcessBlock(ADF::FrameBlock &inBlock)
// fill local variables with data from the input
error_code = SetInput();
if( error_code == 1)
{
if( error_code == 1) {
LOCK_COUT;
Log.SetProcessMethod("ProcessBlock");
Log << error << " During : SetInput()" << dolog;
break;
}
else
{
Process();
}
Process();
nevs++;
fReadEvts++;
}
fFrameIO.Detach(&inBlock, 0x0);
fFrameIO.Detach(&inBlock, nullptr);
cServer.Exec(timestamp, nevs);
......
......@@ -68,12 +68,12 @@ protected:
Int_t fReadEvts = 0;
UInt_t evnumber;
ULong64_t timestamp;
UInt_t evnumber = 0;
ULong64_t timestamp = 0;
Int_t fBasePortNumber;
Int_t fBasePortNumber = 0;
Bool_t fFirstBlock;
Bool_t fFirstBlock = 0;
Float_t fRefreshTime = 2.0;
......@@ -82,8 +82,8 @@ public:
static std::string gMotherClass; //! Static string containing the name of the base class
std::string gActualClass; //! Static string to choose daughter class at run time
UShort_t crystal_id; //! crystal id
std::string crystal_name; //! crystal name
UShort_t crystal_id = 0; //! crystal id
std::string crystal_name = ""; //! crystal name
vector < vector< void * > > fListOfHists; //! Level 1 : list of actors ; level 2 : list of observable per actor
......@@ -92,7 +92,7 @@ public:
virtual ~Histogramer();
static void process_config(const Char_t *, UInt_t *);
virtual void process_initialise ( UInt_t *error_code ){return;}
virtual void process_initialise ( UInt_t *){return;}
virtual void process_reset ( UInt_t *error_code );
virtual UInt_t ProcessBlock(ADF::FrameBlock &);
......@@ -109,7 +109,7 @@ public:
static std::string GetCoreNameFromID(const Int_t id);
protected:
virtual UInt_t GetParameters(const std::string& confFile, Bool_t doList=false){return 0;}
virtual UInt_t GetParameters(const std::string& , Bool_t ){return 0;}
virtual void InitSMZ(Int_t){return;}
void *CreateNewSMz(const char *name, Int_t Size, Int_t PortNumber);
......
......@@ -164,6 +164,8 @@ UInt_t PSAHist::Process()
fLastTS = timestamp;
}
return 0;
}
void PSAHist::process_initialise (UInt_t *error_code)
......@@ -230,7 +232,7 @@ void PSAHist::process_initialise (UInt_t *error_code)
Int_t PSAHist::SetInput()
{
Frame *frame_in = fFrameCrystal->GetFrame();
UInt_t bytes_in = frame_in->Read();
/*UInt_t bytes_in = */frame_in->Read();
timestamp = ((AgataKey *)frame_in->GetKey())->GetTimeStamp();
evnumber = ((AgataKey *)frame_in->GetKey())->GetEventNumber();
......
......@@ -76,10 +76,10 @@ public:
PSAHist();
virtual ~PSAHist();
virtual UInt_t Process();
virtual Int_t SetInput(); //! to init your local variables with the ones from the buffers
virtual UInt_t Process() override;
virtual Int_t SetInput() override; //! to init your local variables with the ones from the buffers
virtual void process_initialise ( UInt_t *error_code ); //! Constructor implementation
virtual void process_initialise ( UInt_t *error_code ) override; //! Constructor implementation
public:
virtual UInt_t GetParameters(const std::string& confFile, Bool_t doList=false) override;
......
......@@ -4,7 +4,7 @@
using namespace AGAPRO;
extern "C" {
Histogramer *process_register (UInt_t *error_code)
Histogramer *process_register (UInt_t *)
{
return new PSAHist();
}
......
......@@ -230,6 +230,8 @@ UInt_t PreproHist::Process()
fLastTS = timestamp;
}
return 0;
}
void PreproHist::process_initialise (UInt_t *error_code)
......@@ -545,7 +547,7 @@ float PreproHist::FindTriggerTime (float *pT, float trigFract, int trigChans, f
// gaussian smoothing once
float oldval = pT[0];
for(int nn = 0; nn < fTraceLengthPSA-1; nn++) {
for(uint nn = 0; nn < fTraceLengthPSA-1; nn++) {
float newval = 0.25f*(oldval + 2.f*pT[nn] + pT[nn+1]);
oldval = pT[nn];
pT[nn] = newval;
......
......@@ -101,10 +101,10 @@ public:
PreproHist();
virtual ~PreproHist();
virtual UInt_t Process();
virtual Int_t SetInput(); //! to init your local variables with the ones from the buffers
virtual UInt_t Process() override;
virtual Int_t SetInput() override; //! to init your local variables with the ones from the buffers
virtual void process_initialise ( UInt_t *error_code ); //! Constructor implementation
virtual void process_initialise ( UInt_t *error_code ) override; //! Constructor implementation
public:
virtual UInt_t GetParameters(const std::string& confFile, Bool_t doList=false) override;
......
......@@ -4,7 +4,7 @@
using namespace AGAPRO;
extern "C" {
Histogramer *process_register (UInt_t *error_code)
Histogramer *process_register (UInt_t *)
{
return new PreproHist();
}
......
......@@ -117,7 +117,7 @@ UInt_t ProdHist::Process()
vector< void* > SignalsList = fListOfHists[(Int_t)HistLib::Signals];
if(fFirstBlock && fPlotSignals && SignalsList.size() == (kNSG+kNCC)*fNumberOfSignals)
if(fFirstBlock && fPlotSignals && SignalsList.size() == (uint)((kNSG+kNCC)*fNumberOfSignals))
{
for(int nn = 0; nn < kNSG; nn++)
{
......@@ -178,6 +178,8 @@ UInt_t ProdHist::Process()
fLastTS = timestamp;
}
return 0;
}
void ProdHist::process_initialise (UInt_t *error_code)
......
......@@ -80,10 +80,10 @@ public:
ProdHist();
virtual ~ProdHist();
virtual UInt_t Process();
virtual Int_t SetInput(); //! to init your local variables with the ones from the buffers
virtual UInt_t Process() override;
virtual Int_t SetInput() override; //! to init your local variables with the ones from the buffers
virtual void process_initialise ( UInt_t *error_code ); //! Constructor implementation
virtual void process_initialise ( UInt_t *error_code ) override; //! Constructor implementation
public:
virtual UInt_t GetParameters(const std::string& confFile, Bool_t doList=false) override;
......
......@@ -4,7 +4,7 @@
using namespace AGAPRO;
extern "C" {
Histogramer *process_register (UInt_t *error_code)
Histogramer *process_register (UInt_t *)
{
return new ProdHist();
}
......
......@@ -431,6 +431,8 @@ bool TB_AGATA_Builder::ReadTransformation()
in.close( );
Log << dolog;
return true;
}
......
......@@ -5,6 +5,8 @@
#include <limits.h>
#include <algorithm>
#include "fileATCA.h"
#include "CrystalProducerATCA.h"
#include "AgataFrameFactory.h"
#include "AgataKeyFactory.h"
......
......@@ -4,7 +4,6 @@
#include "CrystalProducer.h"
#include "Misc.h"
#include "fileATCA.h"
#include "mezzanine.h"
#include "detector_t.h"
......@@ -12,6 +11,8 @@
// Afterwords data are converted to ADF
// Dino, Daniele 2008, ADF02 compiant
class fileATCA;
class CrystalProducerATCA : public CrystalProducer
{
private:
......
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