NCFS-Pack
A generic (astro)particle physics analysis framework
 
Loading...
Searching...
No Matches
IceRoot Class Reference

Job for conversion of simple Root data into IceEvent data structures. More...

#include "IceRoot.h"

Inheritance diagram for IceRoot:
NcJob

Detailed Description

Job for conversion of simple Root data into IceEvent data structures.

Copyright(c) 2003, IceCube Experiment at the South Pole. All rights reserved.
Author: The IceCube NCFS-based Offline Project.
Contributors are mentioned in the code where appropriate.
Permission to use, copy, modify and distribute this software and its
documentation strictly for non-commercial purposes is hereby granted
without fee, provided that the above copyright notice appears in all
copies and that both the copyright notice and this permission notice
appear in the supporting documentation.
The authors make no claims about the suitability of this software for
any purpose. It is provided "as is" without express or implied warranty.
// Class IceRoot
// Conversion of simple Root data into IceEvent data structures.
// This class reads data from the simple Root files as output by Martijn
// Duvoort's Walnut analyser.
// An indication of the active DAQ system is available in the IceEvent structure
// via a device named "Daq". Here the various daq systems (TWR, Muon, ...)
// from which the actual hits (ADC, LE, TOT) eventually will be composed
// are indicated as "signals" of the device itself.
// This class is derived from AliJob providing a task-based processing
// structure on an event-by-event basis.
// The main object in the job environment is an IceEvent* pointer.
// In case the user has provided sub-tasks, these will be executed
// on an event-by-event basis after the IceEvent structure has been filled
// with the simple Root data and before the final structures are written out.
// Note that the data structures are only written out if an outputfile has
// been specified via the SetOutputFile memberfunction.
// In case no outputfile has been specified, this class provides a facility
// to investigate/analyse simple Root data using the Ralice/IcePack analysis tools.
//
// Usage example :
// ---------------
//
// gSystem->Load("ncfspack");
// gSystem->Load("icepack");
// gSystem->Load("iceconvert");
//
// IceRoot q("IceRoot","Simple Root data to IcePack data structure conversion");
//
// // Specify the relevant calibration file
// q.SetCalibFile("calib2006.root");
//
// // Limit the number of entries for testing
// q.SetMaxEvents(10);
//
// // Print frequency to produce a short summary print every printfreq events
// q.SetPrintFreq(1);
//
// // The simple Root data input filename(s)
// q.AddInputFile("test-i3.root");
//
// // Output file for the event structures
// q.SetOutputFile("events.root");
//
// ///////////////////////////////////////////////////////////////////
// // Here the user can specify his/her sub-tasks to be executed
// // on an event-by-event basis after the IceEvent structure
// // has been filled and before the data is written out.
// // Sub-tasks (i.e. a user classes derived from TTask) are entered
// // as follows :
// //
// // MyXtalk task1("task1","Cross talk correction");
// // MyClean task2("task2","Hit cleaning");
// // q.Add(&task1);
// // q.Add(&task2);
// //
// // The sub-tasks will be executed in the order as they are entered.
// ///////////////////////////////////////////////////////////////////
//
// // Perform the conversion and execute subtasks (if any)
// // on an event-by-event basis
// q.ExecuteJob();
//
//--- Author: Garmt de Vries-Uiterweerd 13-Mar-2007 Utrecht University
//- Modified: NvE $Date: 2010-03-19 11:10:02 +0100 (Fri, 19 Mar 2010) $ NCFS

Definition at line 28 of file IceRoot.h.

Public Member Functions

 IceRoot (const char *name="IceRoot", const char *title="")
 
virtual ~IceRoot ()
 
void AddInputFile (TString name)
 
virtual void Exec (Option_t *opt)
 
TFile * GetOutputFile ()
 
void SetBufferSize (Int_t bsize)
 
void SetCalibFile (TString name)
 
void SetInputFile (TString name)
 
void SetMaxEvents (Int_t n)
 
void SetOMdbase (NcObjMatrix *omdb)
 
void SetOutputFile (TFile *ofile)
 
void SetOutputFile (TString name)
 
void SetPrintFreq (Int_t f)
 
void SetSplitLevel (Int_t split)
 
- Public Member Functions inherited from NcJob
 NcJob (const char *name="NcJob", const char *title="")
 
virtual ~NcJob ()
 
void AddObject (TObject *obj)
 
void AddObjects (TObjArray *arr)
 
void ExecuteJob (Int_t mode=0)
 
TFolder * GetFolder () const
 
TObject * GetMainObject () const
 
TObject * GetObject (const char *classname) const
 
TObject * GetObject (Int_t j) const
 
TObjArray * GetObjects () const
 
TObjArray * GetObjects (const char *classname)
 
void ListEnvironment ()
 
void MakeFolder ()
 
void ProcessObject (TObject *obj)
 
void RemoveObject (TObject *obj)
 
void RemoveObjects (const char *classname)
 

Protected Attributes

Int_t fBsize
 
TFile * fCalfile
 
TObjArray * fInfiles
 
NcObjMatrixfJEBTDaq
 
Int_t fMaxevt
 
TFile * fOutfile
 
Int_t fPrintfreq
 
Int_t fSplit
 
TTree * fTree
 
- Protected Attributes inherited from NcJob
TFolder * fFolder
 
