FEDRA emulsion software from the OPERA Collaboration
AcqStage1.cxx File Reference
#include "AcqStage1.h"
#include "TROOT.h"
#include "TSystem.h"
Include dependency graph for AcqStage1.cxx:

Functions

 ClassImp (AcqAxis)
 
 ClassImp (AcqLight)
 
 ClassImp (AcqStage1)
 
void ErrorHandler (i32 errorCode, u16 commandID, u16 resourceID)
 

Variables

AcqStage1gStage =0
 

Function Documentation

◆ ClassImp() [1/3]

ClassImp ( AcqAxis  )

◆ ClassImp() [2/3]

ClassImp ( AcqLight  )

◆ ClassImp() [3/3]

ClassImp ( AcqStage1  )

◆ ErrorHandler()

void ErrorHandler ( i32  errorCode,
u16  commandID,
u16  resourceID 
)
47 {
48
49 i8 *errorDescription; //Pointer to i8's - to get error description
50 u32 sizeOfArray; //Size of error description
51 u16 descriptionType; //The type of description to be printed
52 i32 status; //Error returned by function
53
54 if(commandID == 0){
55 descriptionType = NIMC_ERROR_ONLY;
56 }else{
57 descriptionType = NIMC_COMBINED_DESCRIPTION;
58 }
59
60 //First get the size for the error description
61 sizeOfArray = 0;
62 errorDescription = NULL;//Setting this to NULL returns the size required
63 status = flex_get_error_description(descriptionType, errorCode, commandID, resourceID,
64 errorDescription, &sizeOfArray );
65
66 //Allocate memory on the heap for the description
67 errorDescription = (i8*)malloc(sizeOfArray + 1);
68
69 sizeOfArray++; //So that the sizeOfArray is size of description + NULL character
70 // Get Error Description
71 status = flex_get_error_description(descriptionType, errorCode, commandID, resourceID,
72 errorDescription, &sizeOfArray );
73
74 if (errorDescription != NULL){
75 printf("\n");
76 printf(errorDescription);//Print description to screen
77 free(errorDescription);//Free allocated memory
78 }else{
79 printf("Memory Allocation Error");
80 }
81}
FLEXFUNC flex_get_error_description(u16 descriptionType, i32 errorCode, u16 commandID, u16 resourceID, i8 FAR *charArray, u32 FAR *sizeOfArray)
long i32
Definition: MotnCnst.h:35
unsigned long u32
Definition: MotnCnst.h:24
unsigned short u16
Definition: MotnCnst.h:23
#define NIMC_ERROR_ONLY
Definition: MotnCnst.h:301
#define NIMC_COMBINED_DESCRIPTION
Definition: MotnCnst.h:304
char i8
Definition: MotnCnst.h:33
#define NULL
Definition: nidaqmx.h:84

Variable Documentation

◆ gStage

AcqStage1* gStage =0