Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
fb9258d
Enabling the access of the triggers list in method DecodeNextEvent in…
zelbitar Jun 9, 2021
941ef47
Pixels are not considered for acquisitions with different number of f…
zelbitar Jun 9, 2021
a05c4ab
Decode trigger frame
zelbitar Jun 13, 2021
3d4e36a
Truncated acquisitions pixels are not considered > Two parameters wer…
zelbitar Jun 14, 2021
40a33dc
use of fDebugLevel reactivated in some part of BoardReaderMIMOSIS
zelbitar Jun 14, 2021
fcbf373
some cleaning
zelbitar Jun 14, 2021
f6f97df
fTriggerOffset and fFramesPerTrigger are considered only if TriggerMo…
zelbitar Jun 15, 2021
9d2191a
fTriggerOffset and fFramesPerTrigger initialiazed
zelbitar Jun 15, 2021
a132561
DecodeFrame returns void
zelbitar Jun 18, 2021
c70dcc2
Uncommment the #define gTAF MimosaAnalysis::Instance() at the end of …
zelbitar Jun 22, 2021
a8e6a23
DSFProduction can be passed as argument in the command -> for nohup u…
zelbitar Jun 25, 2021
139faa5
Writing status statistics on standard output
zelbitar Sep 28, 2021
56dc5fd
Test to modify the output related to efficiency
zelbitar Sep 28, 2021
7e24cdf
toto
zelbitar Sep 28, 2021
68a7388
Merge branch 'mimosis' of https://github.com/zelbitar/taf into mimosis
zelbitar Sep 28, 2021
bd2a3be
Printing out the status Event to check efficiency values
zelbitar Sep 28, 2021
310eb97
Test Printing 2
zelbitar Sep 28, 2021
18a245b
Print out the information in &Hit class
zelbitar Sep 29, 2021
b432707
Transparent planes are now associated for events although no hits are…
zelbitar Oct 1, 2021
5d95bc1
Transparent planes are now associated for events although no hits are…
zelbitar Oct 1, 2021
6561c99
Test on MimosaDebug reset
zelbitar Oct 7, 2021
eb435e6
End of run variable set correctly in BoardReaderMimosis.cpp
zelbitar Oct 16, 2021
e552754
FramesMerging enabled
zelbitar Nov 22, 2021
faf5579
Fixed bugs in Merging Frame Mode in Class BoardReaderMIMOSIS line1539…
zelbitar Nov 25, 2021
2ad202e
BoardReaderMIMOSIS updated for Mimosis21
zelbitar Jul 9, 2024
64f2b92
Updated mimo_daq_lib for Mimosis21
zelbitar Jul 9, 2024
caa5348
Updated MCommands.cxx and MMain.cxx for Mimosis21
zelbitar Jul 9, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified .DS_Store
Binary file not shown.
Binary file added code/include/.DS_Store
Binary file not shown.
30 changes: 20 additions & 10 deletions code/include/BoardReaderMIMOSIS.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,20 +44,30 @@ class BoardReaderMIMOSIS : public TObject {
int fRunNumber;
int fNSensors;
int fTriggerMode;
int fTriggerOffset;
int fFramesPerTrigger;
int fMergingFrameMode;
int fFramesToMerge;
int fNbMergedFrame;
int fEventBuildingMode;
bool fVetoOverflow;
int fEndianness; // 0= do not swap bytes, 1= swap bytes

int fSizeOfHeader;
int fSizeOfTrailer;
std::ifstream fRawFileStream;
std::vector<string> fListInputFileNames;
size_t fCurrentFileNumber;
bool fNoMoreFile;
bool fisfirstAcq;
bool fisAcqSafe; // Boolean variable to test whether the acquisition is safe (i.e not truncated)
// Acquisition is truncated if the number of frames/Acq is not the same
// in all the sensors for a giving acquisition.

int fnbFrPerAcq;
int fnbTrg;
int fendTrg;

int fCurrentTriggerNumber;
int fFramesCounterInTrigger;
int fCurrentEventNumber;

int fReachEndOfRun;
Expand All @@ -67,6 +77,8 @@ class BoardReaderMIMOSIS : public TObject {
int fTriggerCount;
int fFrameCount;
int fBadDecFrameCounter ; // ZE 2021/06/04 - Counter for bad decoded frames
int fTruncatedAcqCounter ; // ZE 2021/06/09 - Counter for Truncated Acquistions (risky)
int *NbFiredPixPerFrame; // ZE 2021/10/10 - Number of fired pixels per frame "cumulated"
int fNEventsWithOverflow;
BoardReaderEvent *fCurrentEvent;

Expand All @@ -81,26 +93,24 @@ class BoardReaderMIMOSIS : public TObject {
std::vector<int> fListOfNextTimestamps; // JB 2012/05/04


bool LookUpRawFile();
bool CloseRawFile();
bool OpenRawFile();
bool DecodeNextEvent();
bool DecodeFrame();
void DecodeFrame();
bool isAcqSafe();


// bool DecodeFrame(MIS1__BT_FBtAcqW16AAlloc*, MIS1__TBtAcqRawRec*, int moduleID, int frameID,
// UInt8 MeasExecTime, UInt8 PrintLvl); // ZE 2021/06/02
void AddPixel( int iSensor, int value, int aLine, int aColumn, int aTime=0);

// ==> PROBABLY MORE PRIVATE METHODS are needed <==

public:

int test();
BoardReaderMIMOSIS(int boardNumber, char *dataPath, int runNumber, int nSensors=1, int triggerMode=0, int eventBuildingMode=0, int headerSize=0, int trailerSize=0, int endianness=0);
// BoardReaderMIMOSIS(int boardNumber, int runNumber, int nSensors=1, int triggerMode=0, int eventBuildingMode=0, int headerSize=0, int trailerSize=0, int endianness=0);
// BoardReaderMIMOSIS(int boardNumber, char *dataPath, int runNumber, int nSensors=1, int triggerMode=0, int triggeroffset=0, int framesPerTrigger = 1, int mergingFrameMode = 0, int framesToMerge = 1, int eventBuildingMode=0, int endianness=0);
BoardReaderMIMOSIS(int boardNumber, char *dataPath, int runNumber, int nSensors=1, int triggerMode=0, int triggeroffset=0, int framesPerTrigger = 1, int framesToMerge = 1, int eventBuildingMode=0, int endianness=0);
~BoardReaderMIMOSIS();

void SetDebugLevel( int aLevel) { fDebugLevel = aLevel; cout << "BoardReaderMIMOSIS " << fBoardNumber << " debug updated to " << fDebugLevel << endl; }
bool AddFileList(std::string prefixFileName, int startIndex, int endIndex, std::string suffixFileName);
void SetVetoPixel( int noiseRun=0);
bool HasData();
void SkipNextEvent();
Expand Down
3 changes: 2 additions & 1 deletion code/include/DEvent.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Author: Dirk Meier 98/02/18
// Last Modified, AP 2015/05/22, DEvent class: Changed Short_t by Int_t
// fAHitsN,fT1PlanesN,fAPlanesN

// Last Modified, ZE, AddTransparentPlane with no hits
#ifndef _DEvent_included_
#define _DEvent_included_

Expand Down Expand Up @@ -104,6 +104,7 @@ class DEvent : public TObject {
void SetTimeInterval(const Int_t aDeltaTime);
void AddAuthenticPlane(DPlane& aPlane, Int_t aNEvent);
void AddTransparentPlane(DPlane& aPlane, DTrack& aTrack, DHit& aHit, Bool_t hitAssociated, DTracker &aTracker); // modified JB 2014/12/18, 2014/08/29
void AddTransparentPlane(DPlane& aPlane, DTrack& aTrack, DTracker &aTracker); // modified ZE 2021/09/28
void AddAuthenticHit(DHit& aHit, Int_t aNEvent, DTrack& aTrack);
DEventHeader& GetHeader() { return fHeader; }
TClonesArray *GetAuthenticHits() { return fAHits; }
Expand Down
4 changes: 4 additions & 0 deletions code/include/DSetup.h
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,10 @@ class DSetup : public TObject {
// e.g. a Sirocco of Type A, B, or LBL-Pixel device
Int_t BinaryCoding; // 0 for BigEndian, 1 for LittleEndian
Int_t TriggerMode; // Expect a Trigger (1) or not (0) to separate event, JB 2010/08/23
Int_t TriggerOffset; // Offset in number of frames from trigger id, ZE 2021/06/14
Int_t FramesPerTrigger; // Number of frames to be considered starting from Trigger Offset
Int_t MergingFrameMode; // Activated = 1; Desactivated = 0
Int_t FramesToMerge; // Number of Frames to Merge per Event
Int_t EventBuildingMode; // SS 2011.11.14
Char_t TimeRefFile[100]; // JB 2018/02/11
Int_t IfExternalTimeRef;
Expand Down
2 changes: 1 addition & 1 deletion code/include/MAnalysis.h
Original file line number Diff line number Diff line change
Expand Up @@ -883,7 +883,7 @@ class MimosaAnalysis : public MHist {


#ifndef MAC
//#define gTAF MimosaAnalysis::Instance() // to comment for MAC
#define gTAF MimosaAnalysis::Instance() // to comment for MAC
#endif


Expand Down
Binary file modified code/include/mimo_daq_lib/.DS_Store
Binary file not shown.
55 changes: 55 additions & 0 deletions code/include/mimo_daq_lib/c4pi_test_team.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@
// Macro definition
// -----------------------------------------------------------------------

#define WAIT_CR(Msg) { printf ( "Press ENTER key to continue : %s \n", Msg ); while ( getchar() != '\n' ); }

#define WAIT_CR_TO_QUIT { printf ( "Press ENTER key to quit \n" ); while ( getchar() != '\n' ); printf ( "will exit SW, please wait ... \n"); }


// -----------------------------------------------------------------------
Expand Down Expand Up @@ -116,6 +118,59 @@ typedef extended Real80;
*/



/**
===================================================================================
* \union UInt16Bits
*
* \brief UInt16 data type for bit access => .W16 = word access, .B.bx = bit access
*
* Longer C union explanation
* ...
* ...
* ...
* can take many lines
*
* G.CLAUS 25/04/2023
*
===================================================================================
*/


#ifndef UInt16Bits

typedef union {

UInt16 w16; /*!< Full word, access via w16 */


struct
{
UInt16 b0 : 1; /*!< Bit0, access via b.b0 */
UInt16 b1 : 1; /*!< Bit1, access via b.b1 */
UInt16 b2 : 1; /*!< Bit2, access via b.b2 */
UInt16 b3 : 1; /*!< Bit3, access via b.b3 */
UInt16 b4 : 1; /*!< Bit4, access via b.b4 */
UInt16 b5 : 1; /*!< Bit5, access via b.b5 */
UInt16 b6 : 1; /*!< Bit6, access via b.b6 */
UInt16 b7 : 1; /*!< Bit7, access via b.b7 */
UInt16 b8 : 1; /*!< Bit0, access via b.b8 */
UInt16 b9 : 1; /*!< Bit1, access via b.b9 */
UInt16 b10 : 1; /*!< Bit2, access via b.b10 */
UInt16 b11 : 1; /*!< Bit3, access via b.b11 */
UInt16 b12 : 1; /*!< Bit4, access via b.b12 */
UInt16 b13 : 1; /*!< Bit5, access via b.b13 */
UInt16 b14 : 1; /*!< Bit6, access via b.b14 */
UInt16 b15 : 1; /*!< Bit7, access via b.b15 */
} b;


} UInt16Bits;


#endif


/* Pointeurs */

typedef char* TPChar;
Expand Down
166 changes: 166 additions & 0 deletions code/include/mimo_daq_lib/c4pi_test_team__before_msis2_upgrade.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@

/**
* ----------------------------------------------------------------------------------
* \file X:\prj\win\mimosis_1\run_read_light_bt\com\c4pi_test_team.h
* \brief Goal : C4Pi test team C source definitions : Constants, types, functins proto, ...
* \brief
* \brief
* \version : 1.0
* \date Prj date : 12/05/2021
* \date File date : 12/05/2021
* \date Doc date : 12/05/2021
* \author : Gilles CLAUS
* \author : gilles.claus@iphc.cnrs.fr
* \author : CNRS - IN2P3 - IPHC 23 Rue du Loess 67037 STRASBOURG
*
* Remark : None
*
* ----------------------------------------------------------------------------------
* License : GNU General Public License
*
* ----------------------------------------------------------------------------------
*/


#ifndef C4PI_TEST_TEAM_H
#define C4PI_TEST_TEAM_H


#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>


// -----------------------------------------------------------------------
// Compilation directives
// -----------------------------------------------------------------------

#define CC_MSIS1_BDF_LIGHT


// -----------------------------------------------------------------------
// Macro definition
// -----------------------------------------------------------------------




// -----------------------------------------------------------------------
// Types definition
// -----------------------------------------------------------------------


#ifndef UInt8
typedef uint8_t UInt8;
#endif

#ifndef UByte
typedef uint8_t UByte;
#endif

#ifndef SInt8
typedef int8_t SInt8;
#endif

#ifndef SByte
typedef int8_t SByte;
#endif

#ifndef UInt16
typedef uint16_t UInt16;
#endif

#ifndef UWord
typedef uint16_t UWord;
#endif

#ifndef SInt16
typedef int16_t SInt16;
#endif

#ifndef SWord
typedef int16_t SWord;
#endif

#ifndef UInt32
typedef uint32_t UInt32;
#endif

#ifndef ULong
typedef uint32_t ULong;
#endif

#ifndef SInt32
typedef int32_t SInt32;
#endif

#ifndef SLong
typedef int32_t SLong;
#endif


#ifndef UInt64
typedef uint64_t UInt64;
#endif

#ifndef SInt64
typedef int64_t SInt64;
#endif



/* ROOT !
typedef single Real32;
typedef double Real64;
typedef extended Real80;
*/


/* Pointeurs */

typedef char* TPChar;

typedef UInt8* TPUInt8;
typedef TPUInt8 TPUByte;

typedef SInt8* TPSInt8;
typedef TPSInt8 TPSByte;

typedef UInt16* TPUInt16;
typedef TPUInt16 TPUWord;

typedef SInt16* TPSInt16;
typedef TPSInt16 TPSWord;

typedef UInt32* TPUInt32;
typedef TPUInt32 TPULong;

typedef SInt32* TPSInt32;
typedef TPSInt32 TPSLong;

/* ROOT !
typedef Real32* TPReal32;
typedef Real64* TPReal64;
typedef Real80* TPReal80;
*/


typedef UInt16 TW128As8W16[8]; // Endianness is function of CC_TW128_LITTLE_ENDIAN

//
// If CC_TW128_LITTLE_ENDIAN IS defined
// => TW128As8W16, DECOM__TW128As8W16 are little endian
// => [0] = LS W16, [7] = MS W16
// => W128 = 0000 1111 2222 3333 4444 5555 6666 7777
// = > [7] = 0000, [6] = 1111, [5] = 2222, [4] = 3333, [3] = 4444, [2] = 5555, [1] = 6666, [0] = 7777
//
// If CC_TW128_LITTLE_ENDIAN IS NOT defined
// => TW128As8W16, DECOM__TW128As8W16 are big endian
// => [0] = MS W16, [7] = LS W16
// => W128 = 0000 1111 2222 3333 4444 5555 6666 7777
// = > [0] = 0000, [1] = 1111, [2] = 2222, [3] = 3333, [4] = 4444, [5] = 5555, [6] = 6666, [7] = 7777




#endif
Loading