TObject * fMainObject
 
Int_t fMakefolder
 
TObjArray * fObjects
 
TObjArray * fSelect
 ! Temp. array of pointers to user-selected stored objects
 

Additional Inherited Members

- Protected Member Functions inherited from NcJob
void SetMainObject (TObject *obj)
 

Constructor & Destructor Documentation

◆ IceRoot()

IceRoot::IceRoot ( const char * name = "IceRoot",
const char * title = "" )
// Default constructor.
// By default maxevent=-1, split=0, bsize=32000, printfreq=1.

Definition at line 94 of file IceRoot.cxx.

◆ ~IceRoot()

IceRoot::~IceRoot ( )
virtual
// Default destructor.

Definition at line 113 of file IceRoot.cxx.

Member Function Documentation

◆ AddInputFile()

void IceRoot::AddInputFile ( TString name)
// Add the name of this simple Root data input file to the list to be processed.

Definition at line 203 of file IceRoot.cxx.

◆ Exec()

void IceRoot::Exec ( Option_t * opt)
virtual
// Job to loop over the specified number of events and convert the
// simple Root data into the IceEvent structure.
// If maxevents<0 (default) all the entries of the input file
// will be processed.
// Every "printfreq" events a short event summary will be printed.
// The default value is printfreq=1.
// The output will be written on a standard output tree named "T".
//
// Notes :
// -------
// 1) This class is derived from NcJob, allowing a task based processing.
// After the conversion of a simple Root data event into an IceEvent structure,
// the processing of all available sub-tasks (if any) is invoked.
// This provides an event-by-event (sub)task processing before the
// final data structures are written out.
// 2) The main object in this job environment is an IceEvent* pointer.

Definition at line 296 of file IceRoot.cxx.

◆ GetOutputFile()

TFile * IceRoot::GetOutputFile ( )
// Provide pointer to the ROOT output file.

Definition at line 246 of file IceRoot.cxx.

◆ SetBufferSize()

void IceRoot::SetBufferSize ( Int_t bsize)
// Set the buffer size for the ROOT data file.
// bsize=32000 is the default initialisation in the constructor.

Definition at line 171 of file IceRoot.cxx.

◆ SetCalibFile()

void IceRoot::SetCalibFile ( TString name)
// Set the calibration ROOT file as created with IceCal2Root.
// Note: this will overrule a previously attached database.
// In case no calibration file is specified, TWR waveforms cannot be processed.

Definition at line 257 of file IceRoot.cxx.

◆ SetInputFile()

void IceRoot::SetInputFile ( TString name)
// Set the simple Root data input file.

Definition at line 183 of file IceRoot.cxx.

◆ SetMaxEvents()

void IceRoot::SetMaxEvents ( Int_t n)
// Set the maximum number of events to be processed.
// n=-1 implies processing of the complete input file, which is the default
// initialisation in the constructor.

Definition at line 134 of file IceRoot.cxx.

◆ SetOMdbase()

void IceRoot::SetOMdbase ( NcObjMatrix * omdb)
// Set the calibration database as created with IceCal2Root.
// Note: this will overrule a previously attached database.
// In case no calibration database is specified, TWR waveforms cannot be processed.

Definition at line 279 of file IceRoot.cxx.

◆ SetOutputFile() [1/2]

void IceRoot::SetOutputFile ( TFile * ofile)
// Set the output file for the ROOT data.

Definition at line 222 of file IceRoot.cxx.

◆ SetOutputFile() [2/2]

void IceRoot::SetOutputFile ( TString name)
// Create the output file for the ROOT data.

Definition at line 234 of file IceRoot.cxx.

◆ SetPrintFreq()

void IceRoot::SetPrintFreq ( Int_t f)
// Set the printfrequency to produce info every f events.
// f=1 is the default initialisation in the constructor.

Definition at line 147 of file IceRoot.cxx.

◆ SetSplitLevel()

void IceRoot::SetSplitLevel ( Int_t split)
// Set the split level for the ROOT data file.
// split=0 is the default initialisation in the constructor.

Definition at line 159 of file IceRoot.cxx.

Member Data Documentation

◆ fBsize

Int_t IceRoot::fBsize
protected

Definition at line 48 of file IceRoot.h.

◆ fCalfile

TFile* IceRoot::fCalfile
protected

Definition at line 53 of file IceRoot.h.

◆ fInfiles

TObjArray* IceRoot::fInfiles
protected

Definition at line 51 of file IceRoot.h.

◆ fJEBTDaq

NcObjMatrix* IceRoot::fJEBTDaq
protected

Definition at line 54 of file IceRoot.h.

◆ fMaxevt

Int_t IceRoot::fMaxevt
protected

Definition at line 49 of file IceRoot.h.

◆ fOutfile

TFile* IceRoot::fOutfile
protected

Definition at line 52 of file IceRoot.h.

◆ fPrintfreq

Int_t IceRoot::fPrintfreq
protected

Definition at line 50 of file IceRoot.h.

◆ fSplit

Int_t IceRoot::fSplit
protected

Definition at line 47 of file IceRoot.h.

◆ fTree

TTree* IceRoot::fTree
protected

Definition at line 55 of file IceRoot.h.


The documentation for this class was generated from the following files: