]> git.uio.no Git - u/mrichter/AliRoot.git/blame - RALICE/icepack/iceconvert/IceRawTWR.h
13-feb-2007 NvE IceRawTWR.cxx updated to ensure padding zeros in gps time word.
[u/mrichter/AliRoot.git] / RALICE / icepack / iceconvert / IceRawTWR.h
CommitLineData
0cfe76b5 1#ifndef IceRawTWR_h
2#define IceRawTWR_h
3
4// Copyright(c) 2003, IceCube Experiment at the South Pole, All rights reserved.
5// See cxx source for full Copyright notice.
6
7// $Id$
8
9#include "TFile.h"
10#include "TTree.h"
11#include "TString.h"
12#include "TObjString.h"
13#include "TObjArray.h"
14
15#include "AliJob.h"
16#include "AliObjMatrix.h"
17
18#include "IceAOM.h"
19#include "IceEvent.h"
20
21#include "twr_reader.h"
22
23class IceRawTWR : public AliJob
24{
25 public :
26 IceRawTWR(const char* name="IceRawTWR",const char* title=""); // Constructor
27 virtual ~IceRawTWR(); // Destructor
28 void SetMaxEvents(Int_t n); // Set maximum number of events to be processed
29 void SetPrintFreq(Int_t f); // Set printfrequency to provide info every f events
30 void SetSplitLevel(Int_t split); // Set split level for the produced ROOT data file
31 void SetBufferSize(Int_t bsize); // Set buffersize for the produced ROO data file
6280c0e2 32 void AddInputFile(TString name); // Add name of TWR raw input file to the list
0cfe76b5 33 void SetOutputFile(TFile* ofile); // Set output file for the ROOT data structures
34 void SetOutputFile(TString name); // Create output file for the ROOT data structures
35 TFile* GetOutputFile(); // Provide pointer to the ROOT output file
36 virtual void Exec(Option_t* opt); // Perform the format conversion
37
38 protected :
39 Int_t fSplit; // The split level of the produced ROOT data file
40 Int_t fBsize; // The buffersize of the produced ROOT data file
41 Int_t fMaxevt; // The maximum number of events to be processed
42 Int_t fPrintfreq; // The event info printing frequency
43 TObjArray* fInfiles; // Names of all the raw data input files
44 TFile* fOutfile; // The ROOT output file
45 void PutTrigger(Int_t year); // Put the trigger info from the raw data event into the IcePack structure
46 void PutWaveforms(Int_t year); // Put the waveforms from the raw data event into the IcePack structure
47
48 FILE* fInput; //! Pointer to the TWR raw data input file
49 sys_config_t* fHeader; //! Structure holding the raw configuration header info
50 event_t fEvent; //! Structure holding the actual raw event data
51 trigger_hits_t fTrigger; //! Structure holding the event trigger info
52 waveform_analyse_t fWform; //! Waveform info for a certain OM from (merged) fragment(s)
53
54 // Ralice/IcePack implementation of Wolfgang Wagner's original code
55 Int_t extract_info_from_filename(char* fname,twr_raw_data_file_t* twr_file);
56 Int_t clear_system(sys_config_t* sys);
57 Int_t clear_event(event_t* event_ptr);
58 Int_t read_header_from_file(FILE* fin,sys_config_t** system_ptr,UInt_t* header_length);
59 Int_t update_system(sys_config_t* sys,Int_t run_number);
60 Int_t read_event(FILE* fin,sys_config_t* sys,event_t* event_ptr);
61 Int_t retrigger(event_t* ev,trigger_hits_t* trig);
62 Int_t clear_waveform_analysis(waveform_analyse_t* wfm_om);
63 Int_t restore_waveform(waveform_t f_wfm,waveform_analyse_t* wfm_om,Int_t year);
64
65 ClassDef(IceRawTWR,1) // Job for conversion of TWR raw data into IceEvent data structures.
66};
67#endif