source: trunk/MagicSoft/Mars/mmovie/MMovieWrite.h@ 8408

Last change on this file since 8408 was 8406, checked in by tbretz, 18 years ago
*** empty log message ***
File size: 2.2 KB
Line 
1#ifndef MARS_MMovieWrite
2#define MARS_MMovieWrite
3
4#ifndef MARS_MTask
5#include "MTask.h"
6#endif
7
8class TH1;
9class TASImage;
10
11class MGeomCam;
12class MMovieData;
13class MSignalCam;
14class MPedestalCam;
15class MRawEvtHeader;
16class MRawRunHeader;
17class MBadPixelsCam;
18
19class MMovieWrite : public MTask
20{
21private:
22 MRawRunHeader *fRun; //! Header with run number and sampling frequency
23 MRawEvtHeader *fHead; //! Header with event number
24 MGeomCam *fCam; //! Camera geometry necessary for the histograms
25 MSignalCam *fSig; //! Input signal to display cleaned and uncleaned event
26 MBadPixelsCam *fBad; //! Information about bad pixels
27 MPedestalCam *fPed; //! Fundamental pedestal for palette and cleaning
28
29 MMovieData *fIn; //! Input data with splines for all pixels
30
31 FILE *fPipe; //! Ouput pipe to player or encoder
32
33 Float_t fTargetLength; // [s] Target length for stream of one event (+1 frame)
34 Float_t fThreshold; // Threshold for cleaning
35 UInt_t fNumEvents; // Maximum number of events to encode
36
37 TString fFilename; // name of output file
38
39 // MTask
40 Int_t PreProcess(MParList *plist);
41 Int_t Process();
42 Int_t PostProcess();
43
44 // MParContainer
45 Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print);
46
47 // MMovieWrite
48 Bool_t OpenPipe();
49 Bool_t CheckPipe();
50
51 Double_t GetMedianPedestalRms() const;
52
53 void Clean(TH1 &h, Double_t rms) const;
54 void TreatBadPixels(TH1 &h) const;
55
56 Int_t SetPalette(Double_t rms, const TH1 &h) const;
57 void DeletePalette(Int_t colidx) const;
58
59 void UpdateImage(TASImage &img, TVirtualPad &pad);
60
61 Bool_t WriteImage(TASImage &img);
62 Bool_t WriteImage(TASImage &img, TVirtualPad &pad);
63 //Bool_t WriteImage(TVirtualPad &pad);
64
65 Bool_t Process(TH1 &h, TVirtualPad &c);
66
67public:
68 MMovieWrite(const char *name=NULL, const char *title=NULL);
69 ~MMovieWrite();
70
71 void SetFilename(const char *f) { fFilename = f; }
72 void SetNumEvents(Int_t n) { fNumEvents = n; }
73 void SetThreshold(Float_t f) { fThreshold = f; }
74 void SetTargetLength(Float_t l) { fTargetLength = l; }
75
76 ClassDef(MMovieWrite, 0) // Task to encode a movie
77};
78
79#endif
Note: See TracBrowser for help on using the repository browser.