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

GuiBuildTree: Add Diamant not builded tree

DIAMANTWatchers: Add Diamant not builded classes
DIAMANTWatchers: addd PID vs E hists
KeyWatchers: Correct a bug in strange timestamps



git-svn-id: svn+ssh://anonsvn.in2p3.fr/agata/gammaware/trunk@2254 c3abf467-7ff2-0310-b516-c5fb849bdde0
parent 9d44ddff
......@@ -25,6 +25,13 @@
#include "TGComboBox.h"
#include "TRegexp.h"
#ifdef WITH_MFM
#include "NEDAWatchers.h"
#include "DIAMANTWatchers.h"
#include "EventNEDAWatchers.h"
#include "EventDIAMANTWatchers.h"
#endif
using namespace std;
GuiBuildTree::GuiBuildTree(const TGWindow *p, UInt_t w, UInt_t h) :
......@@ -344,9 +351,16 @@ void GuiBuildTree::PrintConfig()
if(fUseDIAMANT)
{
if(fTriggerName.Contains("event:data:ranc1"))
PrintInListBox(fResumeBox,"DIAMANT data stored",kPrint);
{
PrintInListBox(fResumeBox,"Event DIAMANT data stored",kPrint);
fUseEventDIAMANT = true;
}
else
{
PrintInListBox(fResumeBox,"DIAMANT data stored ==> Trigger does not contain event:data:ranc1",kWarning);
PrintInListBox(fResumeBox,"DIAMANT data stored ==> DIAMANTTree will be used instead of EventDIAMANTTree",kWarning);
fUseEventDIAMANT = false;
}
}
else
PrintInListBox(fResumeBox,"No DIAMANT data",kError);
......@@ -506,7 +520,10 @@ void GuiBuildTree::ProcessRun(int RunIndex)
}
if(fUseDIAMANT)
{
rootmaster->Add<EventDIAMANTTree>("EVENT_DIAMANT","Event DIAMANT branch");
if(fUseEventDIAMANT)
rootmaster->Add<EventDIAMANTTree>("EVENT_DIAMANT","Event DIAMANT branch");
else
rootmaster->Add<DIAMANTTree>("DIAMANT","DIAMANT branch");
}
#endif
......
......@@ -34,12 +34,6 @@
#include "RootAFP.h"
#include "BashColor.h"
#ifdef WITH_MFM
#include "NEDAWatchers.h"
#include "EventNEDAWatchers.h"
#include "EventDIAMANTWatchers.h"
#endif
// root/system includes
#include "TRegexp.h"
#include "TSystem.h"
......@@ -138,6 +132,7 @@ class GuiBuildTree : public TGMainFrame
bool fUseNEDA;
bool fUseEventNEDA;
bool fUseDIAMANT;
bool fUseEventDIAMANT;
bool fUseVertexBuilder;
int fVAMOSMode;
bool fUseTracking;
......
......@@ -17,11 +17,14 @@
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#include "iomanip"
#include "DIAMANTWatchers.h"
#include "AgataKeyFactory.h"
#include "DFAgent.h"
#include "TH3.h"
#include "TH2.h"
#include "TH1.h"
......@@ -34,7 +37,7 @@ DIAMANTWatchers::DIAMANTWatchers(const char *name, const char *title, TDirector
fMFMFrame(new MFMDiamantFrame()),
fFrame(0x0)
{
memset(fStatPerBoard, 0, sizeof(UInt_t)*MaxDIAMANT*(MaxChannel+1));
}
Bool_t DIAMANTWatchers::SetTrigger( ADF::DFTrigger *trigger )
......@@ -43,7 +46,7 @@ Bool_t DIAMANTWatchers::SetTrigger( ADF::DFTrigger *trigger )
std::cout << "Cannot get data:ranc1, check your ADF.conf file " << std::endl;
return false;
}
return fFrame != 0x0;
}
......@@ -54,7 +57,7 @@ MFMDiamantFrame *DIAMANTWatchers::GetMFM()
return 0x0;
}
// return the data interface for that frame
fMFMFrame->SetAttributs(((ADF::RawFrame *)fFrame->GetFrame())->RawBuffer().Address());
return fMFMFrame;
}
......@@ -67,6 +70,20 @@ void DIAMANTWatchers::Exec(Option_t * /*option*/)
}
MFMDiamantFrame *mfmframe = GetMFM();
if ( mfmframe == 0x0 ){
std::cout << "BUG" << std::endl;
return;
}
fBoardID = 0;
fChannelID = 0;
fStatus1 = 0;
fStatus2 = 0;
fEnergy = 0;
fTop = 0;
fPID = 0.;
fADFTimestamp = ((AgataKey *)fFrame->GetFrame()->GetKey())->GetTimeStamp();
fMFMTimestamp = mfmframe->GetTimeStamp();
......@@ -74,6 +91,26 @@ void DIAMANTWatchers::Exec(Option_t * /*option*/)
fBoardID = mfmframe->GetBoardId();
fChannelID = mfmframe->GetTGCristalId();
fStatus1 = mfmframe->GetStatus(0);
fStatus2 = mfmframe->GetStatus(0);
fEnergy = mfmframe->GetEnergy()/512.;
fTop = mfmframe->GetTop()/64.;
if (fTop > 0 && fEnergy > 0)
fPID = 1.-fTop*1./fEnergy;
if(fBoardID>MaxDIAMANT)
{
fBashColor->SetWarningOut();
cout<<"WARNING : Board ID = "<<fBoardID<<" Change MaxDIAMANT ("<<MaxDIAMANT<<") in DIAMANTWatchers.h for correct histogramming "<<endl;
fBashColor->ResetColor(); }
if(fStatPerBoard[fBoardID].size() == 0)
{
vector< Int_t > avector(MaxChannel+1);
fStatPerBoard[fBoardID] = avector;
}
fStatPerBoard[fBoardID][MaxChannel]++;
fStatPerBoard[fBoardID][fChannelID]++;
fNEvts++;
......@@ -103,14 +140,18 @@ void DIAMANTWatchers::Print(const char * /* option */ ) const
std::cout<<"Number of treated events : "<<fNEvts<<std::endl;
cout<<"Stat per board (and \% per channel):"<<endl;
for(int ib=0 ; ib<MaxDIAMANT ; ib++)
for (auto& kv : fStatPerBoard)
{
if(fStatPerBoard[ib][MaxChannel]>0)
Int_t board = kv.first;
vector< Int_t > avector = kv.second;
if(avector[MaxChannel]>0)
{
cout<<"Board id "<<ib<<" : "<<fStatPerBoard[ib][MaxChannel]<<" (";
cout<<"Board id "<<Form("%3.1d",board)<<" : "<<Form("%9.3g",(Float_t)avector[MaxChannel])<<" (";
for(int ich=0 ; ich<MaxChannel-1 ; ich++)
cout<<Form("%5.1f ; ",(double)fStatPerBoard[ib][ich]/fStatPerBoard[ib][MaxChannel]*100.);
cout<<Form("%5.1f )",(double)fStatPerBoard[ib][MaxChannel-1]/fStatPerBoard[ib][MaxChannel]*100.)<<endl;
cout<<Form("%5.1f ; ",(double)avector[ich]/avector[MaxChannel]*100.);
cout<<Form("%5.1f )",(double)avector[MaxChannel-1]/avector[MaxChannel]*100.)<<endl;
}
}
......@@ -129,7 +170,56 @@ void DIAMANTSpectra::Exec(Option_t * /*option*/)
fBoardxChannel->Fill(fBoardID,fChannelID);
if(fMapOfPIDvsE[fBoardID*100+fChannelID] == nullptr)
{
fMapOfPIDvsE[fBoardID*100+fChannelID] = MakeTH2<TH2F>(Form("PIDvsE_B%d_Ch%d",fBoardID,fChannelID),Form("PIDvsE_B%d_Ch%d",fBoardID,fChannelID),500,0,1000.,500,0,1.);
}
fMapOfPIDvsE[fBoardID*100+fChannelID]->Fill(fEnergy,fPID);
}
DIAMANTTree::DIAMANTTree(const char *name, const char *title, TTree *tree) :
DIAMANTWatchers(name,title),
TTreeBuilder(name,title,tree)
{
if ( GetTree() ) { // just add the branch for that watcher
SetBranches();
}
// create spetra
}
DIAMANTTree::~DIAMANTTree()
{
}
void DIAMANTTree::SetBranches()
{
GetTree()->Branch("DIAMANTBoard", &fBoardID, "BoardId/s" );
GetTree()->Branch("DIAMANTChannel", &fChannelID, "ChannelId/s" );
GetTree()->Branch("Status1", &fStatus1, "Status1/I" );
GetTree()->Branch("Status2", &fStatus2, "Status2/I" );
GetTree()->Branch("Energy", &fEnergy, "Energy/F" );
GetTree()->Branch("Top", &fTop, "Top/F" );
GetTree()->Branch("PID", &fPID, "PID/F" );
GetTree()->Branch("TSDIAMANT", &fADFTimestamp, "TSDIAMANT/l" );
}
void DIAMANTTree::Exec(Option_t * /*option*/)
{
if ( fFrame == 0x0 || !fFrame->IsValid() ) {
SetLastExecStatus(1u);
return;
}
DIAMANTWatchers::Exec();
FillTree();
}
ClassImp(DIAMANTWatchers)
ClassImp(DIAMANTSpectra)
ClassImp(DIAMANTTree)
......@@ -21,6 +21,8 @@
#ifndef _DIAMANTWatchers
#define _DIAMANTWatchers
#include <map>
// Watcher definition
#include "Watchers.h"
#include "TTreeWatchers.h"
......@@ -32,14 +34,13 @@
// ROOT definitions
#include "Rtypes.h"
#include "TH1.h"
#include "TH2.h"
// MFM
#include "MFMDiamantFrame.h"
class TH1F;
class TH2F;
class TH3F;
using namespace ADF;
using namespace Gw;
......@@ -50,7 +51,7 @@ using namespace Gw;
class DIAMANTWatchers : public WatcherWithTag
{
protected:
static const Int_t MaxDIAMANT = 100;
static const Int_t MaxDIAMANT = 400;
static const Int_t MaxChannel = 16;
protected:
......@@ -74,8 +75,11 @@ protected:
Int_t fBoardID;
Int_t fChannelID;
UInt_t fStatus1, fStatus2;
Float_t fEnergy, fTop, fPID;
UInt_t fNEvts = 0;
UInt_t fStatPerBoard[MaxDIAMANT][MaxChannel+1];
map< Int_t, vector<Int_t> > fStatPerBoard;
public:
DIAMANTWatchers(const char *name, const char *title, TDirectory *sp_dir = 0x0, TDirectory *tag_dir = 0x0);
......@@ -85,7 +89,7 @@ public:
delete fMFMFrame;
fMFMFrame = 0x0;
}
//! Set the trigger attached to this watcher
/*!
look in the list of input Frame one called Agata data:tracked
......@@ -104,6 +108,7 @@ class DIAMANTSpectra : public DIAMANTWatchers
{
private:
TH1 *fBoardxChannel; //! Board versus channel
map< Int_t, TH1* > fMapOfPIDvsE;
public:
DIAMANTSpectra(const char *name, const char *title, TDirectory *sp_dir = 0x0, TDirectory *tag_dir = 0x0);
......@@ -116,7 +121,20 @@ public:
ClassDef(DIAMANTSpectra,0)
};
class DIAMANTTree : public DIAMANTWatchers, public TTreeBuilder
{
protected:
virtual void SetBranches();
public:
DIAMANTTree(const char *name, const char *title, TTree *tree = 0x0);
virtual ~DIAMANTTree();
//! watch the current frame
virtual void Exec(Option_t *option="");
ClassDef(DIAMANTTree,0) // built a root tree for the DIAMANT comp part
};
#endif
......@@ -151,8 +151,9 @@ void EventDIAMANTTree::SetBranches()
GetTree()->Branch("DIAMANT_Stat1" ,Status1, "DIAMANT_Stat1[nbDIAMANT]/I" );
GetTree()->Branch("DIAMANT_Stat2" ,Status2, "DIAMANT_Stat2[nbDIAMANT]/I" );
GetTree()->Branch("DIAMANT_E" ,Energy, "DIAMANT_E[nbDIAMANT]/I" );
GetTree()->Branch("DIAMANT_Top" ,Top, "DIAMANT_Top[nbDIAMANT]/I" );
GetTree()->Branch("DIAMANT_E" ,Energy, "DIAMANT_E[nbDIAMANT]/F" );
GetTree()->Branch("DIAMANT_Top" ,Top, "DIAMANT_Top[nbDIAMANT]/F" );
GetTree()->Branch("DIAMANT_PID" ,PID, "DIAMANT_PID[nbDIAMANT]/F" );
GetTree()->Branch("TSDIAMANT", &fTimestamp, "TSDIAMANT/l" );
}
......@@ -171,6 +172,7 @@ void EventDIAMANTTree::Exec(Option_t * /*option*/)
memset(Status2,0,sizeof(Int_t)*MaxDIAMANT);
memset(Energy ,0,sizeof(Int_t)*MaxDIAMANT);
memset(Top ,0,sizeof(Int_t)*MaxDIAMANT);
memset(PID ,0,sizeof(Float_t)*MaxDIAMANT);
fTimestamp = ((AgataKey *)fFrame->GetFrame()->GetKey())->GetTimeStamp();
......@@ -187,7 +189,7 @@ void EventDIAMANTTree::Exec(Option_t * /*option*/)
nbDIAMANT=0;
}
for(UInt_t i = 0u; i <nbDIAMANT; i++) {
for(Int_t i = 0u; i <nbDIAMANT; i++) {
MFMDiamantFrame *mfmframe = GetMFM(i);
if ( mfmframe == 0x0 ){
std::cout << "BUG" << std::endl;
......@@ -198,8 +200,11 @@ void EventDIAMANTTree::Exec(Option_t * /*option*/)
ChannelId[i] = mfmframe->GetTGCristalId() ;
Status1[i] = mfmframe->GetStatus(0);
Status2[i] = mfmframe->GetStatus(1);
Energy[i] = mfmframe->GetEnergy();
Top[i] = mfmframe->GetTop();
Energy[i] = mfmframe->GetEnergy()/512.;
Top[i] = mfmframe->GetTop()/64.;
if (Top[i] > 0 && Energy[i] > 0)
PID[i] = 1.-Top[i]*1./Energy[i];
}
FillTree();
......
......@@ -115,7 +115,8 @@ class EventDIAMANTTree : public EventDIAMANTWatchers, public TTreeBuilder
private:
Int_t nbDIAMANT; // Number of hits in the array
UShort_t BoardId[MaxDIAMANT], ChannelId[MaxDIAMANT];
UInt_t Status1[MaxDIAMANT], Status2[MaxDIAMANT], Energy[MaxDIAMANT], Top[MaxDIAMANT];
UInt_t Status1[MaxDIAMANT], Status2[MaxDIAMANT];
Float_t Energy[MaxDIAMANT], Top[MaxDIAMANT], PID[MaxDIAMANT];
ULong64_t fTimestamp;
protected:
......
......@@ -186,7 +186,7 @@ void EventNEDATree::Exec(Option_t * /*option*/)
nbNEDA = 0;
}
for(UInt_t i = 0u; i <nbNEDA; i++)
for(Int_t i = 0u; i <nbNEDA; i++)
{
MFMNedaCompFrame *mfmframe = GetMFM(i);
if ( mfmframe == 0x0 ){
......
......@@ -29,6 +29,7 @@ KeyWatcher::KeyWatcher( const char * name, const char * title, TDirectory *sp_di
fNRepeatedEvts(0),
fFrame(0x0),
fNNullTS(0),
fStrangeTS(0),
FirstTimeStamp(0),
FirstEventNumber(0),
LastTimeStamp(0),
......@@ -58,6 +59,9 @@ KeyWatcher::KeyWatcher( const char * name, const char * title, TDirectory *sp_di
fHistFold = MakeTH1<TH1I>("CrystalFold","CrystalFold",20,0,20);
fHistDTPSA = MakeTH1<TH1I>("TimeStampSpreadPSA","Time stamp spread in the event:data:psa frame",190,0,1900);
fHistTSSpreadAnc0 = MakeTH1<TH1I>("TimeStampSpreadAnc0","Time stamp spread in the event:data:ranc0 frame",190,0,1900);
fHistTSSpreadAnc1 = MakeTH1<TH1I>("TimeStampSpreadAnc1","Time stamp spread in the event:data:ranc1 frame",190,0,1900);
fHistDTPerCrystal = MakeTH2<TH2I>("TimeStampSpreadPerCrystal","Time stamp spread in the event:data:psa frame per crystal ID",50,0,50,190,0,1900);
fHistDTAnc0 = MakeTH1<TH1I>("TS_anc0-TS_agata","Time stamp spread in the event:data frame between agata and anc0",600,-3000,3000);
......@@ -187,11 +191,13 @@ void KeyWatcher::Exec(Option_t * /*option*/)
fNevts++;
if(MessageType=="conf:global" || MessageType=="meta:sync")
{
if(!fHistMessageType->GetXaxis()->FindBin(MessageType))
cout<<"WARNING ! Unknown message type : "<<MessageType<<endl;
else
fHistMessageType->Fill(MessageType,1);
if(MessageType=="conf:global" || MessageType=="meta:sync" || MessageType=="UnknownKey")
{
fHistInSecMetaSync->Fill(fLastFillSec,10);
fHistInMinMetaSync->Fill(fLastFillMin,10./60.);
fHistInHMetaSync->Fill(fLastFillH,10./3600.);
......@@ -209,8 +215,6 @@ void KeyWatcher::Exec(Option_t * /*option*/)
return;
}
// cout<<fTimestamp<<endl;
if(FirstTimeStamp==0)
{
TTask *FD = ((TTask*)gROOT->GetListOfTasks()->FindObject("FD"));
......@@ -247,24 +251,28 @@ void KeyWatcher::Exec(Option_t * /*option*/)
double TSinH = fmod((fTimestamp-FirstTimeStamp)*10*1e-9/3600.,48);
if(LastTimeStamp!=0 && TMath::Abs(((double)fTimestamp-(double)LastTimeStamp)*10*1e-9 > 3600.))
if(LastTimeStamp!=0 && TMath::Abs(((double)fTimestamp-(double)LastTimeStamp)*10*1e-9) > 3600.)
{
fStrangeTS++;
return;
}
if((fTimestamp-FirstTimeStamp)*10*1e-9 > NextCycleSec)
if(((double)fTimestamp-(double)FirstTimeStamp)*10*1e-9 > NextCycleSec)
{
fHistInSec->Reset();
fHistInSec0->Reset();
fHistInSecMetaSync->Reset();
NextCycleSec += 3600.;
}
if((fTimestamp-FirstTimeStamp)*10*1e-9/60. > NextCycleMin)
if(((double)fTimestamp-(double)FirstTimeStamp)*10*1e-9/60. > NextCycleMin)
{
fHistInMin->Reset();
fHistInMin0->Reset();
fHistInMinMetaSync->Reset();
NextCycleMin += 720.;
}
if((fTimestamp-FirstTimeStamp)*10*1e-9/3600. > NextCycleH)
if(((double)fTimestamp-(double)FirstTimeStamp)*10*1e-9/3600. > NextCycleH)
{
fHistInH->Reset();
fHistInH0->Reset();
......@@ -335,10 +343,6 @@ void KeyWatcher::Exec(Option_t * /*option*/)
if(IsDumpKeysActive) MainKey->GetRealBuffer()->Export(fDumpKeyFile,MainKey->GetKeyLength());
if(!fHistMessageType->GetXaxis()->FindBin(MessageType))
cout<<"WARNING ! Unknown message type : "<<MessageType<<endl;
else fHistMessageType->Fill(MessageType,1);
UInt_t length, current, eventnumber, message; ULong64_t timestamp; TString SubMess;
ADF::Frame *AgataFrame = fFrame->GetFrame();
......@@ -433,6 +437,16 @@ void KeyWatcher::Exec(Option_t * /*option*/)
TimeAGATAPC[crysal_id] = subtimestamp;
}
if(SubSubMess == "data:ranc0")
{
double DT = (subtimestamp-timestamp)*10;
fHistTSSpreadAnc0->Fill(DT);
}
if(SubSubMess == "data:ranc1")
{
double DT = (subtimestamp-timestamp)*10;
fHistTSSpreadAnc1->Fill(DT);
}
TotSubLenght += sublength;
......@@ -440,9 +454,9 @@ void KeyWatcher::Exec(Option_t * /*option*/)
subcurrent+=sublength;
}
if(MessageType=="event:data")
if(MessageType=="event:data" && SubMess == "event:data:psa")
{
TimeAGATA = timestamp;
TimeAGATA = subtimestamp;
IsAGATA = true;
}
}
......@@ -798,11 +812,12 @@ void KeyWatcher::Print(const char * /* option */ ) const
}
fBashColor->SetErrorOut();
if(fNNullTS>0) std::cout<<"Number of empty Timestamps : "<<fNNullTS<<std::endl;
if(fNBackwardTS>0) std::cout<<"Number of backward timestamps : "<<fNBackwardTS<<std::endl;
if(fNBackwardInBackwardTS>0) std::cout<<"Number of backward in backward timestamps : "<<fNBackwardInBackwardTS<<std::endl;
if(fNRepeatedEvts>0) std::cout<<"Number of repeated timestamps : "<<fNRepeatedEvts<<std::endl;
if(fNBackwardTS>0) std::cout<<"Mean number of repeated TS per backward : "<<(double)fNRepeatedEvts/(double)fNBackwardTS<<std::endl;
if(fNNullTS>0) std::cout<<"Number of empty Timestamps : "<<fNNullTS<<std::endl;
if(fStrangeTS>0) std::cout<<"Number of strange Timestamps (jump>1h in time) : "<<fStrangeTS<<std::endl;
if(fNBackwardTS>0) std::cout<<"Number of backward timestamps : "<<fNBackwardTS<<std::endl;
if(fNBackwardInBackwardTS>0) std::cout<<"Number of backward in backward timestamps : "<<fNBackwardInBackwardTS<<std::endl;
if(fNRepeatedEvts>0) std::cout<<"Number of repeated timestamps : "<<fNRepeatedEvts<<std::endl;
if(fNBackwardTS>0) std::cout<<"Mean number of repeated TS per backward : "<<(double)fNRepeatedEvts/(double)fNBackwardTS<<std::endl;
fBashColor->SetInfoOut();
std::cout<<std::endl;
......@@ -838,6 +853,7 @@ void KeyWatcher::ResetStats()
fHistInHMetaSync->Reset();
fNNullTS = 0;
fStrangeTS = 0;
fNBackwardTS = 0;
fNBackwardInBackwardTS = 0;
fNRepeatedEvts = 0;
......
......@@ -36,6 +36,8 @@ protected:
TH1F *fHistInH;
UInt_t fNNullTS;
UInt_t fStrangeTS;
TH1F *fHistInSec0;
TH1F *fHistInMin0;
TH1F *fHistInH0;
......@@ -51,6 +53,9 @@ protected:
TH1 *fHistMessageType;
TH1 *fHistFold;
TH1 *fHistDTPSA;
TH1 *fHistTSSpreadAnc0;
TH1 *fHistTSSpreadAnc1;
TH2 *fHistDTPerCrystal;
TH1 *fHistDTAnc0;
......
......@@ -36,7 +36,7 @@ NEDAWatchers::NEDAWatchers(const char *name, const char *title, TDirectory *sp_
fMFMFrame(new MFMNedaCompFrame()),
fFrame(0x0)
{
memset(fStatPerBoard, 0, sizeof(UInt_t)*MaxNEDA*(MaxChannel+1));
}
Bool_t NEDAWatchers::SetTrigger( ADF::DFTrigger *trigger )
......@@ -76,6 +76,20 @@ void NEDAWatchers::Exec(Option_t * /*option*/)
fBoardID = mfmframe->GetBoardId();
fChannelID = mfmframe->GetChannelId();
if(fBoardID>MaxNEDA)
{
fBashColor->SetWarningOut();
cout<<"WARNING : Board ID = "<<fBoardID<<" Change MaxNEDA ("<<MaxNEDA<<") in NEDAWatchers.h for correct histogramming "<<endl;
fBashColor->ResetColor();
}
if(fStatPerBoard[fBoardID].size() == 0)
{
vector< Int_t > avector(MaxChannel+1);
fStatPerBoard[fBoardID] = avector;
}
fStatPerBoard[fBoardID][MaxChannel]++;
fStatPerBoard[fBoardID][fChannelID]++;
fNEvts++;
......@@ -105,14 +119,18 @@ void NEDAWatchers::Print(const char * /* option */ ) const
std::cout<<"Number of treated events : "<<fNEvts<<std::endl;
cout<<"Stat per board (and \% per channel):"<<endl;
for(int ib=0 ; ib<MaxNEDA ; ib++)
for (auto& kv : fStatPerBoard)
{
if(fStatPerBoard[ib][MaxChannel]>0)
Int_t board = kv.first;
vector< Int_t > avector = kv.second;
if(avector[MaxChannel]>0)
{
cout<<"Board id "<<ib<<" : "<<fStatPerBoard[ib][MaxChannel]<<" (";
cout<<"Board id "<<board<<" : "<<avector[MaxChannel]<<" (";
for(int ich=0 ; ich<MaxChannel-1 ; ich++)
cout<<Form("%5.1f ; ",(double)fStatPerBoard[ib][ich]/fStatPerBoard[ib][MaxChannel]*100.);
cout<<Form("%5.1f )",(double)fStatPerBoard[ib][MaxChannel-1]/fStatPerBoard[ib][MaxChannel]*100.)<<endl;
cout<<Form("%5.1f ; ",(double)avector[ich]/avector[MaxChannel]*100.);
cout<<Form("%5.1f )",(double)avector[MaxChannel-1]/avector[MaxChannel]*100.)<<endl;
}
}
......