]>
Commit | Line | Data |
---|---|---|
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" | |
aa0a2fa7 | 14 | #include "TArrayI.h" |
0cfe76b5 | 15 | |
16 | #include "AliJob.h" | |
17 | #include "AliObjMatrix.h" | |
18 | ||
19 | #include "IceAOM.h" | |
20 | #include "IceEvent.h" | |
21 | ||
22 | #include "twr_reader.h" | |
23 | ||
24 | class IceRawTWR : public AliJob | |
25 | { | |
26 | public : | |
27 | IceRawTWR(const char* name="IceRawTWR",const char* title=""); // Constructor | |
28 | virtual ~IceRawTWR(); // Destructor | |
29 | void SetMaxEvents(Int_t n); // Set maximum number of events to be processed | |
30 | void SetPrintFreq(Int_t f); // Set printfrequency to provide info every f events | |
31 | void SetSplitLevel(Int_t split); // Set split level for the produced ROOT data file | |
32 | void SetBufferSize(Int_t bsize); // Set buffersize for the produced ROO data file | |
6280c0e2 | 33 | void AddInputFile(TString name); // Add name of TWR raw input file to the list |
0cfe76b5 | 34 | void SetOutputFile(TFile* ofile); // Set output file for the ROOT data structures |
35 | void SetOutputFile(TString name); // Create output file for the ROOT data structures | |
36 | TFile* GetOutputFile(); // Provide pointer to the ROOT output file | |
37 | virtual void Exec(Option_t* opt); // Perform the format conversion | |
38 | ||
39 | protected : | |
40 | Int_t fSplit; // The split level of the produced ROOT data file | |
41 | Int_t fBsize; // The buffersize of the produced ROOT data file | |
42 | Int_t fMaxevt; // The maximum number of events to be processed | |
43 | Int_t fPrintfreq; // The event info printing frequency | |
44 | TObjArray* fInfiles; // Names of all the raw data input files | |
45 | TFile* fOutfile; // The ROOT output file | |
aa0a2fa7 | 46 | TArrayI fReadout; // The OM readout type (0=unknown 1=electrical 2=optical) |
47 | TArrayI fThreshold; // The OM thresholds in ADC | |
0cfe76b5 | 48 | void PutTrigger(Int_t year); // Put the trigger info from the raw data event into the IcePack structure |
49 | void PutWaveforms(Int_t year); // Put the waveforms from the raw data event into the IcePack structure | |
50 | ||
51 | FILE* fInput; //! Pointer to the TWR raw data input file | |
52 | sys_config_t* fHeader; //! Structure holding the raw configuration header info | |
53 | event_t fEvent; //! Structure holding the actual raw event data | |
54 | trigger_hits_t fTrigger; //! Structure holding the event trigger info | |
55 | waveform_analyse_t fWform; //! Waveform info for a certain OM from (merged) fragment(s) | |
56 | ||
57 | // Ralice/IcePack implementation of Wolfgang Wagner's original code | |
58 | Int_t extract_info_from_filename(char* fname,twr_raw_data_file_t* twr_file); | |
59 | Int_t clear_system(sys_config_t* sys); | |
60 | Int_t clear_event(event_t* event_ptr); | |
61 | Int_t read_header_from_file(FILE* fin,sys_config_t** system_ptr,UInt_t* header_length); | |
62 | Int_t update_system(sys_config_t* sys,Int_t run_number); | |
63 | Int_t read_event(FILE* fin,sys_config_t* sys,event_t* event_ptr); | |
64 | Int_t retrigger(event_t* ev,trigger_hits_t* trig); | |
65 | Int_t clear_waveform_analysis(waveform_analyse_t* wfm_om); | |
66 | Int_t restore_waveform(waveform_t f_wfm,waveform_analyse_t* wfm_om,Int_t year); | |
67 | ||
aa0a2fa7 | 68 | ClassDef(IceRawTWR,2) // Job for conversion of TWR raw data into IceEvent data structures. |
0cfe76b5 | 69 | }; |
70 | #endif |