NCFS-Pack
A generic (astro)particle physics analysis framework
 
Loading...
Searching...
No Matches
IceRawTWR.h
Go to the documentation of this file.
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#include "TFile.h"
8#include "TTree.h"
9#include "TString.h"
10#include "TObjString.h"
11#include "TObjArray.h"
12#include "TArrayI.h"
13
14#include "NcJob.h"
15#include "NcObjMatrix.h"
16
17#include "IceAOM.h"
18#include "IceEvent.h"
19
20#include "twr_reader.h"
21
23
24class IceRawTWR : public NcJob
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
33 void AddInputFile(TString name); // Add name of TWR raw input file to the list
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
46 TArrayI fReadout; // The OM readout type (0=unknown 1=electrical 2=optical)
47 TArrayI fThreshold; // The OM thresholds in ADC
48 TArrayI fExtstop; // The TWR external stop value in bin counts for each OM
49 void PutTrigger(Int_t year); // Put the trigger info from the raw data event into the IcePack structure
50 void PutWaveforms(Int_t year); // Put the waveforms from the raw data event into the IcePack structure
51
52 FILE* fInput;
53 sys_config_t* fHeader;
54 event_t fEvent;
55 trigger_hits_t fTrigger;
56 waveform_analyse_t fWform;
57
58 // Ralice/IcePack implementation of Wolfgang Wagner's original code
59 Int_t extract_info_from_filename(char* fname,twr_raw_data_file_t* twr_file);
60 Int_t clear_system(sys_config_t* sys);
61 Int_t clear_event(event_t* event_ptr);
62 Int_t read_header_from_file(FILE* fin,sys_config_t** system_ptr,UInt_t* header_length);
63 Int_t update_system(sys_config_t* sys,Int_t run_number);
64 Int_t read_event(FILE* fin,sys_config_t* sys,event_t* event_ptr);
65 Int_t retrigger(event_t* ev,trigger_hits_t* trig);
66 Int_t clear_waveform_analysis(waveform_analyse_t* wfm_om);
67 Int_t restore_waveform(waveform_t f_wfm,waveform_analyse_t* wfm_om,Int_t year);
68
69 ClassDef(IceRawTWR,3) // Job for conversion of TWR raw data into IceEvent data structures.
70};
71#endif
virtual void Exec(Option_t *opt)
Int_t fMaxevt
Definition IceRawTWR.h:42
void PutTrigger(Int_t year)
Int_t clear_event(event_t *event_ptr)
Int_t fPrintfreq
Definition IceRawTWR.h:43
void SetPrintFreq(Int_t f)
Int_t restore_waveform(waveform_t f_wfm, waveform_analyse_t *wfm_om, Int_t year)
void SetOutputFile(TFile *ofile)
Int_t extract_info_from_filename(char *fname, twr_raw_data_file_t *twr_file)
Int_t read_event(FILE *fin, sys_config_t *sys, event_t *event_ptr)
TFile * fOutfile
Definition IceRawTWR.h:45
void SetBufferSize(Int_t bsize)
TFile * GetOutputFile()
waveform_analyse_t fWform
! Waveform info for a certain OM from (merged) fragment(s)
Definition IceRawTWR.h:56
TArrayI fReadout
Definition IceRawTWR.h:46
IceRawTWR(const char *name="IceRawTWR", const char *title="")
Definition IceRawTWR.cxx:99
void PutWaveforms(Int_t year)
Int_t fSplit
Definition IceRawTWR.h:40
FILE * fInput
! Pointer to the TWR raw data input file
Definition IceRawTWR.h:52
Int_t read_header_from_file(FILE *fin, sys_config_t **system_ptr, UInt_t *header_length)
trigger_hits_t fTrigger
! Structure holding the event trigger info
Definition IceRawTWR.h:55
virtual ~IceRawTWR()
TArrayI fThreshold
Definition IceRawTWR.h:47
TObjArray * fInfiles
Definition IceRawTWR.h:44
void SetMaxEvents(Int_t n)
void AddInputFile(TString name)
event_t fEvent
! Structure holding the actual raw event data
Definition IceRawTWR.h:54
void SetSplitLevel(Int_t split)
Int_t clear_system(sys_config_t *sys)
Int_t retrigger(event_t *ev, trigger_hits_t *trig)
sys_config_t * fHeader
! Structure holding the raw configuration header info
Definition IceRawTWR.h:53
Int_t fBsize
Definition IceRawTWR.h:41
TArrayI fExtstop
Definition IceRawTWR.h:48
Int_t update_system(sys_config_t *sys, Int_t run_number)
Int_t clear_waveform_analysis(waveform_analyse_t *wfm_om)
NcJob(const char *name="NcJob", const char *title="")
Definition NcJob.cxx:139