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

Merge branch 'preprod' into 'master'

Preprod

See merge request !31
parents a960ef26 ff555f77
Pipeline #22129 passed with stage
in 3 minutes and 36 seconds
......@@ -22,10 +22,11 @@
#include "BashColor.h"
BashColor::BashColor()
{
fColor = "";
fType = "0;3";
BashColor::BashColor() :
fColor(""),
fType("0;3")
{
}
BashColor::~BashColor()
......
......@@ -392,7 +392,7 @@ UInt_t NOMADBuilder::SetInput()
if ( fListOfFreeEvents.size() ){
#ifdef LOCAL_DEBUG
printf("SETINPUT List of free events %d \n",fListOfFreeEvents.size()); // to be done, expand allocated
printf("SETINPUT List of free events %zu \n",fListOfFreeEvents.size()); // to be done, expand allocated
#endif
UShort_t uid = fMap.toUID[CCrate][CBoard][CCell];
......@@ -636,7 +636,7 @@ UInt_t NOMADBuilder::Process()
if ( !( tot_nb_coinc == nb_to_treat ) ) {
#ifdef LOCAL_DEBUG
printf(" Event re-injected STOP @ %d size %d \n ",stop_jj,fTwiceCoincWindowWidth);
printf(" Event re-injected STOP @ %zu size %d \n ",stop_jj,fTwiceCoincWindowWidth);
#endif
for (size_t jj = stop_jj ; jj < fTwiceCoincWindowWidth; jj++) {
if ( fCoincBuilderEvent[jj].size() == 0 ) {
......@@ -677,7 +677,7 @@ UInt_t NOMADBuilder::Process()
bb += fRoughArrayOfSliding[i_ev]->size();
}
}
printf("BIlan %d %d ",bb,fNbEventsInSlicing);;
printf("BIlan %zu %d ",bb,fNbEventsInSlicing);;
#endif
// move event @ the end to the beginning and in case the pending and redefine sliding window
......
......@@ -39,20 +39,33 @@ ReadMezzAFP::ReadMezzAFP():
fSourceOfFrames(aMByte,ConfAgent::kRead),
fPath("./"),
fBaseForName("AFP_"),
fCurrentFile(0x0),
fCurrentFile(NULL),
fCurrentFileNumber(0u),
fMaxSize(kMaxInt_t),
fConfMode(-1),
fListOfFile(),
NewCrystal(false),
fEndOfFrame("EndOfFrame"),
crystal_id(0),
crystal_status(0),
evnumber(0),
timestamp(0),
FirstTimeStamp(0),
LastTimeStamp(0),
fTraceLengthRaw(0),
segMezz(NULL),
coreMezz(NULL),
fFrameCrystal_Out(NULL),
fTrigger("data:crystal"),
fdebug(false),
fBashColor(new BashColor()),
fKeyFilterFile(NULL),
fUseKeyFilter(false),
fLastKeyIsRead(false),
fKeyToLink(NULL),
fKeyFilterBuffer(NULL),
fNextEvtNbr(0),
fNextTS(0),
fNEvts(0),
fNIgnoredEvts(0),
fBitFlipMezzLength(0),
......@@ -63,7 +76,7 @@ ReadMezzAFP::ReadMezzAFP():
TotalEntryFileSize(0),
ReadEntryFileSize(0),
LastReadEntryFileSize(0)
{
{
if(fdebug) std::cout<<"\E[31;1m"<<"Construct in"<<"\E[m"<<std::endl;
Log.GetProcessName() = "ReadMezzAFP"; GetFrameIO().SetName("ReadMezzAFP");
......@@ -77,11 +90,24 @@ ReadMezzAFP::ReadMezzAFP():
GetFrameIO().Attach(&fSourceOfFrames,0x0);
fListOfFile.clear();
for(int nn = 0; nn < kNSG; nn++ ) {
SegmentTraces[nn] = 0x0;
SegE[nn] = 0x0;
SegStatus[nn] = 0x0;
SegID[nn] = 0x0;
}
for(int nn = 0; nn < kNCC; nn++ ) {
CoreTraces[nn] = 0x0;
CoreE[nn] = 0x0;
CoreStatus[nn] = 0x0;
CoreID[nn] = 0x0;
}
if(fdebug) std::cout<<"\E[31;1m"<<"Construct out"<<"\E[m"<<std::endl;
}
ReadMezzAFP::~ReadMezzAFP()
{
{
// in principle not needed ... just in case reset it has not been called by narval
unsigned int error = 0u; process_reset(&error) ;
......@@ -89,10 +115,10 @@ ReadMezzAFP::~ReadMezzAFP()
delete [] SegmentTraces[nn];
for(int nn = 0; nn < kNCC; nn++ )
delete [] CoreTraces[nn];
}
}
bool ReadMezzAFP::NewFile()
{
{
Log.SetProcessMethod("NewFile");
bool ok = false;
NewCrystal = false;
......@@ -181,7 +207,7 @@ bool ReadMezzAFP::NewFile()
}
void ReadMezzAFP::process_config (const char *directory_path, unsigned int *error_code)
{
{
// first init narval and ADF stuff (if required)
NarvalInterface::process_config(directory_path,error_code);
......@@ -190,7 +216,7 @@ void ReadMezzAFP::process_config (const char *directory_path, unsigned int *erro
}
unsigned int ReadMezzAFP::ProcessBlock(ADF::FrameBlock &out)
{
{
if(fdebug) std::cout<<"\E[31;1m"<<"ProcessBlock in"<<"\E[m"<<std::endl;
// attach the input/output buffer to the FrameIO system
......@@ -310,7 +336,7 @@ unsigned int ReadMezzAFP::ProcessBlock(ADF::FrameBlock &out)
if ( GetFrameIO().GetStatus() == BaseFrameIO::kFinished || fLastKeyIsRead)
return 1u;
else return 0u;
}
}
void ReadMezzAFP::process_initialise (unsigned int *error_code)
{
......@@ -856,6 +882,8 @@ int ReadMezzAFP::ReadEvent()
ID = i;
int Status = 0;
int ener32 = dbuffer[2];
ener32 = (ener32 << 16) | dbuffer[1];
......@@ -867,54 +895,54 @@ int ReadMezzAFP::ReadEvent()
std::cout<<"SlotId = "<<SlotId<<std::endl;
std::cout<<"ID = "<<ID<<std::endl;
}
else {
float Ener = float(ener32)/(1<<16);
int Status = dbuffer[3];
int CompType = dbuffer[6];
int CompTraceLen = dbuffer[7];
if(SlotId==1 && (ID==0 || ID==1))
{
CoreE[ID] = Ener;
CoreStatus[ID] = Status;
CoreID[ID] = ID;
}
else if(SlotId==1) {;}
else
{
SegE[SegId] = Ener;
SegStatus[SegId] = Status;
SegID[SegId] = SegId;
}
float Ener = float(ener32)/(1<<16);
Status = dbuffer[3];
int CompType = dbuffer[6];
int CompTraceLen = dbuffer[7];
if(fdebug)
{
if(SlotId==1 && !(ID==0 || ID==1)) break;
if(SlotId==1 && (ID==0 || ID==1))
{
CoreE[ID] = Ener;
CoreStatus[ID] = Status;
CoreID[ID] = ID;
}
else if(SlotId==1) {;}
else
{
SegE[SegId] = Ener;
SegStatus[SegId] = Status;
SegID[SegId] = SegId;
}
fBashColor->SetInfoOut();
std::cout<<std::endl;
if(SlotId!=1)
if(fdebug)
{
std::cout<<"trace ID = "<<ID<<std::endl;
std::cout<<"Seg ID = "<<SegId<<std::endl;
if(SlotId==1 && !(ID==0 || ID==1)) break;
fBashColor->SetInfoOut();
std::cout<<std::endl;
if(SlotId!=1)
{
std::cout<<"trace ID = "<<ID<<std::endl;
std::cout<<"Seg ID = "<<SegId<<std::endl;
}
else std::cout<<"core ID = "<<ID<<std::endl;
std::cout<<"Ener = "<<Ener<<std::endl;
std::cout<<"Status = "<<Status<<std::endl;
std::cout<<"CompType = "<<CompType<<std::endl;
std::cout<<"CompTraceLen = "<<CompTraceLen<<std::endl;
std::cout<<std::endl;
fBashColor->ResetColor();
}
else std::cout<<"core ID = "<<ID<<std::endl;
std::cout<<"Ener = "<<Ener<<std::endl;
std::cout<<"Status = "<<Status<<std::endl;
std::cout<<"CompType = "<<CompType<<std::endl;
std::cout<<"CompTraceLen = "<<CompTraceLen<<std::endl;
std::cout<<std::endl;
fBashColor->ResetColor();
}
dbuffer += mezzanineChanHeader;
PosInBuff += mezzanineChanHeader;
unsigned short tmp16;
for(unsigned int j=0 ; j<fTraceLengthRaw ; j++)
{
tmp16 = dbuffer[j];
unsigned short tmp16 = dbuffer[j];
tmp16 &= 0x3FFF; // keep 14 bits
tmp16 ^= 0x2000; // reverse highest ADC bit
// tmp16 = 0x3FFF - tmp16; // change sign
......
......@@ -30,7 +30,7 @@ GammaFilter::GammaFilter() : BaseFilter()
GammaFilter::GammaFilter(Axis_t xmin, Axis_t xmax, Float_t eff, Float_t PT, Float_t dop)
{
Axis_t lxmin, lxmax;
fCompton = fEfficiency = fDoppler = NULL;
fComptonShape = NULL;
// check without saying anything
lxmin = xmin; lxmax = xmax;
......
......@@ -21,34 +21,23 @@ MESSAGE("[GW] + root/gui/${PROJECT_NAME}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -pthread -Wno-unused-parameter -Wno-sign-compare" )
#Set ROOT
set (ROOT_FIND_COMPONENTS Core MathCore Hist Gui Gpad Graf RIO Matrix Physics Thread MultiProc Spectrum)
find_file(ROOT_CONFIG ROOTConfig.cmake HINTS $ENV{ROOTSYS} ${ROOTSYS} ${ROOT_DIR} NO_DEFAULT_PATH PATH_SUFFIXES cmake)
if (ROOT_CONFIG)
include(${ROOT_CONFIG})
include(${ROOT_USE_FILE})
if(ROOT_LIBRARIES AND ROOT_INCLUDE_DIRS)
set(ROOT_FOUND TRUE)
endif()
else()
message(STATUS "ROOTConfig.cmake not found, trying to use FindROOT.cmake...")
find_package(ROOT REQUIRED COMPONENTS Core MathCore Hist Gui Gpad Graf RIO Matrix Physics Thread MultiProc Spectrum)
INCLUDE_DIRECTORIES( ${ROOT_INCLUDE_DIR} )
LINK_DIRECTORIES( ${ROOT_LIBRARY_DIR} )
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ROOT_CXX_FLAGS}" )
endif()
if(ROOT_FOUND)
include_directories(${ROOT_INCLUDE_DIRS})
else()
message(ERROR ": ROOT not found !!!")
endif()
#set (ROOT_FIND_COMPONENTS Core MathCore Hist Gui Gpad Graf RIO Matrix Physics Thread MultiProc Spectrum)
# find_file(ROOT_CONFIG ROOTConfig.cmake HINTS $ENV{ROOTSYS} ${ROOTSYS} ${ROOT_DIR} NO_DEFAULT_PATH PATH_SUFFIXES cmake)
#if (ROOT_CONFIG)
# include(${ROOT_CONFIG})
# include(${ROOT_USE_FILE})
# if(ROOT_LIBRARIES AND ROOT_INCLUDE_DIRS)
# set(ROOT_FOUND TRUE)
# endif()
######################
### Link libraries ###
######################
# root
INCLUDE_DIRECTORIES( ${ROOT_INCLUDE_DIR} )
LINK_DIRECTORIES( ${ROOT_LIBRARY_DIR} )
SET(EXTRA_EXTERNAL_LIBRARIES ${EXTRA_EXTERNAL_LIBRARIES} Core MathCore Hist Gui Gpad Graf RIO Matrix Physics Thread MultiProc Spectrum)
# gw
......@@ -76,7 +65,7 @@ file(GLOB database ${CMAKE_CURRENT_SOURCE_DIR}/DataBase)
### Root dictionary ###
#######################
ROOT_GENERATE_DICTIONARY(G__${Lib_NAME} ${headers} LINKDEF ${SourceDir}/LinkDef.h )
ROOT_GENERATE_DICTIONARY(G__${Lib_NAME} ${headers} MODULE ${Lib_NAME} LINKDEF ${SourceDir}/LinkDef.h )
#####################
### Cubix Library ###
......
......@@ -22,17 +22,6 @@
#include "CXBashColor.h"
CXBashColor::CXBashColor()
{
fColor = "";
fType = "0;3";
}
CXBashColor::~CXBashColor()
{
}
void CXBashColor::SetType(bType type)
{
switch (type) {
......
......@@ -59,11 +59,11 @@ public:
};
public:
CXBashColor();
virtual ~CXBashColor();
CXBashColor(){;}
virtual ~CXBashColor(){;}
std::string fColor;
std::string fType;
std::string fColor = "";
std::string fType = "0;3";
void SetType(bType type);
void SetColor(BColor col);
......
......@@ -861,7 +861,7 @@ Bool_t CXCanvas::HandleKey(Int_t px, Int_t py)
// Info("HandleKey","key pressed : %d %d",px,py);
TObject* obj = 0;
TObject* obj = nullptr;
TIter next(GetListOfPrimitives());
if (!fEnabledShortcuts) return kTRUE;
......@@ -993,7 +993,6 @@ Bool_t CXCanvas::HandleKey(Int_t px, Int_t py)
gPad->Modified();
gPad->Update();
} else if (fSelected->InheritsFrom("TH1")) {
TObject* obj = 0;
TIter it(((TH1*)fSelected)->GetListOfFunctions());
while ((obj = it())) {
((TF1*)obj)->SetNpx(((TF1*)obj)->GetNpx() + 50);
......@@ -1018,7 +1017,6 @@ Bool_t CXCanvas::HandleKey(Int_t px, Int_t py)
Modified();
Update();
} else if (fSelected->InheritsFrom("TH1")) {
TObject* obj = 0;
TIter it(((TH1*)fSelected)->GetListOfFunctions());
while ((obj = it()))((TF1*)obj)->SetNpx(((TF1*)obj)->GetNpx() - 50);
Modified();
......
This diff is collapsed.
......@@ -216,13 +216,9 @@ void CXHist2DPlayer::AddToStoredList(TObject *o){
void CXHist2DPlayer::UpdateStoredList(){
fStoredSpectraBox->RemoveAll();
TGTextLBEntry *entry;
for(int i=0 ; i<fListOfStoredSpectra->GetEntries() ; i++){
entry = new TGTextLBEntry(fStoredSpectraBox->GetContainer(), new TGString(fListOfStoredSpectra->At(i)->GetName()), fStoredSpectraBox->GetNumberOfEntries()+1);
TGTextLBEntry *entry = new TGTextLBEntry(fStoredSpectraBox->GetContainer(), new TGString(fListOfStoredSpectra->At(i)->GetName()), fStoredSpectraBox->GetNumberOfEntries()+1);
entry->SetBackgroundColor((Pixel_t)0x90f269);
fStoredSpectraBox->AddEntry((TGLBEntry *)entry, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsExpandX));
}
......
......@@ -55,7 +55,7 @@ CXLevelSchemePlayer::CXLevelSchemePlayer(const char* name, const char *title) :
gSystem->mkdir(fENSDFDataDir.Data(),kTRUE);
TSystemDirectory dir(fENSDFDataDir,fENSDFDataDir);
if(dir.GetListOfFiles() == nullptr || (dir.GetListOfFiles() != nullptr && dir.GetListOfFiles()->GetEntries()<=2) ){
if(dir.GetListOfFiles() == nullptr || dir.GetListOfFiles()->GetEntries()<=2 ){
TString temp = Form("%s/DataBase/LevelScheme/README",getenv("GWSYS"));
fBashColor->InfoMessage(Form("No ENSDF data found in %s, follow the procedure explained in %s to download the data from the ENSDF web site",fENSDFDataDir.Data(),temp.Data()));
}
......
......@@ -47,7 +47,7 @@ private:
Float_t fMinLifeTime;
Float_t fMaxLifeTime;
TH1 *fCurrentHist;
TH1 *fCurrentHist = nullptr;
Color_t fColorWheel[48];
......
......@@ -124,6 +124,7 @@ BaseLSPlayer::BaseLSPlayer(LevelScheme* levelScheme) :
fIsOnAxis(true),
fIsTipsOn(true),
fIsLSSelected(false),
fContextMenu(NULL),
fCColorSelectedLink(BasePeak::gGateColor.k0),
fPositionLabels(0.),
fLog("BaseLSPlayer")
......
......@@ -40,6 +40,7 @@ CSFilter::CSFilter()
: TNamed(),
fCondition(1),
fDimension(1),
fPeakList(NULL),
fLog("CSFilter")
{
// default constructor
......
......@@ -130,7 +130,8 @@ using namespace Gw;
GLSPlayer:: GLSPlayer(LevelScheme* levelScheme) :
BaseLSPlayer(levelScheme),
fCSManager(new CSManager(Form("%s_%s", "CSManager", levelScheme->GetName()),
Form("%s %s", "CS Manager for", levelScheme->GetName())))
Form("%s %s", "CS Manager for", levelScheme->GetName()))),
fCSDefaultName(NULL)
{
fLog.GetProcessName() = "GLSPlayer";
SetName("GLSPlayer");
......
......@@ -316,8 +316,10 @@ Peak1D::Peak1D(const Peak1D& p) : BasePeak(p),
fSubPeakIntegral(p.fSubPeakIntegral),
fBkgFlag(p.fBkgFlag),
fBinWidth(p.fBkgFlag),
fCPolyline(0x0),
fDrawAs(p.fDrawAs),
fIsAGammaSourceRay(p.fIsAGammaSourceRay),
fGammaSourceRay(0x0),
fLog("Peak1D"),
fEfficiencyGraph(p.fEfficiencyGraph),
fEfficiencyFunc(p.fEfficiencyFunc),
......
......@@ -524,7 +524,7 @@ void AgataEventDisplay::UpdateElements()
AgataHitDisplay* quadHits = static_cast<AgataHitDisplay*> (fQuadHitList->At(i));
AgataTrackDisplay* lineTracks = static_cast<AgataTrackDisplay*> (fLineTrackList->At(i));
if (!fGUIFlag || (fGUIFlag && fRefreshButton->IsOn())) {
if (!fGUIFlag || fRefreshButton->IsOn()) {
quadHits->ResetHits();
lineTracks->ResetTracks();
}
......
......@@ -51,6 +51,7 @@ BaseEventDisplay::BaseEventDisplay()
fCurrentEventId(0),
fFirstEventDone(false),
fMaxEnergy(4000),
fTopVolume(NULL),
fLog("BaseEventDisplay")
{
// default constructor
......
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