#ifndef RestCore_TRestRawSignalDataCollectionProcess #define RestCore_TRestRawSignalDataCollectionProcess // TRestRawSignalDataCollectionProcess #include #ifdef REST_DetectorLib #include #endif #include #include #include #include #include #include #include "TMatrixD.h" #include "TRestEventProcess.h" using namespace std; //! A process to convolute the input raw signal event with a given input //! response. class TRestRawSignalDataCollectionProcess : public TRestEventProcess { private: // private variables for the images #ifndef __CINT__ TImage *fImageXZ; TImage *fImageYZ; TArrayD fPixelDataXZ = TArrayD(); TArrayD fPixelDataYZ = TArrayD(); TString fTag; #endif /// A pointer to the detector readout definition accesible to TRestRun #ifdef REST_DetectorLib TRestDetectorReadout* fReadout; //! #endif // /// A pointer to the detector gas definition accessible to TRestRun // TRestDetectorGas* fGas; //! Double_t fBitmapSize; Double_t fPixelSize; //////////////// /// A pointer to the specific TRestRawSignalEvent input TRestRawSignalEvent* fInputSignalEvent; /// A pointer to the specific TRestRawSignalEvent output TRestRawSignalEvent* fOutputSignalEvent; void InitFromConfigFile(); void Initialize(); void LoadDefaultConfig(); protected: // defining the data file for X and y data for ML // std::ofstream csv_data_file; public: // structure to store id's and energies struct Data_csv{ Int_t counter = 0; vector XZ_id; vector YZ_id; vector e_XZ; vector e_YZ; vector e_tot; }; Data_csv data_info; any GetInputEvent() { return fInputSignalEvent; } any GetOutputEvent() { return fOutputSignalEvent; } void InitProcess(); TRestEvent* ProcessEvent(TRestEvent* eventInput); void EndProcess(); void LoadConfig(std::string cfgFilename, std::string name = ""); /// It prints out the process parameters stored in the metadata structure void PrintMetadata() { BeginPrintProcess(); // REWRITE THIS PART EndPrintProcess(); } /// Returns a new instance of this class TRestEventProcess* Maker() { return new TRestRawSignalDataCollectionProcess; } /// Returns the name of this process TString GetProcessName() { return (TString) "rawSignalDataCollection"; } TRestRawSignalDataCollectionProcess(); TRestRawSignalDataCollectionProcess(char* cfgFileName); ~TRestRawSignalDataCollectionProcess(); ClassDef(TRestRawSignalDataCollectionProcess, 2); // Template for a REST "event process" class inherited from // TRestEventProcess }; #endif