#include int FOpenDataFile(fits &datafile, vector &data, vector &data_offset, unsigned int &data_num, size_t &data_n, UInt_t &data_roi, UInt_t &data_px) { //------------------------------------------- //Print the header //------------------------------------------- /* cout << "-------------------- Data Header -------------------" << endl; datafile.PrintKeys(); cout << "------------------- Data Columns -------------------" << endl; datafile.PrintColumns(); */ //------------------------------------------- //Get the size of the data column //------------------------------------------- data_roi = datafile.GetUInt("NROI"); // Value from header data_px = datafile.GetUInt("NPIX"); data_n = datafile.GetN("Data"); //Size of column "Data" = #Pixel x ROI //------------------------------------------- //Set the sizes of the data vectors //------------------------------------------- data.resize(data_n,0); data_offset.resize(data_px,0); //------------------------------------------- //Link the data to variables //------------------------------------------- datafile.SetRefAddress("EventNum", data_num); datafile.SetVecAddress("Data", data); datafile.SetVecAddress("StartCellData", data_offset); datafile.GetRow(0); cout << "Opening data file successful..." << endl; return 0; }