PhotoASCII.h (1098B)
1 // File : PhotoASCII.h 2 // Date : Thu 30 Jun 2016 03:58:09 PM CEST 3 // Author : Fabian Wermelinger 4 // Description: ASCII .dat file for 1D extraction 5 // Copyright 2016 ETH Zurich. All Rights Reserved. 6 #ifndef PHOTOASCII_H_OSYU1497 7 #define PHOTOASCII_H_OSYU1497 8 9 #include <string> 10 #include <vector> 11 12 #include "common.h" 13 #include "Polaroid.h" 14 #include "PhotoPaper.h" 15 16 class PhotoASCII : public PhotoPaper 17 { 18 private: 19 std::vector<Real> m_data; 20 Real m_time; 21 22 public: 23 PhotoASCII(const int N=0, const std::string filename="dat1d", const Real t=0) : PhotoPaper(0,0,filename), m_data(N), m_time(t) 24 { 25 m_description = "ASCII data"; 26 } 27 virtual ~PhotoASCII() { } 28 29 virtual void make_new(const std::string name, const int N, const int dummy); 30 virtual void resize(const int N, const int dummy); 31 virtual void write(); 32 virtual void set_pixel(const double phi, const int x, const int dummy); 33 virtual std::string suffix() const { return std::string(".dat"); } 34 inline void set_time(const Real t) { m_time = t; } 35 }; 36 37 #endif /* PHOTOASCII_H_OSYU1497 */