// ------------------------------------------------------------------ // ----- TMbsUnpackTofCustom ----- // ----- Created 08/05/2013 by P.-A. Loizeau ----- // ----- Mbs Data unpacker using custom MBS classes ----- // ----- based on Go4 ones ----- // ------------------------------------------------------------------ #ifndef _TMBSUNPACKTOFCUST_H_ #define _TMBSUNPACKTOFCUST_H_ #include "FairTask.h" // sources of GSI/MBS event adapted from Go4 #include "TMbsClient.h" #include "TMbsFile.h" // Fairroot sources of GSI/MBS event //#include "FairLmdSource.h" //#include "FairRemoteSource.h" // Parameters class TMbsUnpackTofPar; class TMbsSourceParameter; class TMbsFileParameter; // Input Data class TMbsClient; class TMbsFile; class TMbsEvent; class TMbsSubEvent; // Unpackers class TTofTriglogUnpacker; class TTofScomUnpacker; class TTofVftxUnpacker; class TTofGet4Unpacker; // ROOT class TClonesArray; class TH1; class TH2; class TString; class TDatime; class TMbsUnpackTofCustom : public FairTask { public: TMbsUnpackTofCustom(); TMbsUnpackTofCustom(const char* name, Int_t mode = 1, Int_t verbose = 1); virtual ~TMbsUnpackTofCustom(); // Fairtask specific functions virtual void SetParContainers(); virtual InitStatus Init(); virtual InitStatus ReInit(); virtual void Exec(Option_t* option); virtual void Finish(); void WriteHistogramms(); private: TMbsUnpackTofCustom(const TMbsUnpackTofCustom&); TMbsUnpackTofCustom operator=(const TMbsUnpackTofCustom&); // Parameters Bool_t InitParameters(); TMbsUnpackTofPar *fMbsUnpackPar; TMbsSourceParameter *fMbsSourcePar; TMbsFileParameter *fMbsFilePar; Bool_t CreateHistogramms(); Bool_t FillHistograms(); void DeleteHistograms(); Bool_t RegisterOutput(); Bool_t CreateUnpackers(); Bool_t ClearOutput(); void ProcessSubevent(TMbsSubEvent* subevt); // source of GSI/MBS event adapted from Go4 TMbsClient * fMbsClient; TMbsFile * fMbsFile; // GSI/MBS event adapted from Go4 TMbsEvent * fMbsEvent; TMbsSubEvent * fMbsSubEvent; // Fairroot sources of GSI/MBS event // FairLmdSource * fFairLmd; // FairRemoteSource * fFairRem; Int_t fiNbEvents; Int_t fiFirstEventNumber; Int_t fiLastEventNumber; TDatime fFirstCheck; TDatime fLastCheck; TDatime fCheck; // Unpackers TTofTriglogUnpacker * fTriglogUnp; TTofScomUnpacker * fScomUnp; TTofVftxUnpacker * fVftxUnp; TTofGet4Unpacker * fGet4Unp; // Output objects TClonesArray * fTriglogBoardCollection; TClonesArray * fScalerBoardCollection; TClonesArray * fVftxBoardCollection; TClonesArray * fGet4BoardCollection; ClassDef(TMbsUnpackTofCustom, 1); }; #endif // _TMBSUNPACKTOFCUST_H_