source: branches/AddingGoogleTestEnvironment/mmovie/MMovieWrite.h@ 19779

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